Class SoapMessageConverter

java.lang.Object
org.citrusframework.ws.message.converter.SoapMessageConverter
All Implemented Interfaces:
MessageConverter<org.springframework.ws.WebServiceMessage,org.springframework.ws.WebServiceMessage,WebServiceEndpointConfiguration>, WebServiceMessageConverter
Direct Known Subclasses:
WsAddressingMessageConverter

public class SoapMessageConverter extends Object implements WebServiceMessageConverter
Default converter implementation for SOAP messages. By default strips away the SOAP envelope and constructs internal message representation from incoming SOAP request messages. Response messages are created from internal message representation accordingly.
Since:
2.0
  • Constructor Details

    • SoapMessageConverter

      public SoapMessageConverter()
  • Method Details

    • convertOutbound

      public org.springframework.ws.WebServiceMessage convertOutbound(Message internalMessage, WebServiceEndpointConfiguration endpointConfiguration, TestContext context)
      Specified by:
      convertOutbound in interface MessageConverter<org.springframework.ws.WebServiceMessage,org.springframework.ws.WebServiceMessage,WebServiceEndpointConfiguration>
    • convertOutbound

      public void convertOutbound(org.springframework.ws.WebServiceMessage webServiceMessage, Message message, WebServiceEndpointConfiguration endpointConfiguration, TestContext context)
      Specified by:
      convertOutbound in interface MessageConverter<org.springframework.ws.WebServiceMessage,org.springframework.ws.WebServiceMessage,WebServiceEndpointConfiguration>
    • convertInbound

      public SoapMessage convertInbound(org.springframework.ws.WebServiceMessage message, WebServiceEndpointConfiguration endpointConfiguration, TestContext context)
      Specified by:
      convertInbound in interface MessageConverter<org.springframework.ws.WebServiceMessage,org.springframework.ws.WebServiceMessage,WebServiceEndpointConfiguration>
    • convertInbound

      public SoapMessage convertInbound(org.springframework.ws.WebServiceMessage webServiceMessage, org.springframework.ws.context.MessageContext messageContext, WebServiceEndpointConfiguration endpointConfiguration)
      Description copied from interface: WebServiceMessageConverter
      Conversion method for inbound messages. Given inbound WebService message is translated to internal message representation. Given message context is optional and if present provides access to incoming request information such as message properties.
      Specified by:
      convertInbound in interface WebServiceMessageConverter
      Parameters:
      webServiceMessage - the initial web service message.
      messageContext - optional message context.
      Returns:
      the constructed integration message.
    • handleInboundSoapMessage

      protected void handleInboundSoapMessage(org.springframework.ws.soap.SoapMessage soapMessage, SoapMessage message, WebServiceEndpointConfiguration endpointConfiguration)
      Method handles SOAP specific message information such as SOAP action headers and SOAP attachments.
      Parameters:
      soapMessage -
      message -
      endpointConfiguration -
    • handleInboundHttpHeaders

      protected void handleInboundHttpHeaders(SoapMessage message, WebServiceEndpointConfiguration endpointConfiguration)
      Reads information from Http connection and adds them as Http marked headers to internal message representation.
      Parameters:
      message -
    • handleInboundSoapHeaders

      protected void handleInboundSoapHeaders(org.springframework.ws.soap.SoapMessage soapMessage, SoapMessage message)
      Reads all soap headers from web service message and adds them to message builder as normal headers. Also takes care of soap action header.
      Parameters:
      soapMessage - the web service message.
      message - the response message builder.
    • handleInboundMimeHeaders

      protected void handleInboundMimeHeaders(org.springframework.ws.soap.SoapMessage soapMessage, SoapMessage message)
      Adds mime headers to constructed response message. This can be HTTP headers in case of HTTP transport. Note: HTTP headers may have multiple values that are represented as comma delimited string value.
      Parameters:
      soapMessage - the source SOAP message.
      message - the message build constructing the result message.
    • handleInboundMessageProperties

      protected void handleInboundMessageProperties(org.springframework.ws.context.MessageContext messageContext, SoapMessage message)
      Adds all message properties from web service message to message builder as normal header entries.
      Parameters:
      messageContext - the web service request message context.
      message - the request message builder.
    • handleInboundAttachments

      protected void handleInboundAttachments(org.springframework.ws.soap.SoapMessage soapMessage, SoapMessage message)
      Adds attachments if present in soap web service message.
      Parameters:
      soapMessage - the web service message.
      message - the response message builder.
    • getCharset

      public String getCharset()
    • setCharset

      public void setCharset(String charset)