Developer's Guide for Parlay X
Get Adobe Reader |
The following sections describe the Parlay X Web Services API:
The Parlay X Web Services API offers a set of methods that adds telecom functionality to any application that uses Web Services.
The API is designed for rapid application development. From an architectural point of view, the implementation of the API resides on top of the service capability modules in WebLogic Network Gatekeeper.
All applications, accessing the WebLogic Network Gatekeeper through the Web Services interfaces uses a Kerberos type of service token-based authentication. The application is provided with a user name (the application instance group ID) and a password. When an application wants access to the WebLogic Network Gatekeeper the application instance logs in using the user name and password together with the application account ID and service provider ID to retrieve a service token. This mechanism may be extended, as an option using, for example Passport or other extended Kerberos Key Distribution Centre (KDC) authentication solutions.
To run a Parlay X Web Services application, access to either a WebLogic Network Gatekeeper or an ATE is needed, together with a set of WSDL files defining the API, login credentials and IDs of resources to use. These are provided by the service provider.
The Parlay X Web Services APIs are separated in different APIs. Each main component is contained in a specific module. The modules are:
Methods for retrieving the geographical position of a mobile terminal. |
|
Methods for retrieving information on the status of mobile terminals. |
In addition there is a an API, Access, that handles login-sessions towards WebLogic Network Gatekeeper. This API is specific for WebLogic Network Gatekeeper, and is not defined in the Parlay X standard. All Parlay X based applications that use the WebLogic Network Gatekeeper as a Parlay X Gateway use this API as an entry point.
All APIs, except Account Management, are supported by the WebLogic Network Gatekeeper. For detailed information on individual methods and WebLogic Network Gatekeeper specifics not covered by the standard, see API Description Parlay X for WebLogic Network Gatekeeper. For information on the standard itself, see Parlay X Specification, http://www.parlay.org.
There are two sets of WSDL files describing the Parlay X API
The WebLogic Network Gatekeeper supports the Parlay X API using the SOAP encoding (RPC encoding) approach.
By default, the WSDL files can be fetched from:
For a description of the methods in each API, see API Description Parlay X for WebLogic Network Gatekeeper.
The examples in this chapter are using Java and Axis. The invocation techniques used is JAX-RPC using Dynamic Invocation Interface. The WSDL files describing the services are used to generate stubs and skeletons in Java.
The main program control flow when executing applications based on Parlay X Web Services is described in pseudo code in Figure 3-1, Application execution workflow, on page 3-5.
To use any Web Service provided by WebLogic Network Gatekeeper, a login ticket is needed. A login is needed to retrieve the ticket. The login ticket identifies the login session. This ticket is valid until a logout is performed. The ticket is sent in each consecutive method invocation to identify the originator of the invoker.
Details about locators, endpoints, so on are explained later in this section
AccessService accessService = new AccessServiceLocator();
java.net.URL endpoint = new java.net.URL(wsdlUrl);
Access access = accessService.getAccess(endpoint);
String sessionId = access.applicationLogin(spID,
appID,
appInstGroupID,
appInstGroupPassword);
The login ticket ID retrieved when invoking applicationLogin is used in each consecutive invocation towards WebLogic Network Gatekeeper. See Define the security header.
The login credentials; spID, appID, appInstGroupId, and appinstGoupPassword are provided by the service provider.
The login ticket ID, as retrieved when logging in, is sent in the SOAP header together with a username/password combination for each invocation of a Parlay X web service method.
Listing 3-2 Define the security header
org.apache.axis.message.SOAPHeaderElement header =
new org.apache.axis.message.SOAPHeaderElement(wsdlUrl, "Security", "");
header.setActor("wsse:PasswordToken");
header.addAttribute(wsdlUrl, "Username", ""+userName);
header.addAttribute(wsdlUrl, "Password", ""+sessionId);
header.setMustUnderstand(true);
The login ticket is supplied in the Password attribute. The userName attribute is defined by the service provider, normally in the format
<myUserName>@<myapplication>.
The header is defined upon the object representing the Web Service port to use. Also see Add security header.
Below is the code for getting hold of a port. The example is using the Send SMS API.
Listing 3-3 Get hold of a port
SendSmsService sendSmsService = new SendSmsServiceLocator();
java.net.URL endpoint = new java.net.URL(sendSmsWsdlUrl);
SendSmsPort sendSms = sendSmsService.getSendSmsPort(endpoint);
The details on the parameters of the send SMS API are described in API Description Parlay X for WebLogic Network Gatekeeper.
Adding the security header to a request is straightforward, as illustrated below. For information on how create the header, see Define the security header.
Listing 3-4 Add security header
((org.apache.axis.client.Stub)sendSms).setHeader(header);
Below it is illustrated how to get hold of a port. The example is using the Send SMS API.
String sendID = sendSms.sendSms(eui, myMailbox, "CP_FREE", myMessage );
The details on the parameters of the send SMS API are described in API Description Parlay X for WebLogic Network Gatekeeper.
The logout destroys the login ticket.
access.applicationLogout(sessionId);
The login Ticket is destroyed and cannot be used in consecutive method invocations.
This API is specific for WebLogic Network Gatekeeper, and is hence not part of the Parlay X specification.
The following functionality is provided:
For a description on how to use this API, see Login and retrieve login ticket and Logout. There is also support for changing the password.
This API contains Web Services methods for handling application initiated, two-party telephony calls.
The following functionality is provided:
This API contains Web Services methods for handling network initiated calls.
It is a listener interface, which is implemented on the server-side of the application.
The following functionality is provided:
Several possible actions can be taken when any of the above listed information reaches the application:
All the above events originates from WebLogic Network Gatekeeper. The events comes in form of Web Service method invocations from WebLogic Network Gatekeeper to the end-point of the server-side of the application. The endpoint of the server-side application is defined off-line. The end-point details must be communicated to the service provider.
For more information on implementing Web Services, see Server-side Web Services using XML based RPC and Example: Server-side Web Service.
This API contains Web Services methods for sending SMS:es.
The following functionality is provided:
This API contains Web Services methods for getting notifications on new incoming SMSes.
It is a listener interface, which is implemented on the server-side of the application.
The following functionality is provided:
All the above events originates from WebLogic Network Gatekeeper. The events comes in form of Web Service method invocations from WebLogic Network Gatekeeper to the end-point of the server-side of the application. The endpoint of the server-side application is defined off-line. The end-point details must be communicated to the service provider.
For more information on implementing Web Services, see Server-side Web Services using XML based RPC and Example: Server-side Web Service.
This API contains Web Services methods for fetching SMSes.
The following functionality is provided:
This API contains Web Services methods for handling sending of multimedia messages. MMS and e-mail is supported.
The following functionality is provided:
This API contains Web Services methods for fetching multimedia messages.
The following functionality is provided:
This API contains Web Services methods for getting notifications on new incoming multimedia messages.
It is a listener interface, which is implemented on the server-side of the application.
The following functionality is provided:
All the above events originates from WebLogic Network Gatekeeper. The events comes in form of Web Service method invocations from WebLogic Network Gatekeeper to the end-point of the server-side of the application. The endpoint of the server-side application is defined off-line. The end-point details must be communicated to the service provider.
For more information on implementing Web Services, see Server-side Web Services using XML based RPC and Example: Server-side Web Service.
This API contains Web Services methods for handling charging in amount units based on content.
The following functionality is provided:
This API contains Web Services methods for handling charging in volume units based on content.
The following functionality is provided:
This API contains Web Services methods for reservation of amount units based on content.
The following functionality is provided:
This API contains Web Services methods for reservation of volume units based on content.
The following functionality is provided:
This API contains Web Services methods to get the geographical position of a mobile terminal.
The following functionality is provided:
This API contains Web Services methods to get the status of a terminal, for example busy and off hook.
The following functionality is provided:
Addresses are specified as EndUserIdentifiers. This is a datatype defined by Parlay X.
The EndUserIdentifier is defined as an Uniform Resource Identifier according to Specified as a URI: [scheme]:[schemeSpecificPart] (RFC 2396, amended by RFC 2732).
Where scheme is one of the following: [tel | sip | mailto] and schemeSpecificPart is the actual address.
If the address is a telephone number, the EnduserIdentifier is as follows: "tel:+461234567"
If the address is a e-mail address, the EnduserIdentifier is as follows: "mailto:someone@somecompany.com"
If the address is a sip telephone number, the EnduserIdentifier is as follows: "sip:someone@somecompany.com"
Some datatypes, for example EndUserIdentifier, are defined by the Parlay X standard. These datatypes are defined using WSDL. Also some datatypes are enumerations of values.
Different programming languages uses different approaches for handling variables or classes of these types.
Using Java, it would look like this to define an EnduserIdentifier which holds a telephone number:
EndUserIdentifier eu = new EndUserIdentifier();
eu.setValue(new URI("tel", "4654176700"));
For a information on all datatypes, see API Description Parlay X for WebLogic Network Gatekeeper.