com.sun.identity.liberty.ws.paos
Class PAOSRequest

java.lang.Object
  |
  +--com.sun.identity.liberty.ws.paos.PAOSRequest

public class PAOSRequest
extends java.lang.Object

The PAOSRequest class is used by a web application on HTTP server side to construct a PAOS request message and send it via an HTTP response to the user agent side. This class can be used in conjunction with either the Personal Profile Client API or other service APIs. These two different cases would use different constructors, and different get methods for original queries.


Constructor Summary
PAOSRequest(java.lang.String originalURL, java.lang.String service, java.lang.String responseConsumerURL, java.util.List soapBodies)
          This constructor composes the request message based on the input parameters.
PAOSRequest(java.lang.String originalURL, java.lang.String service, java.lang.String responseConsumerURL, java.lang.String[] queryItems)
          This constructor composes the request message based on the input parameters.
 
Method Summary
 java.lang.String getMessageID()
          Returns the message ID value used inside PAOS request.
 java.lang.String getOriginalURL()
          Returns the original URL from which the PAOS request is made.
 java.lang.String[] getQueryItems()
          Returns an array of the original query expression strings.
 java.util.List getQueryObjects()
          Returns a list of the original query org.w3c.dom.Element objects.
 void send(javax.servlet.http.HttpServletResponse res, boolean closeOutputStream)
          Sends the PAOS request message via an HTTP response to the User Agent side.
 java.lang.String toString()
          Returns the content string which resides inside an HTTP response, and represents the PAOS request in the form of a SOAP message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PAOSRequest

public PAOSRequest(java.lang.String originalURL,
                   java.lang.String service,
                   java.lang.String responseConsumerURL,
                   java.util.List soapBodies)
            throws PAOSException
This constructor composes the request message based on the input parameters. It is to be used in conjunction with service APIs other than the Personal Profile Client API.
Parameters:
originalURL - the URL for the above mentioned servlet.
service - the URI of the service from which this PAOS request is requesting data from, it should be already published in the HTTP request header "PAOS:"/code>.
responseConsumerURL - the URL where the PAOS response should be sent and consumed, this URL should be used by the PAOS server side.
soapBodies - a list of org.w3c.dom.Element objects representing the queries for data, they should be filled in by the underlying service API (other than the Personal Profile Client API).
Throws:
PAOSException - if there is any problem composing the request message

PAOSRequest

public PAOSRequest(java.lang.String originalURL,
                   java.lang.String service,
                   java.lang.String responseConsumerURL,
                   java.lang.String[] queryItems)
            throws PAOSException
This constructor composes the request message based on the input parameters. It is to be used in conjunction with the Personal Profile Client API.
Parameters:
originalURL - the URL for the above mentioned servlet.
service - the URI of the service from which this PAOS request is requesting data from, it should be already published in the HTTP request header "PAOS:".
responseConsumerURL - the URL where the PAOS response should be sent and consumed, this URL should be used by the PAOS server side.
queryItems - an array of query expressions understood by the Personal Profile Client API, the API would use them to construct soap body
Throws:
PAOSException - if there is any problem composing the request message
Method Detail

send

public void send(javax.servlet.http.HttpServletResponse res,
                 boolean closeOutputStream)
          throws java.io.IOException
Sends the PAOS request message via an HTTP response to the User Agent side.
Parameters:
res - the HTTP response through which the PAOS request message is sent to the User Agent side.
closeOutputStream - whether to close the output steam in the first parameter. or to leave it open for the caller to close it.
Throws:
java.io.IOException - if there are IO problems obtaining the output stream from the first parameter

getMessageID

public java.lang.String getMessageID()
Returns the message ID value used inside PAOS request. It is useful for checking the refMessageID in PAOS response against the original message ID.
Returns:
the message ID value used inside PAOS request.

getQueryItems

public java.lang.String[] getQueryItems()
Returns an array of the original query expression strings. This method is relevant only in the case of Personal Profile service. It is useful for correlating the query responses to the original queries.
Returns:
an array of query expression strings.

getQueryObjects

public java.util.List getQueryObjects()
Returns a list of the original query org.w3c.dom.Element objects. This method is more relevant in the non-Personal Profile case. It is useful for correlating the query responses to the original queries.
Returns:
a list of org.w3c.dom.Element objects representing the original queries.

getOriginalURL

public java.lang.String getOriginalURL()
Returns the original URL from which the PAOS request is made. The URL may be useful in processing the corresponding PAOS response.
Returns:
the URL string representing the web application making the PAOS request

toString

public java.lang.String toString()
Returns the content string which resides inside an HTTP response, and represents the PAOS request in the form of a SOAP message.
Overrides:
toString in class java.lang.Object
Returns:
the string representing the PAOS request in the form of a SOAP message


Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.