This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
GSM Association Confidential Information
document.doc Page 1 of 25
ACCESS Doc 12_010
Subscriber Profile Web Service API Tutorial
Meeting Information
Meeting Name and Number ACCESS#12
Date 16 December 2008
Location London
Document Information
Document Author(s) Anders Lundqvist, Oracle
Document Creation Date 15 December 2008
Approval
This document is for: Discussion X
Information only
Security Classification
Confidential GSMA Full Members X
Confidential GSMA Group Members X
Document SummaryThis document contains the tutorial for Subscriber Profile Web Service.
GSMA 3rd Party AccessSubscriber Profile Web Service API Tutorial
document.doc Page 2 of 25
GSM Association Confidential Information
1 SCOPE..........................................................................................................51.1 WHO SHOULD USE THIS TUTORIAL? 51.2 DEPENDENCIES AND PREREQUISITES 5
2 SUBSCRIBER PROFILE WEB SERVICE ACCESS API OVERVIEW.........62.1 EXAMPLE USE CASES 62.2 SUBSCRIBER PROFILE API 62.2.1 Bindings................................................................................................................62.2.2 Method Summary: getProfile()..............................................................................62.2.3 Method Summary: setProfile()..............................................................................72.2.4 Method Summary: getProfileProperty()................................................................82.2.5 Method Summary: setProfileProperty()................................................................9
4 WORKFLOW..............................................................................................124.1 VERIFICATION PROCESS 124.2 SANDBOX TEST ENVIRONMENT 124.3 ACCESSING THE LIVE MESSAGING SERVICES 13
1. GSMA 3rd Party Access Project, https://gsma.securespsite.com/access/entry/default.aspx
2. GSMA TWS Developer Portal, <insert url>
3. Open Mobile Alliance, www.openmobilealliance.org
4. Java, java.sun.com
5. Eclipse IDE, www.eclipse.org
6. Apache Axis, ws.apache.org/axis
Terms and Abbreviations
API Application Programming Interface
GSM Global System for Mobile communications
GSMA GSM Association
MDN Mobile Directory Number
Parlay An industry consortium seeking to develop a common application interface for telecommunications. Note: when used to refer to APIs ‘Parlay’ refers to the base APIs defined by the former Parlay Group now part of Open Mobile Alliance. For more information go to the OMA Web site [ref 3].
Parlay X A set of telecommunications Web services defined by the former Parlay Group now part of Open Mobile Alliance. For more information go to the OMA Web site [ref 3].
1 ScopeThis tutorial details the GSMA Access API definition for the Subscriber Profile Web Service. It provides an overview of the API, the WSDL for the service, information on how to use the API including sample code, and also the verification and access workflow.
GSMA Access is an initiative to provide a standard API to allow mobile (and other network) operators to expose useful network information and capabilities to Web application developers. It aims to reduce the effort and time needed to create applications and content that is portable across mobile operators.
The GSMA Access API is intended to complement existing client- and server-side APIs by providing the missing piece: access to network capabilities and information regardless of operator.
For a full list of APIs please got to the GSMA 3 rd Party Access Project website [ref 1].
1.1 Who should use this tutorial?
The intended audience is Web application developers wishing to access the subscriber profile capabilities exposed by mobile operators via a common lightweight API; the GSMA Access API.
1.2 Dependencies and Prerequisites
The consumer of this API must be authenticated according to the GSMA 3rd Party Access API authentication process. Please see the authentication section of the “Start using the APIs” <insert link to relevant page>.
To gain verification and access to both sandbox subscriber profile services, the user must register at the GSMA TWS Developer Portal. Go to <insert link to GSMA TWS Developer Portal> [ref 2] and register as follows. To access live networks <TBD need to be defined>:
Click on the Register tab, fill in your details and click Submit.
A confirmation screen will appear, if the details are correct, click Submit, if not click Edit and update as necessary.
An email will be sent to your email address to verify your registration. Click on the link in the email to validate your email address. You will receive an email saying that the account is pending.
Once the email is validated you will receive a further email and also an SMS stating that you can log in using the username and password you registered.
Go to the portal and click on the Login link in the top right-hand corner. Enter your username and password.
2 Subscriber Profile Web Service Access API OverviewThe Subscriber Profile Web Service Access API is provided to allow applications to read and optionally update data in Subscriber Profiles within an operator. Typical cases are to validate that a Subscriber is adult or not roaming.
2.1 Example Use Cases
1. Age ValidationAlice like to look at a Mobile TV show for adults containing horrifying scenes. The provider uses the subscriber profile API to check that Alice owing the subscription is adult.
2. Commercial messageA provider of information to Opt In customers used MMS and SMS for the delivery. In the case a subscriber is in the home network MMS is used but if the subscriber is roaming SMS is used avoiding extra charges. The service provider used Subscriber Profile to chec if the subscriber is roaming before pushing the message.
3. Validation of identity and paymentService Provider are selling goods to a Subscriber, using the Phone number to send invoice. Service Provider validates that Subscriber address is know and validated and that there has not been any previous invoice issues.
4. MoodService Providers can read and set the mood of the subscriber. Typically can a Subscriber via a Service Provider or portal change the mood. Other Service Providers can read the current mood via the Subscriber Profile and use that to send specific messages or to avoid. Moods can be typically: Happy, Sad, Alone, Going for Party, Open for contact, Like to be alone, etc.
2.2 Subscriber Profile API
The Subscriber Profile API allows you to get and optionally set Subscriber Profile data. The getProfile(), setProfile(), getProfileProperty() and setProfileProperty() services are based on ideas created for the Parlay X standard [ref 3], but so far not standardized. The used set of methods are a subset of that proposed standard's functionality.
2.2.1 Bindings
This tutorial is for the Subscriber Profile Web Services API, no RESTful API is planned for Subscriber Profile
2.2.2 Method Summary: getProfile()
The getProfile() method is used to read all data in a specific Subscriber Profile that the calling Service Provider as access rights for. A successful request results in a set of property attributes being returned.
.
Request: getProfileThe input message is derived from the proposed Parlay X standard definition.
Parameter Name Type Optional DescriptionsubscriberID xsd:string Mandatory Defines the Subscriber identity. This is a string field
and is dependent of the operator/country. Typically this
document.doc Page 6 of 25
GSM Association Confidential Information
can be a tel URI (IETF RFC 3966). ProfileID xsd:string Mandatory Defines which profile to read for the defined
Subscriber. This is a string and the profile names are depending on the operator.
Response: getProfileThe output message adheres to the proposed Parlay X standard.
Parameter Name
Type Optional Description
Result parlayx_sub_profile_xsd:PropertyTuple
Mandatory The result contain one property name and it’s corresponding value. The response can contain 1 or more resulting value tuples.
Error returns
Service Exceptions from ES 202 391-1 [2]:
SVC0001: Service error. Returned as a generic service error, typically that the service has
intermittent problems. Request can be retried again after some short period of time.
SVC0002: Invalid input value. There is a problem with the formatting of the SubscriberID or ProfileID.
SVC9903: Nonexistent subscriber profile. The profile or the subscriber identity does not exist.
PolicyException from ES 202 391-1 [2]:
POL0001: Policy error. The policy error is returned if the request breaches any SLA like too many
requests. POL0002: Privacy error.
The privacy error is returned if a Subscriber or Subscriber profile is requested by the Service Provider that it doesn’t have rights to read, e.g. a Subscriber that has opted out the usage of his/her data.
2.2.3 Method Summary: setProfile()
The setProfile() method is used to write data to a specific Subscriber Profile that the calling Service Provider as write access rights for. A successful request results in that the properties are changed and an empty message is returned.
Request: setProfile (Optional)The input message is derived from the proposed Parlay X standard definition.
Parameter Name Type Optional DescriptionsubscriberID xsd:string Mandatory Defines the Subscriber identity. This is a string field
and is dependent of the operator/country. Typically this can be a tel URI (IETF RFC 3966).
ProfileID xsd:string Mandatory Defines which profile to set properties in for the defined Subscriber. This is a string and the profile names are depending on the operator.
Properties parlayx_sub_prof Mandatory The properties and the corresponding values to set in
document.doc Page 7 of 25
GSM Association Confidential Information
ile_xsd:PropertyTuple
the profile as a list of Property tuples.
Response: setProfileThe output message adheres to the proposed Parlay X standard. This is an empty message containing no data. Upon any error an error exception is returned see below. The request is atomic meaning that if one value fails to be set no change will be applied to the subscriber profile.
Parameter Name
Type Optional Description
Error returns
Service Exceptions from ES 202 391-1 [2]:
SVC0001: Service error. Returned as a generic service error, typically that the service has
intermittent problems. Request can be retried again after some short period of time.
SVC0002: Invalid input value. There is a problem with the formatting of the SubscriberID or ProfileID.
SVC9903: Nonexistent subscriber profile. The profile or the subscriber identity does not exist.
PolicyException from ES 202 391-1 [2]:
POL0001: Policy error. The policy error is returned if the request breaches any SLA like too many
requests. Also returned if the service provider doesn’t have the rights to do modifications.
POL0002: Privacy error. The privacy error is returned if a Subscriber or Subscriber profile is
requested to be changed by the Service Provider that it doesn’t have rights to set, e.g. a Subscriber that has opted out the usage of his/her data.
2.2.4 Method Summary: getProfileProperty()
The getProfileProperty() method is used to read one property in a specific Subscriber Profile that the calling Service Provider as access rights for. A successful request results in the value of the property attribute being returned.
Request: getProfilePropertyThe input message is derived from the proposed Parlay X standard definition.
Parameter Name Type Optional DescriptionsubscriberID xsd:string Mandatory Defines the Subscriber identity. This is a string field
and is dependent of the operator/country. Typically this can be a tel URI (IETF RFC 3966).
ProfileID xsd:string Mandatory Defines which profile to read for the defined Subscriber. This is a string and the profile names are depending on the operator.
document.doc Page 8 of 25
GSM Association Confidential Information
propertyPathName xsd:string Mandatory The relative property path name to the property to read within the defined Subscriber Profile.
Response: getProfilePropertyThe output message adheres to the proposed Parlay X standard.
Parameter Name
Type Optional Description
result parlayx_sub_profile_xsd:PropertyTuple
Mandatory The result contain the requested property name and it’s corresponding value.
Error returns
Service Exceptions from ES 202 391-1 [2]:
SVC0001: Service error. Returned as a generic service error, typically that the service has
intermittent problems. Request can be retried again after some short period of time.
SVC0002: Invalid input value. There is a problem with the formatting of the SubscriberID or ProfileID.
SVC9903: Nonexistent subscriber profile. The profile or the subscriber identity does not exist.
SVC9905: Nonexistent property. The specific property does not exist in this Subscriber Profile
Policy Exceptions from ES 202 391-1 [2]:
POL0001: Policy error. The policy error is returned if the request breaches any SLA like too many
requests. POL0002: Privacy error.
The privacy error is returned if a Subscriber, Subscriber profile or property value is requested by the Service Provider that it doesn’t have rights to read, e.g. a Subscriber that has opted out the usage of his/her data.
2.2.5 Method Summary: setProfileProperty()
The setProfileProperty() method is used to write data for a specific property to a specific Subscriber Profile that the calling Service Provider as write access rights for. A successful request results in that the property is changed and an empty message is returned.
Request: setProfileProperty (Optional)The input message is derived from the proposed Parlay X standard definition.
Parameter Name Type Optional DescriptionsubscriberID xsd:string Mandatory Defines the Subscriber identity. This is a string field
and is dependent of the operator/country. Typically this can be a tel URI (IETF RFC 3966).
ProfileID xsd:string Mandatory Defines which profile to set properties in for the defined Subscriber. This is a string and the profile names are depending on the operator.
propertyPathName xsd:string Mandatory The relative property path name to the property to be updated within the defined Subscriber Profile.
propertyValue xsd:string Mandatory The value to set for the specified Subscriber profile
document.doc Page 9 of 25
GSM Association Confidential Information
property.
Response: setProfilePropertyThe output message adheres to the proposed Parlay X standard. This is an empty message containing no data. Upon any error an error exception is returned see below. The request is atomic meaning that if one value fails to be set no change will be applied to the subscriber profile.
Parameter Name
Type Optional Description
Error returns
Service Exceptions from ES 202 391-1 [2]:
SVC0001: Service error. Returned as a generic service error, typically that the service has
intermittent problems. Request can be retried again after some short period of time.
SVC0002: Invalid input value. There is a problem with the formatting of the SubscriberID or ProfileID.
SVC9903: Nonexistent subscriber profile. The profile or the subscriber identity does not exist.
SVC9905: Nonexistent property. The specific property does not exist in this Subscriber Profile
PolicyException from ES 202 391-1 [2]:
POL0001: Policy error. The policy error is returned if the request breaches any SLA like too many
requests. Also returned if the service provider doesn’t have the rights to do modifications.
POL0002: Privacy error. The privacy error is returned if a Subscriber or Subscriber profile is
requested to be changed by the Service Provider that it doesn’t have rights to set, e.g. a Subscriber that has opted out the usage of his/her data.
Go to the GSMA Access API Wiki and navigate to the Subscriber Profile page for more information.
These files are available for download from the GSMA TWS Developer Portal <insert link>. The content of the files is also listed in the Appendix.
document.doc Page 11 of 25
GSM Association Confidential Information
4 WorkflowIn order to gain access to the sandbox and the live messaging services the user must first perform a verification check of their application against an API Reference Implementation (RI).
4.1 Verification Process
The verification process involves running a successful test case against the RI. This is to test the integrity of the application’s use of the Access API prior to running against the test and live environments.
1. Log into the GSMA TWS Developer Portal
Once you have registered and received an email with your login details, log into the GSMA TWS Developer Portal <insert link>.
2. Retrieve the provisioned endpoint
a. Navigate to the MyDevPortal tab to view your provisioned endpoints.
b. The endpoint required for the certification process is the ONE_API_SUBSCRIBER_PROFILE URL.
3. Run the subscriberProfile verification test
a. Use the ONE_API_SUBSCRIBER_PROFILE URL in your application to access the sandbox service.
b. Within your application, populate your <TBD> request with the following data:i. <TBD> by the Sandbox
c. If the test is successful, <TBD> by the sandbox, should be returned to the application.
d. If the test is unsuccessful, check the exception thrown against the list of possible exceptions in section 5 and amend your application accordingly.
4. For support, contact <insert aepona gsma support email address>
4.2 Sandbox Test Environment
Once the verification is complete, contact <insert aepona gsma support email address> to be provided with access to the sandbox. This will allow you to run your application in a test environment.
1. Log into the GSMA TWS Developer Portal
a. Once you receive an email stating that the verification process is complete, log into the GSMA TWS Developer Portal <insert link>.
2. Retrieve the provisioned endpoint
a. Navigate to the MyDevPortal tab to view your provisioned endpoints.
b. The endpoint required for the certification process is the ONE_API_ SUBSCRIBER_PROFILE URL.
3. Test service configuration
a. The messaging service you will test against can be configured for the following:
i. <TBD> by the sand box.ii. <TBD> by the sand box.
document.doc Page 12 of 25
GSM Association Confidential Information
iii. Subscriber states to throw specific exceptions, i.e., specific Subscriber and Profile IDs can be configured to throw exceptions, for example address +447797123456 could be configured to throw a policy exception.
If you wish to have any of the above configured or for any queries during testing, please contact <insert aepona gsma support email address>.
4.3 Accessing the Live Messaging Services
Once your testing against the sandbox is complete, contact <insert aepona gsma support email address> to be provided with access to the live messaging service(s).
1. Log into the GSMA TWS Developer Portala. Once you receive an email stating that the live service is available, log into
the GSMA TWS Developer Portal <insert link>.
2. Retrieve the provisioned endpoint
a. Navigate to the MyDevPortal tab to view your provisioned endpoints.
b. The endpoint required for the certification process is the ONE_API_SUBSCRIBER_PROFILE URL.
3. Live service(s) configuration
a. The live service(s) can be configured in the same way as the test service, see point 3 above.
If you wish to have any of the above configured or for any queries using the live service, please contact <insert aepona gsma support email address>.
document.doc Page 13 of 25
GSM Association Confidential Information
5 ExceptionsSee the API descriptions in Section <TBD> above.
document.doc Page 14 of 25
GSM Association Confidential Information
6 Sample Java Application CodeA sample Java [ref 3] application is provided which demonstrates the use of the API. The application has been developed using the Eclipse IDE [ref 5]. Using Eclipse you can create Java stubs that your application will use to bind to the service and then add a mainline to call the methods on the service API. Generating the stubs is easily done using the Apache Axis WSDL-to-Java [ref 6] tool that comes packaged with Eclipse. The code for the mainline class is provided below and the full sample application can be downloaded from the GSMA TWS Developer Portal <insert link>.
/** * Get Susbcriber Profile application to retrieve a subscriber profile data * */public class GetSusbcriberInfoOneApiSampleApplication { /** The service endpoint to use for Retrieveing subscriber information */ private static final String PROFILE_ENDPOINT = "http://host:8120/GetSubscriberInformationService/services/GetSubscriberProfile/11b7cafbedc27dbe57bf5640b10808"; /** The subscriber address to get the profile data from */ private static final String SUBSCRIBER_ID = "tel:+447722"; /** The Profile to get */ private static final String PROFILE =
"Mobile"; public static void main(String[] args) { try { GetSusbcriberProfile getSubscriberProfile = new GetSubscriberProfileServiceLocator().getSusbceiberProfile(new
URL(PROFILE_ENDPOINT)); System.out.println("Attempting to retrieve Subscriber Profile for "+SUBSCRIBER_ADDRESS); PropertyTuple propertyTuple = getSubscriberProfile.
getSubscriberProfile(SUBSCRIBER_ID, PROFILE); System.out.println("Property " + propertyTuple.pathName + “ = ” + propertyTuple.propertyValue); } catch (MalformedURLException e) { System.out.println("A MalformedURLException has occurred. The endpoint URL used is invalid"); e.printStackTrace(); } catch (javax.xml.rpc.ServiceException e) { System.out.println("A javax.xml.rpc.ServiceException has occurred. Failed to send web service request using axis");
document.doc Page 15 of 25
GSM Association Confidential Information
e.printStackTrace(); } catch (MalformedURIException e) { } catch (PolicyException e) { System.out.println("A TWS policy exception has occurred. Check service log for details"); e.printStackTrace(); } catch (ServiceException e) { System.out.println("A TWS service exception has occurred. Check service log for details"); e.printStackTrace(); } catch (RemoteException e) { System.out.println("A java.rmi.RemoteException has occurred. Could not connect to TWS"); e.printStackTrace(); } } }
document.doc Page 16 of 25
GSM Association Confidential Information
7 Questions And FeedbackPlease post any questions and feedback on the GSMA 3rd Party Access Developer Portal Feedback Forum.