C H A P T E R 7 |
WAP Gateway API |
This chapter describes the Sun Java System Content Delivery Server WAP Gateway API. This API retrieves the MSISDN, device profile, and other attributes from the HTTP header. Authentication based on user and password is not required with WAP gateway integration.
FIGURE 7-1 is a simplified representation of the general system components that interact with this API and the access point for it. It also includes additional components that do not interact with this API, but are necessary for an overall understanding of the architecture.
The WAP Gateway adapter parses the HTTP header from a specific WAP Gateway and obtains the MSISDN.
For information on classes or methods not described in this section, see the HTML output of the Javadoc tool for the WAP Gateway API at $CDS_HOME/javadoc/cdsapi/index.html.
The public abstract WAPGatewayAdapter class defines the methods to get the MSISDN and unique device ID from the HTTP header. It also defines a method to check if this method is supported or implemented.
For information on methods not described in this section, see the HTML output of the Javadoc tool for the WAP Gateway API at $CDS_HOME/javadoc/cdsapi/index.html.
public abstract boolean doHandle(String method)throws WAPGatewayException
Returns true if method is implemented, and returns false if method is not implemented. This method is used to determine if the other methods for this class are implemented.
public abstract String getMSISDN(HttpServletRequest request) throws WAPGatewayException
Returns the MSISDN as a string after parsing the HTTP header.
public abstract String getUniqueId(HttpServletRequest request) throws WAPGatewayException
Returns the unique device ID as a string after parsing the HTTP header.
The Content Delivery Server provides an API implementation for the following WAP Gateways.
A WAP gateway must be configured to forward the MSISDN or the unique device ID to the Content Delivery Server. WAPGatewayManager and WAPGatewayAdapter classes are available in cdsapi.jar, which is in the $CDS_HOME/deployment/deployment-name/lib/cdslib directory. To register a new class that extends the WAPGatewayAdapter class for any other WAP gateway, add the class file name to the wapgateway.config file inside the $CDS_HOME/deployment/deployment-name/conf directory. The following statement is an example of how to register an adapter for Nokia Activ Server 2.0.1 with the Content Delivery Server.
Place your adapter in the $CDS_HOME/deployment/deployment-name/lib/external directory so that the Content Delivery Server can find the file during execution.
The following code example shows the pseudo code for an adapter for Nokia Activ Server that extends WAPGatewayAdapter class.
Copyright © 2005, Sun Microsystems, Inc. All Rights Reserved.