AxiomSoapMessageFactory or SaajSoapMessageFactory
org.springframework.ws.soap.axiom.AxiomSoapMessageFactory
or
org.springframework.ws.soap.saaj.SaajSoapMessageFactory
____________________________________________________________________
|
|
SaajSoapMessageFactory uses the SOAP with Attachments API for Java to create SoapMessage implementations
|
AxiomSoapMessageFactory uses the AXis 2 Object Model to create SoapMessage implementations.
|
SAAJ is based on DOM, the Document Object Model.
|
AXIOM is based on StAX, the Streaming API for
XML.
|
SOAP messages are stored in memory as a whole.
For larger SOAP messages, this may not be very performant.
|
StAX
provides a pull-based mechanism for reading XML messages, which can be more
efficient for larger messages.
|
Cannot improve performance with any configurations.
|
To increase reading performance on the AxiomSoapMessageFactory, you can set the payloadCaching property to false (default is true). This this will read the contents of the SOAP body directly from the stream. When this setting is enabled, the payload can only be read once. This means that you have to make sure that any preprocessing of the message does not consume it.
|
<bean id="messageFactory"
class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
|
<bean
id="messageFactory"
class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory">
<property
name="payloadCaching" value="true"/>
</bean>
|
____________________________________________________________________
Use AxiomSoapMessageFactory for large files
and for small file use SaajSoapMessageFactory.
Use AxiomSoapMessageFactory for large files
and for small file use SaajSoapMessageFactory.
Comments
Post a Comment