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

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

public class PAOSResponse
extends java.lang.Object

The PAOSResponse class is used by a web application on HTTP server side to receive and parse a PAOS response via an HTTP request from the user agent side. From this class, the original PAOSRequest object could obtained to correlate with this response. 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 get methods for query responses.


Constructor Summary
PAOSResponse(javax.servlet.http.HttpServletRequest req)
          This constructor parses the HTTP request to get PAOS response.
 
Method Summary
 PAOSRequest getOriginalPAOSRequest()
          Returns the original PAOSRequest object which corresponds to this PAOSResponse object.
 java.util.List getPPResponse()
          Returns a list of DSTData objects representing query responses.
 java.lang.String getPPResponseStr()
          Return a String representation of the query response from the Personal Profile service.
 java.util.List getResponse()
          Returns a list of org.w3c.dom.Element objects representing query responses.
 java.lang.String toString()
          Returns the content string which resides inside an HTTP request, and represents the PAOS response in the form of a SOAP message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PAOSResponse

public PAOSResponse(javax.servlet.http.HttpServletRequest req)
             throws PAOSException,
                    java.io.IOException
This constructor parses the HTTP request to get PAOS response.
Parameters:
req - the HTTP request where the PAOS response is residing.
Throws:
PAOSException - if there are errors during parsing PAOS response. The errors could include the case where an PAOS message response is not conformant to PAOS protocols like refToMessageID attribute missing, etc.
java.io.IOException - if there are IO problems obtaining the input stream from the HTTP request
Method Detail

getPPResponse

public java.util.List getPPResponse()
                             throws PAOSException
Returns a list of DSTData objects representing query responses. This method is relevant only in the case of the Personal Profile service.
Returns:
a list of DSTData objects representing query responses.
Throws:
PAOSException - if there are errors during parsing Personal Profile Query response.

getPPResponseStr

public java.lang.String getPPResponseStr()
                                  throws PAOSException
Return a String representation of the query response from the Personal Profile service. This is just a convenient method on top of the method getPPResponse().
Returns:
a String representing the query response from the Personal Profile service.
Throws:
PAOSException - if there are errors during parsing Personal Profile Query response.

getResponse

public java.util.List getResponse()
Returns a list of org.w3c.dom.Element objects representing query responses. This method is more relevant in the case of non-Personal Profile service (but can be used for in the case of Personal Profile service).
Returns:
a list of org.w3c.dom.Element objects representing query responses.

getOriginalPAOSRequest

public PAOSRequest getOriginalPAOSRequest()
Returns the original PAOSRequest object which corresponds to this PAOSResponse object. This is useful for correlation between PAOS requests and responses.
Returns:
the original PAOS request object.

toString

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