How the WAP Push Library Implements PAP

来源:互联网 发布:编写java程序的软件 编辑:程序博客网 时间:2024/04/29 20:14
How the WAP Push Library Implements PAP
The WAP Push Library is a Java package that encapsulates all of the XML and
multipart/related message-building functionality into a series of classes. When you
use the WAP Push Library, the implementation details of PAP are hidden. You
don’t need to know how to build a Push Submission or any other PAP operation to
use the WAP Push Library. You do need to know how PAP works so that you can
construct push messages and handle responses from the PPG, but you don’t need
to know the details of building or parsing the necessary XML or multipart/related
documents.

System Configuration Requirements
Before you attempt to send content using the WAP Push Library, make sure that
your corporate firewall allows you to send packets to the desired ports on the
PPGs you are using. The mechanisms for client addressing and the ports that the
PPG listens on are implementation specific. For specific information, check with
the PPG administrator at the communication service provider you intend to use.

PAP operations
Table 4-1 lists the WAP Push Library classes that
Table 4-1. PAP operations and WAP Push Library classes
PAP operation  WAP Push Library
Push Submission  PushMessage
Status QueryStatusQueryMessage
Push CancellationCancelMessage
 Client Capabilities Query CcqMessage

          
Push Submission Content Types
As with PAP operations, a WAP Push Library class encapsulates each Push
Submission content type. Table 4-2 lists the content types and the corresponding
WAP Push Library classes.
For descriptions of the content types, see “Push Submission Content Types” on
page 19.
NOTE Openwave is developing new Push Submission content types. Check the
Openwave Developer web site (http://developer.openwave.com) for the latest
information.
Table 4-1. PAP operations and WAP Push Library classes
PAP operation WAP Push Library class
Push Submission PushMessage
Status Query StatusQueryMessage
Push Cancellation CancelMessage
Client Capabilities Query CcqMessage
Table 4-2. Push Submission content types and WAP Push Library classes
Content type WAP Push Library class
Service IndicationServiceIndication
 Service LoadingServiceLoading
 Cache Operation CacheOperation
Custom Content CustomContent

Extracting PPG and Client Addresses from PPG Headers

You can extract the PPG and client addresses from the HTTP headers returned
with any request from the PPG.
You can use this information dynamically in WAP
Push Library applications or in other applications that are devoted to building lists
of users who visit your WAP sites. The following HTTP headers returned from the
PPG
contain this information.
• X-Up-Subno The address of the client
• X-Up-Uplink The address of the Openwave MAG, if connected
• X-Up-Wap-Push-Secure Secure (HTTPS) PPG address
• X-Up-Wap-Push-Unsecure Nonsecure (standard HTTP) PPG address



Secure Versus Nonsecure PPG Addresses
The PPG infrastructure supports both secure (HTTPS) and nonsecure (standard
HTTP) connections. The WAP Push Library supports both connection types
transparently. The only difference is the PPG address itself.
A nonsecure connection is ideally suited for initial application testing because it
does not introduce any additional complexity. A secure connection is often
desirable, but does impose some constraints in the form of server and client
certificates. There are two issues to consider:
• The server certificate is not issued by a well-known certificate authority (CA).
Server certificates from well-known CA do not generally pose any difficulties.
Certificates from other CAs must be manually added to the list of trusted
certificates on the client. This is generally true of PPG test installations. To add
the server certificate to the list of trusted certificates on the client, follow these
steps:
1 Copy the server certificate to the client machine
2 Save the server certificate to a file
3 Install the server certificate on the Java client
• The PPG is configured to require client (application) authentication, in which
case only certain push initiators have access to secure connections on the PPG.
In this case, the PPG is configured to request the client certificate during the
SSL handshake process, something not normally required during HTTPS
communication using a web browser. To satisfy the PPG request, the client
must have an appropriate client certificate installed to access the PPG using a
secure connection.
• The PPG is configured to require client (application) authentication, in which
case only certain push initiators have access to secure connections on the PPG.
In this case, the PPG is configured to request the client certificate during the
SSL handshake process, something not normally required during HTTPS
communication using a web browser. To satisfy the PPG request, the client
must have an appropriate client certificate installed to access the PPG using a
secure connection.

Multicasting
The WAP Push Library supports delivery of a single Push Submission to multiple
client addresses
. This capability, called multicasting, saves enormous time and effort
whenever you want to deliver a general message to all or part of a subscriber base.
Use the PushMessage.addAddress method to build the desired list of recipients for a
Push Submission. The Push Submission can deliver any of the available content
types as its payload.
原创粉丝点击