Class HttpClientResponseSOAP11Decoder

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, UnmodifiableComponent, HttpClientResponseMessageDecoder, MessageDecoder
Direct Known Subclasses:
HttpClientResponseSOAP11Decoder, HttpClientResponseSOAP11Decoder

public class HttpClientResponseSOAP11Decoder extends BaseHttpClientResponseXMLMessageDecoder
Basic SOAP 1.1 decoder for HTTP transport via an HttpClient's HttpResponse.

This decoder takes a mandatory MessageHandler instance which is used to populate the message that is returned as the MessageContext.getMessage().

A SOAP message oriented message exchange style might just populate the Envelope as the message. An application-specific payload-oriented message exchange would handle a specific type of payload structure.

  • Field Details

    • log

      private final org.slf4j.Logger log
    • bodyHandler

      private MessageHandler bodyHandler
      Message handler to use in processing the message body.
  • Constructor Details

    • HttpClientResponseSOAP11Decoder

      public HttpClientResponseSOAP11Decoder()
  • Method Details

    • getBodyHandler

      public MessageHandler getBodyHandler()
      Get the configured body handler MessageHandler.
      Returns the bodyHandler.
    • setBodyHandler

      public void setBodyHandler(MessageHandler newBodyHandler)
      Set the configured body handler MessageHandler.
      newBodyHandler - The bodyHandler to set.
    • doDecode

      protected void doDecode() throws MessageDecodingException
      Performs the decoding logic. By the time this is called, this decoder has already been initialized and checked to ensure that it has not been destroyed.
      Specified by:
      doDecode in class AbstractMessageDecoder
      MessageDecodingException - thrown if there is a problem decoding the message
    • processSuccessResponse

      protected void processSuccessResponse(org.apache.http.HttpResponse httpResponse, SOAP11Context soapContext) throws MessageDecodingException, IOException
      Process a successful response, i.e. one where the HTTP response code was 200.
      httpResponse - the HTTP client response
      soapContext - the SOAP11Context instance
      MessageDecodingException - if message can not be unmarshalled
      IOException - if there is a problem with the response entity input stream
    • buildFaultException

      protected MessageDecodingException buildFaultException(org.apache.http.HttpResponse response) throws MessageDecodingException, IOException
      Build an exception by processing a fault response, i.e. one where the HTTP response code was 500.
      response - the HTTP client response
      the message decoding exception representing the SOAP fault
      MessageDecodingException - if message can not be unmarshalled
      IOException - if there is a problem with the response entity input stream
    • getFault

      protected Fault getFault(Envelope soapMessage)
      Return the Fault element from the SOAP message, if any.
      soapMessage - the SOAP 1.1. Envelope being processed
      the first Fault element found, or null
    • doInitialize

      protected void doInitialize() throws ComponentInitializationException
      doInitialize in class BaseHttpClientResponseXMLMessageDecoder
    • getMessageToLog

      protected XMLObject getMessageToLog()
      Get the XMLObject which will be logged as the protocol message.
      getMessageToLog in class BaseHttpClientResponseXMLMessageDecoder
      the XMLObject message considered to be the protocol message for logging purposes