C H A P T E R 10 |
Subscriber API |
The Subscriber API provides access to data maintained by the Content Delivery Server. Use this API to get the data needed to create your own client application for providing subscribers with access to content managed by the Content Delivery Server.
Clients that are written in the Java programming language and located on a server with the Subscriber Portal component of the Content Delivery Server can call the Subscriber API directly. Clients written in a language other than Java, or clients that are located on a server that does not contain the Subscriber Portal must access the Subscriber API through the XML-RPC (remote procedure call) implementation.
The Subscriber API includes the following classes and interfaces that your client might use:
For additional information on these and other classes, see the HTML output of the Javadoc tool at $CDS_HOME/javadoc/subscriberapi/index.html.
This section describes general tasks that you might want your client application to perform. The class names used in this section refer to the classes that make up the Subscriber API. See Section 10.3, XML-RPC Implementation for the equivalent handler if you are accessing the Content Delivery Server data using XML-RPC.
In general, the client application that you create for your subscriber interface includes actions such as those described in the following list.
The IApiContext object describes either a specific subscriber or an anonymous subscriber. This object is used by all services to retrieve data specific to the subscriber described by the object. Typically, you would create the IApiContext object once per user session and store it in the HttpSession object. See Section 10.2.2, Example of Creating an IApiContext Object for sample code.
The services that you create depend on the tasks that you want to perform. For example, to enable a subscriber to purchase a gift for another subscriber, create an IGiftingService object. To provide a subscriber with the list of content already purchased, create an IContentService object. You must have an IApiContext object to create a service. Each service created provides data specific to the subscriber described by the IApiContext object. See Section 10.2.3, Example of Creating a Service for sample code.
For example, if you created an IContentService, call getCampaigns() to get the list of campaigns available to the subscriber or getPurchases() to get the list of items that the subscriber has already purchased.
The classes for the Subscriber API are in the package com.sun.content.server.subscriberapi. This package is included in the subscriberportal.jar file in one of the following locations:
deployment-name is the name specified when the Catalog Manager was deployed, server-domain is the value specified in the deployment configuration file for the app.server.domain property and server-name is the value specified in the deployment configuration file for the app.server.name property.
If your client application is a Java application, create your client using the Subscriber API classes in the subscriberportal.jar file. This JAR file must be in your classpath when you compile your application.
To execute, place the JAR file that contains your client in the same $CDS_HOME/deployment/deployment-name/.../lib directory that contains the subscriberportal.jar file. Your client must run within the same web application structure as the Subscriber Portal provided with the Content Delivery Server. Stand-alone Java applications are not supported.
If your client is not a Java application or will not be located on the same server as the Subscriber Portal, see Section 10.3, XML-RPC Implementation for information on accessing the Subscriber API through XML-RPC.
A transaction occurs each time you create an instance of a service and call its methods to perform a task. Your application must manage the transactions with the Content Delivery Server as described in the following steps:
1. Before a service is invoked, call ApiUtil.initTransaction() to indicate the start of a transaction.
2. If the transaction completes successfully, call ApiUtil.commitTransaction() to commit the work done. If an error occurs during the transaction, call ApiUtil.rollbackTransaction() to terminate the work and restore the data to its previous state.
3. The transaction resources must be released in a finally block that calls ApiUtil.disposeTransaction().
See the code examples in Section 10.2.2, Example of Creating an IApiContext Object and Section 10.2.3, Example of Creating a Service for sample implementations.
The following code excerpt shows how to create an IApiContext object.
The following code excerpt shows how to create a Content Service and use that service to purchase content.
If your client is not a Java application or is not running on the server with Content Delivery Server, your client must communicate with the Content Delivery Server using XML-RPC. XML-RPC enables your client to make remote procedure calls using HTTP for the transport and XML for data encoding. You can use XML-RPC with many different programming languages by using bindings available on the Internet. All of the functionality of the Subscriber API is available through XML-RPC.
Note - A tutorial on XML-RPC is beyond the scope of this document. Information on writing applications that use XML-RPC is available from various web sites on the Internet. |
To obtain data from the Content Delivery Server, your client must be able to communicate with the Content Delivery Server. Work with your network administrator to ensure that the client can contact the Content Delivery Server and that any required proxy or firewall is configured to allow this access.
In addition, the Content Delivery Server must recognize that your client is authorized to make requests for data. The subscriberApi.xml-rpc.trustedHosts property in the $CDS_HOME/deployment/deployment-name/conf/SubscriberPortal.properties file contains the list of hosts from which requests are accepted.
Set the subscriberApi.xml-rpc.trustedHosts property to the host name or IP address of the host on which your client is located, whether it is on the same host as the Content Delivery Server or on a different host. To accept requests from any host, leave the value blank. To accept requests from more than one host, separate the host names or IP addresses with a comma, for example:
subscriberApi.xml-rpc.trustedHosts=127.0.0.1,localhost
The general flow of your application (see Section 10.1, General Process Flow) is the same whether you access the Subscriber API directly or through XML-RPC. Handlers in the XML-RPC implementation perform the same functions as the Subscriber API services. Each handler and its corresponding service have equivalent methods with equivalent parameters.
The following topics are presented in this section:
Use the following guidelines to code your calls to the handlers. The sample code is written in the Java programming language.
The following sections describe the handlers that you can use. Examples are provided in Section 10.3.3, Examples of Using Handlers.
AuthenticationHandler is equivalent to the APIContextFactory class. This handler creates the object that contains the characteristics of the subscriber. The guidelines for calling a method in a handler are described in Section 10.3.2.1, Guidelines for Calls to XML-RPC Methods. To call a method, concatenate the name of the handler with the name of the method, for example:
AuthenticationHandler.getApiContext
The following table describes the AuthenticationHandler methods.
Authenticate the subscriber based on the information provided and create an APIContext object that contains the information for that subscriber. |
|||
1 In addition to the objects listed, all methods return a response_code and, if an error occurs, a response_message. |
CategoryHandler is equivalent to the ICategoryService interface. This handler provides access to the category tree and a subscriber's category list. The guidelines for calling a method in a handler are described in Section 10.3.2.1, Guidelines for Calls to XML-RPC Methods. To call a method, concatenate the name of the handler with the name of the method, for example:
CategoryHandler.getCategory
The following table describes the CategoryHandler methods.
Get an entire branch of the category tree beginning with the category specified in categoryId. To get the entire tree, specify the root category. |
|||
For the category specified in categoryId, get the list of subcategories that contain the type of content listed in contentTypeIdList with a status listed in statusList. If contentTypeIdList is not provided, all content types are considered. If statusList is not provided, all statuses are considered. |
apiContext, categoryId, contentTypeIdList (optional), statusList (optional), includeContentCount |
||
For the category specified in categoryId, get the list of all subcategories. |
|||
Hide the categories specified in categoryIds that the subscriber has chosen to not view and return the updated list. |
|||
Move each category specified in categoryIds down one position below the next active category and return the updated list. |
|||
Move each category specified in categoryIds up one position above the next active category and return the updated list. |
|||
Show the categories specified in categoryIds that the subscriber has selected and return the updated list. |
|||
Update the information in the database for the categories in categoryList. |
|||
1 In addition to the objects listed, all methods return a response_code and, if an error occurs, a response_message. 2 This method changes the category list held in memory. To make the changes permanent, you must call updateCategories. |
ContentHandler is equivalent to the IContentService interface. This handler provides access to the content for browsing, searching, retrieving, and purchasing. The guidelines for calling a method in a handler are described in Section 10.3.2.1, Guidelines for Calls to XML-RPC Methods. To call a method, concatenate the name of the handler with the name of the method, for example:
ContentHandler.browseContent
The following table describes the ContentHandler methods.
Add an item of content to the subscriber's list of bookmarked content. |
|||
Get the number of items specified in numberToReturn in the category specified in categoryId that are of the types specified in contentTypeIdList. If contentTypeIdList is not provided, all content types are included. |
apiContext, categoryId, contentTypeIdList (optional), startIndex, numberToReturn |
||
Delete an item of content from the subscriber's list of bookmarked content. |
|||
Get the information for a campaign that is associated with the coupon specified. Call this method if the subscriber is anonymous. |
|||
Get the information for a campaign that is associated with the coupon specified. Call this method if the subscriber is known. |
|||
Get the list of campaigns that are available to the subscriber. |
|||
Get the content ID for a specific edition of the content identified by contentId. |
|||
Get the content ID for a specific edition of the content identified by contentKeyword. |
|||
apiContext, contentId, campaignId (optional), bundleId (specify only if the content is part of a bundle), isSkipTrial, filter |
|||
Get an empty criteria object, which can be used for methods that accept criteria as a parameter. |
|||
Get the information for each item of content specified in contentIdList. |
|||
Get the list of bundles purchased by the subscriber that contain the item of content specified in contentId. |
|||
Get the purchase ticket for the content identified by contentId. |
|||
Determine if the content specified in contentId is in the campaign specified in campaignId. |
|||
Determine if the content can be pushed to the device using MMS. |
|||
Determine if the content can be pushed to the device using SMS. |
|||
Purchase content that is part of a campaign. Not available for anonymous subscribers. |
apiContext, contentId, campaignId (optional), isSkipTrial |
||
Send content to a subscriber. Content must first be purchased. |
|||
Get the list of content that matches the search criteria. The category tree is searched beginning with the category specified in categoryId. To search all content, specify the root category (see the getRootCategory method in CategoryHandler.) |
contentTypeIdList (optional), keyword, startIndex, numberToReturn |
||
1 In addition to the objects listed, all methods return a response_code and, if an error occurs, a response_message. |
DownloadHandler is equivalent to the IDownloadService interface. This handler provides access to the descriptors needed to download content. The guidelines for calling a method in a handler are described in Section 10.3.2.1, Guidelines for Calls to XML-RPC Methods. To call a method, concatenate the name of the handler with the name of the method, for example:
DownloadHandler.downloadConfirm
The following table describes the DownloadHandler methods.
Download the binary file for the item of content specified by contentId. |
|||
Create a content descriptor file and return it to the caller. |
|||
Create a Java Application Descriptor (JAD) file and return it to the caller. |
|||
Create an application descriptor file for an iAppli application and return it to the caller. |
|||
Push content identified by codedTicket to the device using MMS. |
|||
apiContext, mobileId, contentBinary, mimeType, contentType, smsParams |
|||
Push content identified by codedTicket to the device using SMS. |
|||
1 In addition to the objects listed, all methods return a response_code and, if an error occurs, a response_message. |
GiftingHandler is equivalent to the IGiftingService interface. This handler enables gifts or notifications about content to be sent to another subscriber. The guidelines for calling a method in a handler are described in Section 10.3.2.1, Guidelines for Calls to XML-RPC Methods. To call a method, concatenate the name of the handler with the name of the method, for example:
GiftingHandler.createGifting
The following table describes the GiftingHandler methods.
Get the information for all of the gifts given by the subscriber. |
|||
Get the information for all of the gifts received by the subscriber. |
|||
Purchase an item of content as a gift for another subscriber. |
apiContext, contentId, campaignId (optional), recipientApiContext, message, giftedDownloads, giftedSubscriptions |
||
Determine if the recipient claimed all of the uses provided by the gift. |
|||
Send a message about an item of content to another subscriber. |
|||
1 In addition to the objects listed, all methods return a response_code and, if an error occurs, a response_message. |
MessageHandler is equivalent to the IMessageService interface. This handler enables email, SMS, WAP push, and MMS messages to be sent to the current subscriber or to another subscriber. The guidelines for calling a method in a handler are described in Section 10.3.2.1, Guidelines for Calls to XML-RPC Methods. To call a method, concatenate the name of the handler with the name of the method, for example:
MessageHandler.sendMessageToSelf
The following table describes the MessageHandler methods.
Send a message to the number specified by the mobile ID provided. |
apiContext, subject, message, url, mobileId, contentId, messageCategory |
||
apiContext, messageType, subject, message, url, contentId, messageCategory |
|||
Send a message to the subscriber identified by the subscriber ID provided. |
apiContext, messageType, subject, message, url, subscriberId, contentId, messageCategory |
||
Send a message to the subscriber identified by the user name provided. |
apiContext, messageType, subject, message, url, username, contentId, messageCategory |
||
apiContext, mobileId, contentBinary, name, contentType, mimeType, subject, message, modelId, contentId, messageCategory |
|||
1 In addition to the objects listed, all methods return a response_code and, if an error occurs, a response_message. |
SystemHandler is equivalent to the ISystemService interface. This handler provides access to system-level data such as content types, locales, and models. The guidelines for calling a method in a handler are described in Section 10.3.2.1, Guidelines for Calls to XML-RPC Methods. To call a method, concatenate the name of the handler with the name of the method, for example:
SystemHandler.getContentTypes
The following table describes the SystemHandler methods.
Create a ticket for a subscriber to use to retrieve an item of content. |
|||
Get a list of all of the content types that are defined in the Content Delivery Server. |
|||
Get a list of all of the countries that are included in the Content Delivery Server. |
|||
Get a list of all of the locales included in the Content Delivery Server. |
|||
Get the names of all of the device manufacturers included in the Content Delivery Server. |
|||
Get the internal ID for the device associated with the user agent specified in modelId. |
|||
Get a list of all of the devices supported by the Content Delivery Server. |
|||
Get the models in the Content Delivery Server for a given manufacturer. Only models that are not quarantined are returned. |
|||
Determine if the ticket for an item of content can be used by the subscriber. |
|||
Send the system event specified in eventType. Note: This method is deprecated. The functionality is no longer required. |
apiContext, subscriberId, mobileId, contentId (optional), eventType |
||
1 In addition to the objects listed, all methods return a response_code and, if an error occurs, a response_message. |
UserHandler is equivalent to the IUserService interface. This handler provides access to information on subscribers and enables new subscriber accounts to be created. The guidelines for calling a method in a handler are described in Section 10.3.2.1, Guidelines for Calls to XML-RPC Methods. To call a method, concatenate the name of the handler with the name of the method, for example:
UserHandler.getSubscriberId
The following table describes the UserHandler methods.
Disable the account for the subscriber identified by the subscriber ID. |
|||
Disable the account for the subscriber identified by the user name. |
|||
Get the subscriber ID for the subscriber identified by the user name. |
|||
Get the information for the subscriber identified by the subscriber ID. |
|||
Get the information for the subscriber identified by the user name. |
|||
Populate a subscriber account in the Content Delivery Server with information from an external subscriber database. |
|||
Set the password for the subscriber identified by the subscriber ID to a value generated by the system. |
|||
Set the password for the subscriber identified by the user name to a value generated by the system. |
|||
Change the model ID to match the new device that the subscriber is using. |
|||
Set the preferences selected by a subscriber. These preferences manage the information that is shown to the user. |
|||
Create a subscriber account in the Content Delivery Server and in any external subscriber database. |
apiContext, username, password, modelId, mobileId, uniqueId, localeCode |
||
Create a subscriber account in the Content Delivery Server and in any external subscriber database and set the information and preferences for that subscriber. |
apiContext, username, password, modelId, mobileId, uniqueId, localeCode, propertyList, preferenceList |
||
1 In addition to the objects listed, all methods return a response_code and, if an error occurs, a response_message. |
The following table describes the parameters for the methods. Container objects such as Hashtable and Vector contain elements that are also described in the table.
Container for the information about a subscriber. This container includes the following items:
Note: For an anonymous subscriber, only subscriberId, localeCode, and modelId are included. |
||
Internal ID that was assigned by the Content Delivery Server to an individual item in a bundle. |
||
Internal ID that was assigned by the Content Delivery Server to the bundle with which you are working. |
||
Container for the information about a campaign. This container includes the following items: |
||
Percentage by which the items in the campaign are discounted. |
||
Date that the campaign expires. If the campaign is expired, null is returned. |
||
Internal ID that was assigned by the Content Delivery Server to the campaign with which you are working. |
||
Vector, elements of type campaign |
||
Promotional message included in the notifications sent to subscribers to announce the campaign. |
||
Subject added to email notifications sent to subscribers to announce the campaign. |
||
Container for information about a category. This container includes the following items:
|
||
Internal ID that was assigned by the Content Delivery Server to the category with which you are working. |
||
List of category IDs. Categories are identified by the internal ID that was assigned by the Content Delivery Server. |
||
Vector, elements of type category |
||
String that identifies the purchase ticket for the download request. |
||
Container for the information about an item of content. This container includes the following items:
|
||
Internal ID that was assigned by the Content Delivery Server to the item of content with which you are working. |
||
Vector, elements of type contentId |
||
Keyword used to identify content, typically used for content delivered directly to a device using SMS. |
||
Vector, elements of type contentSummary |
||
Container for summary information about an item of content. This container includes the following items: |
||
Type of content with which you are working. This type must be one of the content types defined in the contentTypeList. |
||
List of content type IDs. Content types are identified by the internal ID that was assigned by the Content Delivery Server. |
||
Information about each content type defined in the Content Delivery Server. Each element contains the following items: |
||
Container for information about a country. This container includes the following items: |
||
Two-character ISO code that represents the subscriber's country, for example, US. |
||
Vector, elements of type country |
||
String that identifies the coupon that the subscriber is using to purchase content. |
||
Container for information about an item of content. This container includes the following items:
|
||
Type of delivery used to deliver content. The following values are valid: |
||
Description of the object. Depending on the method called, this is the description of the category, the campaign, the device, or the locale. |
||
Content descriptor binary code. When returned by the downloadContent method of DownloadHandler, this is the binary preview file. |
||
Position of the category in the list of categories. 1 indicates the top of the list. |
||
Estimated time that it takes to download the content. Each element corresponds to an element in the networks object to indicate the estimated time that the download takes over the corresponding type of network. |
||
Type of event with which you are working. Use sms_request_for_content to indicate that the event is a request for information about an item of content. |
||
Container for Boolean flags that indicate the type of information to return. Information of the type associated with each flag is returned only if the flag is included in the hash table and is set to true. The following flags are valid when working with ContentHandler:
The following flags are valid when working with GiftHandler: |
||
Subscriber's gender. Valid values and what each value indicates are described in the following list: |
||
Internal ID that is assigned by the Content Delivery Server to the gift with which you are working. |
||
Container for information about a gift. This container contains the following items: |
||
Flag that indicates if the content provided by the gift exists on the target device. True indicates that the content is on the device. False indicates that the content is not on the device. |
||
Vector, elements of type gifting |
||
Subscriber ID for the subscriber who is the recipient of a gift. |
||
Mobile ID for the subscriber who is the recipient of a gift. |
||
Model ID of the device for the subscriber who is the recipient of a gift |
||
Status of a gift. Valid values and what each value indicates are described in the following list: |
||
Internal object used to validate that the subscriber can access the gift. |
||
Flag that indicates if a subscriber has purchased content. True indicates that the subscriber has purchased content. False indicates that the subscriber has not purchased content. |
||
Internal ID that was assigned by the Content Delivery Server to the locale, or the content type, that you are working with. |
||
Flag that indicates if the number of items in a category is calculated. True indicates that the number is calculated. False indicates that the number is be calculated. |
||
When included in the category object, this flag indicates if the category is shown to the subscriber. True indicates that the category is shown. False indicates that the category is not shown. When included in the content object, this flag indicates if the content is active. True indicates that the content is active. False indicates that the content is inactive. |
||
Flag that indicates if the subscriber is anonymous. True indicates that the subscriber is anonymous. False indicates that the subscriber is known. |
||
Flag that indicates if the subscriber has bookmarked the content. True indicates that content is bookmarked. False indicates that the content is not bookmarked. |
||
Flag that indicates if the subscriber has customized the categories that are shown. True indicates that the categories are customized. False indicates that the categories are not customized. |
||
Flag that indicates if the item of content is included in a campaign. True indicates that the item is in the campaign. False indicates that the item is not in the campaign. |
||
Flag that indicates if the device is the default device. True indicates that the device is the default device. False indicates that the device is not the default device. |
||
Flag that indicates if content has been downloaded. True indicates that an item of content has been downloaded. False indicates that an item of content has not been downloaded. |
||
Flag that indicates if the subscriber is automatically charged for additional downloads after the number of purchased downloads is exceeded. True indicates that renewal is automatic. False indicates that the subscriber must manually purchase additional downloads. |
||
Flag that indicates if the content is free. True indicates that the content is free. False indicates that the content must be purchased. |
||
Flag that indicates if the gift is expired. True indicates that the gift is expired and can no longer be claimed. False indicates that the gift is not expired. |
||
Flag that indicates if all of the uses purchased for the gift were used by the recipient. True indicates that all of the uses that were purchased are used. False indicates that not all of the uses that were purchased are used. |
||
Flag that indicates if the category has any subcategories. True indicates that the category does not have subcategories. False indicates that the category has subcategories. |
||
Flag that indicates if the content can be sent to the device using MMS. True indicates that MMS can be used. False indicates that MMS cannot be used. |
||
Flag that indicates if an item of content is on a subscriber's device. True indicates that the item is on the device. False indicates that the item is not on the device. |
||
Flag that indicates if one-step or two-step download is used. True indicates that it is a one-step download. False indicates that it is a two-step download. |
||
Flag that indicates if an entry for the subscriber exists in the Content Delivery Server database. True indicates that an entry does exist. False indicates that the subscriber is anonymous. |
||
Flag that indicates if the content must be purchased before being downloaded. True indicates that the content must be purchased first. False indicates that content can be downloaded. |
||
Flag that indicates if the device is push enabled. True indicates that the device is push enabled. False indicates that the device is not push enabled. |
||
Flag that indicates if the subscriber is registered in an external subscriber database. True indicates that the subscriber is registered. False indicates that the subscriber is not registered. |
||
Flag that indicates if the subscriber chooses to skip the trial usage. True indicates that the subscriber chooses to skip the trial usage so the content can be purchased immediately. False indicates that the subscriber chooses not to skip the trial usage. |
||
Flag that indicates if the content can be sent to the device using SMS. True indicates that SMS can be used. False indicates that SMS cannot be used. |
||
Flag that indicates if the subscription has expired. True indicates that the subscription is expired. False indicates that the subscription is not expired. |
||
Flag that indicates if the subscription is automatically renewed. True indicates that renewal is automatic. False indicates that the subscriber must manually renew the subscription. |
||
Flag that indicates if the subscriber can use the ticket to get an item of content. True indicates that the subscriber can use the ticket. False indicates that the subscriber cannot use the ticket. |
||
Flag that indicates if the content can be used on a trial basis. True indicates that a trial is available. False indicates that no trial is available. |
||
Flag that indicates an update is available for the content. True indicates that an update is available. False indicates that an update is not available. |
||
Flag that indicates if a subscription for the content can be canceled. True indicates that the subscription can be canceled. False indicates that there is no subscription or that the subscription cannot be canceled. |
||
Flag that indicates if a subscriber has used the content for the number of uses purchased. True indicates that all purchased uses are used. False indicates that not all purchased uses are used. |
||
Flag that indicates if the content can be run on the model that the subscriber is using. True indicates that the content does run on the model. False indicates that the content does not run on the model. |
||
Two-character ISO code that represents the subscriber's language, for example, en. |
||
Type of license associated with the content. Valid values and what each value indicates are described in the following list: |
||
Together with listStart, specifies the range of items to return. The alphabetized list ends with items that match the string specified. The string is case sensitive. Specify null to end at the end of the complete list. |
||
Together with listEnd, specifies the range of items to return. The alphabetized list begins with items that match the string specified. The string is case sensitive. Specify null to start at the beginning of the complete list. |
||
Container for locale information. This container contains the following items: |
||
String that represents the subscriber's locale, for example, en_US. |
||
Vector, elements of type locale |
||
Vector, elements of type manufacturer |
||
Maximum number of items to deliver in a call. If more items exist than the number specified, no content is sent. To deliver all items, use -1. |
||
Category of message to be sent. Categories one through seven are sent to the subscriber, category 9 is sent to the Catalog Manager administrator. Valid values and what each value indicates are described in the following list:
|
||
Type of message to send. Valid values and what each value indicates are described in the following list: |
||
Container for device information. This container includes the following items: |
||
Internal ID that was assigned by the Content Delivery Server to the device that you are working with. |
||
Vector, elements of type model |
||
Name of the object. Depending on the method, this is the name of the category, the country, the campaign, the device, or the content. |
||
List of network types that are known by the Content Delivery Server. Each element corresponds to an element in the downloadTimes Vector to indicate the estimated time that the download takes for the corresponding network. |
||
Indicates if the subscriber wants to be notified about promotions. True indicates that the subscriber wants to be notified. False indicates that the subscriber does not want to be notified. |
||
Total number of times that the content was downloaded by all subscribers. |
||
Number of items to return in a list. To return all items, specify -1. |
||
Internal ID that was assigned by the Content Delivery Server to the category that is the parent of the category that you are working with. |
||
Unencrypted password for the subscriber. Encryption is performed by the Content Delivery Server. |
||
Flag that indicates if the subscriber's password must be reset when the subscriber logs in. True indicates that the password must be reset. False indicates that the password does not need to be reset. |
||
Container for a subscriber's preferences. This container includes items of type notifyPromotions. To delete a preference, set the value to the empty string (`'). |
||
Container for pricing information for an item of content. This container includes the following items: |
||
Information about each subscriber. Each element contains the following items: |
||
Set of name-value pairs used to configure system behavior. These values are internal values used by the Content Delivery Server. |
||
Information about each item purchased by the subscriber. Each element contains the following items: |
||
Container for the information about the recipient of a gift. This container includes the following items: |
||
Container for the HTTP headers associated with an HTTP request. |
||
Container for key-value pairs that provide information about an event. The following keys must be included:
Additional keys that your system recognizes can also be included. |
||
Code that indicates if the method executed successfully. 1 indicates successful completion. -1 indicates an error occurred. |
||
Role assigned to the subscriber. Valid values and what each value indicates are described in the following list: |
||
Container for the criteria used to filter the results of a content search. This container includes the following items: |
||
Container for parameters required to push binary content to a device. The entries in the hash table are pairs of strings that identify the name and value of each parameter needed. |
||
The position in a list of items at which to begin processing. |
||
Confirm status string returned by the device. For possible values returned by MIDP applications, see http://www.jcp.org/jsr/detail/118.jsp. |
||
List of content statuses. Valid values and what each value indicates are described in the following list:
|
||
Vector, elements of type category |
||
Internal ID that was assigned by the Content Delivery Server to the subscriber account. |
||
Period of time covered by a subscription. Valid values are daily, weekly, monthly, and yearly. |
||
Internal object used to validate that the subscriber can access the content requested. |
||
Number of times the content can be used for free before the subscriber is prompted to purchase. |
||
User agent for a device. This string is the exact string that was returned in the HTTP header. |
||
User agent for a device. This string is a regular expression, which is a pattern that can match various text strings. |
||
Flag that indicates that the content was sent to the device using SMS. True indicates that SMS was used. False indicates that SMS was not used. |
This section presents two examples of using the XML-RPC implementation of the Subscriber API.
The following code excerpt shows how to create an ApiContext Object. This sample uses the bindings for the Java programming language.
The following code excerpt shows how to create a handler and use that handler to purchase content. This sample uses the bindings for the Java programming language.
Copyright © 2005, Sun Microsystems, Inc. All Rights Reserved.