a
Setting Service Functions
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:
Fetch initial client data,
Add, update or delete a database record,
Fetch the latest data for a Datapool,
Fetch an image to display,
Retrieve data on demand.
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 is dependant on the protocol used to connect to the back-end. You can add the following 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.
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:
Rpc/encoded: suitable for sending simple arguments to the target SOAP service. The arguments for a SOAP RPC call are limited to simple types. For example: int, double, boolean, string. The parameters to the SOAP service are encoded according to the SOAP specification.
Document/literal: suitable for sending full XML fragments to the target SOAP service. The XML fragments appear in the SOAP message as is.
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.
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.
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 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 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.
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
Select the Service Function you want to delete in the Application Explorer.
Do one of the following:
Click on the Edit | Delete SERVICENAME menu item from the main Application Manager menu.
Right-click on the service you want to delete and select Delete SERVICENAME from the context menu.
Press the Delete key.
Click on the
button.
A prompt to confirm deletion of the Service will be displayed.
To create a new Service Function based on an existing Service Function:
From the Application Explorer window, expand the Services folder.
Select the Service Function you want to clone.
Do one of the following:
Click on the Edit | Clone SERVICENAME menu item from the main Application Manager menu.
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.