A Service Function defines how requests are made to a back-end service. A Service Function can send data in the form of parameters, and can receive data back in the form of XML, text or images.

Typical uses of Service Functions are:

For more information:

see Server request for how to call a Service Function from a client Action Rule.

see Set Initial Data for how to use a Service Function for fetching initial data.

see What are Datapools for how to use a Service Function to fetch data for a Datapool.

Adding a Service Function

Adding a Service Function is dependant on the protocol used to connect to the back-end. You can add the following Service Functions:

HTTP Service Functions

Use the Hypertext Transfer Protocol (HTTP) to send a request and receive a response.

For more information: see Setting the HTTP Service Functions.

SOAP Service Functions

Use the Simple Object Access Protocol (SOAP) to send a request and receive a response. The SOAP messages are transported using HTTP.

The supported options for SOAP calls are:

JMS Services

Use the Java Messaging Service (JMS) protocol. JMS is a one-way service call. It is not possible to return an acknowledgement to the client. JMS requires JNDI (Java Naming and Directory Interface) to be active. This is controlled in the Presentation Server Admin Tool. There are two messaging domains: queues and topics. Queues are intended for messages that are delivered only once. Topics are intended for situations whereby once a message is published all interested receivers will receive it. Thus for Services we want to be able to send to both queues and topics, but for Datapools we only require subscribing to topics as being a queue subscriber does not seem appropriate (queues are often used for example for load balancing). JMS Services can support Datapools.

For more information: see Setting the JMS Service Functions.

JDBC Services

Use the Java Database Connectivity (JDBC) protocol to send SQL requests to a data source, and receive the results as XML. Database connection can be created from a JDBC driver and URL that connects the driver. Alternatively you can specify a JNDI name where Presentation Server can query for a database connection. If a connection is obtained from JDBC driver and URL, the connection is kept after the service is executed until the service is destroyed. If however the connection is obtained by JNDI lookup, it is returned immediately after the service is executed.

For more information: see Setting the JDBC Service Functions.

JAVA Services

Invoke a method (function) of a Java class. The specified Java class can be a local class (exist in the same JVM with Presentation Server) or a remote class (invoked using RMI). For local class, you need to know the full path of the class (for example: java.lang.String). For remote class, you need to know the reference of the remote class (for example: rmi://localhost:1099/DateServer). You can pass any number of argument to the Java method, but the argument must has a constructor that takes a String (java.lang.String).

The Java method can return void or object of any data type as long as the it has a method (for example: toString) defined that gives meaningful representation of the return object in String format. The return object can also be a reference to a remote object, but the object must explicitly define a remote method that returns the data in String format, because calling the remote object's toString() only give you the id of the remote class reference.

For more information: see Setting the JAVA Service Functions.

PLUG-IN Services

Plug-in services are NOT AltioLive standard service types, but custom built ones. Using AltioLive plug-in architecture, developers can develop custom built services, package them into an archive file and then install the package in the Presentation Server. When a plug-in package is installed, all services in the package become part of the Presentation Server and user can create services of the custom built service types. If a configuration window is associated with a plug-in service, it is then opened for user to configure the service.

For more information: see PLUG-IN Service Function for details on building and using plug-in Service Function.

ADD-IN Services

Add-in services are pre-configured services of any types packaged in a plug-in package. Once a plug-in package is installed, these pre-configured services are available for developers to use in their applications.

For more information: see PLUG-IN Service Function for details on building and using add-in Service.

Viewing/Editing a Service Function

From the Application explorer window, expand the Services folder.

Double-click the Service Function you want to view or edit .

The Service window displays:

The Service window allows a service function's configuration to be viewed and edited, and also allows the service function to be tested.

The window displayed will be dependant on the type of Service selected.

For more information: see HTTP Service Function, SOAP Service Function, JMS Service Function or JDBC Service Function, JAVA Service Function or PLUG-IN Service Function for details on how to configure particular Service Functions windows

Deleting a Service Function

  1. Select the Service Function you want to delete in the Application Explorer.

  2. Do one of the following:

  3. Click on the Edit | Delete SERVICENAME menu item from the main Application Manager menu.

  4. Right-click on the service you want to delete and select Delete SERVICENAME from the context menu.

  5. Press the Delete key.

  6. Click on the images/toolbar/delete_button.jpg button.

A prompt to confirm deletion of the Service will be displayed.

Cloning a Service Function

To create a new Service Function based on an existing Service Function:

  1. From the Application Explorer window, expand the Services folder.

  2. Select the Service Function you want to clone.

  3. Do one of the following:

  4. Click on the Edit | Clone SERVICENAME menu item from the main Application Manager menu.

  5. Right-click on the service you want to clone and select Clone SERVICENAME from the context menu.

A new Service will appear under the Services folder in the Application Explorer window. Double-click this new Service to update its name and other settings.

See also

What are Datapools?, Configure JNDI Settings,