com.opencloud.slee.resources.soap
Interface SOAPProvider


public interface SOAPProvider

Provider interface for applications that want to process or send SOAP requests.


Method Summary
 javax.xml.soap.MessageFactory getMessageFactory()
          Provides access to an appropriate SAAJ MessageFactory.
 javax.xml.soap.SOAPFactory getSOAPFactory()
          Provides access to the appropriate SAAJ SOAPFactory.
 OutgoingSOAPRequestActivity sendRequest(java.net.URL requestURL, javax.xml.soap.SOAPMessage requestMessage)
          Asynchronously send a SOAP request.
 OutgoingSOAPRequestActivity sendRequest(java.net.URL requestURL, javax.xml.soap.SOAPMessage requestMessage, boolean endOnResponse)
          Asynchronously send a SOAP request.
 SOAPResponse sendSyncRequest(java.net.URL requestURL, javax.xml.soap.SOAPMessage requestMessage)
          Synchronously send a SOAP request, blocking until the response arrives.
 

Method Detail

getMessageFactory

javax.xml.soap.MessageFactory getMessageFactory()
Provides access to an appropriate SAAJ MessageFactory. Applications should use the returned instance to construct SOAP messages when initiating requests or generating responses.

Returns:
a MessageFactory implementation

getSOAPFactory

javax.xml.soap.SOAPFactory getSOAPFactory()
Provides access to the appropriate SAAJ SOAPFactory. Applications should use the returned instance to construct SOAP messages when initiating requests or generating responses.

Returns:
a SOAPFactory implementation

sendRequest

OutgoingSOAPRequestActivity sendRequest(java.net.URL requestURL,
                                        javax.xml.soap.SOAPMessage requestMessage)
                                        throws java.io.IOException
Asynchronously send a SOAP request.

A new OutgoingSOAPRequestActivity will be created for this activity. When a response is received (or a timeout or error occurs) a SOAPResponse event is fired on the new activity; a SBB should be attached to the activity to handle this response.

The new activity ends automatically after. a response is received.

Parameters:
requestURL - the URL to send to
requestMessage - the message to send
Returns:
the new OutgoingSOAPRequestActivity activity object
Throws:
java.io.IOException - if unable to send the request

sendRequest

OutgoingSOAPRequestActivity sendRequest(java.net.URL requestURL,
                                        javax.xml.soap.SOAPMessage requestMessage,
                                        boolean endOnResponse)
                                        throws java.io.IOException
Asynchronously send a SOAP request.

A new OutgoingSOAPRequestActivity will be created for this activity. When a response is received (or a timeout or error occurs) a SOAPResponse event is fired on the new activity; a SBB should be attached to the activity to handle this response.

If endsOnResponse is true, the new activity ends automatically after a response is received. Otherwise, the activity remains alive until OutgoingSOAPRequestActivity.endActivity() is called to explicitly end the activity.

Parameters:
requestURL - the URL to send to
requestMessage - the message to send
endOnResponse - true if the request activity should be automatically ended when a response is received
Returns:
the new OutgoingSOAPRequestActivity activity object
Throws:
java.io.IOException - if unable to send the request

sendSyncRequest

SOAPResponse sendSyncRequest(java.net.URL requestURL,
                             javax.xml.soap.SOAPMessage requestMessage)
                             throws java.io.IOException
Synchronously send a SOAP request, blocking until the response arrives. No new activities are created for this request.

Parameters:
requestURL - the URL to send to.
requestMessage - the message to send.
Returns:
the response received
Throws:
java.io.IOException - if unable to send the request