Interface SOAPProvider


  • public interface SOAPProvider
    Provider interface for applications that want to process or send SOAP requests.
    • 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​(URL requestURL,
                                                javax.xml.soap.SOAPMessage requestMessage)
                                         throws 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:
        IOException - if unable to send the request
      • sendRequest

        OutgoingSOAPRequestActivity sendRequest​(URL requestURL,
                                                javax.xml.soap.SOAPMessage requestMessage,
                                                boolean endOnResponse)
                                         throws 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:
        IOException - if unable to send the request
      • sendSyncRequest

        SOAPResponse sendSyncRequest​(URL requestURL,
                                     javax.xml.soap.SOAPMessage requestMessage)
                              throws 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:
        IOException - if unable to send the request