public class SaajSoapMessageFactory extends Object implements SoapMessageFactory, org.springframework.beans.factory.InitializingBean
WebServiceMessageFactory.
Wraps a SAAJ MessageFactory. This factory will use SAAJ 1.3 when found, or fall back to SAAJ 1.2 or even 1.1.
A SAAJ MessageFactory can be injected to the constructor, or by the setMessageFactory(javax.xml.soap.MessageFactory) property. When a SAAJ message
factory is injected, the setSoapVersion(org.springframework.ws.soap.SoapVersion) property is ignored.
SaajSoapMessage| Constructor and Description |
|---|
SaajSoapMessageFactory()
Default, empty constructor.
|
SaajSoapMessageFactory(MessageFactory messageFactory)
Constructor that takes a message factory as an argument.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
SaajSoapMessage |
createWebServiceMessage()
Creates a new, empty
SoapMessage. |
SaajSoapMessage |
createWebServiceMessage(InputStream inputStream)
Reads a
SoapMessage from the given input stream. |
MessageFactory |
getMessageFactory()
Returns the SAAJ
MessageFactory used. |
protected void |
postProcess(SOAPMessage soapMessage)
Template method that allows for post-processing of the given
SOAPMessage. |
void |
setLangAttributeOnSoap11FaultString(boolean langAttributeOnSoap11FaultString)
Defines whether a
xml:lang attribute should be set on SOAP 1.1 <faultstring> elements. |
void |
setMessageFactory(MessageFactory messageFactory)
Sets the SAAJ
MessageFactory. |
void |
setMessageProperties(Map<String,?> messageProperties)
Sets the SAAJ message properties.
|
void |
setSoapVersion(SoapVersion version)
Sets the SOAP Version used by this factory.
|
String |
toString() |
public SaajSoapMessageFactory()
public SaajSoapMessageFactory(MessageFactory messageFactory)
public MessageFactory getMessageFactory()
MessageFactory used.public void setMessageFactory(MessageFactory messageFactory)
MessageFactory.public void setMessageProperties(Map<String,?> messageProperties)
SOAPMessage.setProperty(String, Object)public void setLangAttributeOnSoap11FaultString(boolean langAttributeOnSoap11FaultString)
xml:lang attribute should be set on SOAP 1.1 <faultstring> elements.
The default is true, to comply with WS-I, but this flag can be set to false to the older W3C SOAP
1.1 specification.
public void setSoapVersion(SoapVersion version)
SoapMessageFactorysetSoapVersion in interface SoapMessageFactoryversion - the version constantSoapVersion.SOAP_11,
SoapVersion.SOAP_12public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic SaajSoapMessage createWebServiceMessage()
SoapMessageFactorySoapMessage.createWebServiceMessage in interface SoapMessageFactorycreateWebServiceMessage in interface WebServiceMessageFactorypublic SaajSoapMessage createWebServiceMessage(InputStream inputStream) throws IOException
SoapMessageFactorySoapMessage from the given input stream.
If the given stream is an instance of TransportInputStream, the headers will be read from the request.
createWebServiceMessage in interface SoapMessageFactorycreateWebServiceMessage in interface WebServiceMessageFactoryinputStream - the input stream to read the message fromIOException - if an I/O exception occursprotected void postProcess(SOAPMessage soapMessage) throws SOAPException
SOAPMessage.
Default implementation sets message properties, if any.
soapMessage - the message to post processSOAPExceptionsetMessageProperties(java.util.Map)Copyright © 2023 VMware, Inc.. All rights reserved.