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
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
- Author:
- Christoph Deppisch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertInbound(org.springframework.ws.WebServiceMessage message, WebServiceEndpointConfiguration endpointConfiguration, TestContext context) convertInbound(org.springframework.ws.WebServiceMessage webServiceMessage, org.springframework.ws.context.MessageContext messageContext, WebServiceEndpointConfiguration endpointConfiguration) Conversion method for inbound messages.org.springframework.ws.WebServiceMessageconvertOutbound(Message internalMessage, WebServiceEndpointConfiguration endpointConfiguration, TestContext context) voidconvertOutbound(org.springframework.ws.WebServiceMessage webServiceMessage, Message message, WebServiceEndpointConfiguration endpointConfiguration, TestContext context) protected voidhandleInboundAttachments(org.springframework.ws.soap.SoapMessage soapMessage, SoapMessage message) Adds attachments if present in soap web service message.protected voidhandleInboundHttpHeaders(SoapMessage message, WebServiceEndpointConfiguration endpointConfiguration) Reads information from Http connection and adds them as Http marked headers to internal message representation.protected voidhandleInboundMessageProperties(org.springframework.ws.context.MessageContext messageContext, SoapMessage message) Adds all message properties from web service message to message builder as normal header entries.protected voidhandleInboundMimeHeaders(org.springframework.ws.soap.SoapMessage soapMessage, SoapMessage message) Adds mime headers to constructed response message.protected voidhandleInboundSoapHeaders(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.protected voidhandleInboundSoapMessage(org.springframework.ws.soap.SoapMessage soapMessage, SoapMessage message, WebServiceEndpointConfiguration endpointConfiguration) Method handles SOAP specific message information such as SOAP action headers and SOAP attachments.voidsetCharset(String charset)
-
Constructor Details
-
SoapMessageConverter
public SoapMessageConverter()
-
-
Method Details
-
convertOutbound
public org.springframework.ws.WebServiceMessage convertOutbound(Message internalMessage, WebServiceEndpointConfiguration endpointConfiguration, TestContext context) - Specified by:
convertOutboundin interfaceMessageConverter<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:
convertOutboundin interfaceMessageConverter<org.springframework.ws.WebServiceMessage,org.springframework.ws.WebServiceMessage, WebServiceEndpointConfiguration>
-
convertInbound
public SoapMessage convertInbound(org.springframework.ws.WebServiceMessage message, WebServiceEndpointConfiguration endpointConfiguration, TestContext context) - Specified by:
convertInboundin interfaceMessageConverter<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:WebServiceMessageConverterConversion 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:
convertInboundin interfaceWebServiceMessageConverter- 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
-
setCharset
-