magoffin.matt.ma2.web.service
Class AxiomSoapMessageFactory

java.lang.Object
  extended by magoffin.matt.ma2.web.service.AxiomSoapMessageFactory
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.ws.soap.SoapMessageFactory, org.springframework.ws.WebServiceMessageFactory

public class AxiomSoapMessageFactory
extends java.lang.Object
implements org.springframework.ws.soap.SoapMessageFactory, org.springframework.beans.factory.InitializingBean

This is a tweak of Spring-WS 1.0.2 to allow for setting the Axiom Attachment file cache settings. See http://opensource.atlassian.com/projects/spring/browse/SWS-246


Constructor Summary
AxiomSoapMessageFactory()
          Default constructor.
 
Method Summary
 void afterPropertiesSet()
           
 org.springframework.ws.WebServiceMessage createWebServiceMessage()
           
 org.springframework.ws.WebServiceMessage createWebServiceMessage(java.io.InputStream inputStream)
           
protected  java.lang.String getCharSetEncoding(java.lang.String contentType)
          Returns the character set from the given content type.
 void setAttachmentFileCaching(boolean attachmentFileCaching)
          Indicate whether SOAP attachments should make use of file caching.
 void setPayloadCaching(boolean payloadCaching)
          Indicates whether the SOAP Body payload should be cached or not.
 void setSoapVersion(org.springframework.ws.soap.SoapVersion version)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AxiomSoapMessageFactory

public AxiomSoapMessageFactory()
Default constructor.

Method Detail

setPayloadCaching

public void setPayloadCaching(boolean payloadCaching)
Indicates whether the SOAP Body payload should be cached or not. Default is true. Setting this to false will increase performance, but also result in the fact that the message payload can only be read once.

Parameters:
payloadCaching - the payloadCaching to set

setAttachmentFileCaching

public void setAttachmentFileCaching(boolean attachmentFileCaching)
Indicate whether SOAP attachments should make use of file caching. Default is true. Setting this to false will cause Axiom to load the entire attachment into memory, which is not suitable for large attachments.

Parameters:
attachmentFileCaching - the attachmentFileCaching to set

setSoapVersion

public void setSoapVersion(org.springframework.ws.soap.SoapVersion version)
Specified by:
setSoapVersion in interface org.springframework.ws.soap.SoapMessageFactory

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

createWebServiceMessage

public org.springframework.ws.WebServiceMessage createWebServiceMessage()
Specified by:
createWebServiceMessage in interface org.springframework.ws.WebServiceMessageFactory

createWebServiceMessage

public org.springframework.ws.WebServiceMessage createWebServiceMessage(java.io.InputStream inputStream)
                                                                 throws java.io.IOException
Specified by:
createWebServiceMessage in interface org.springframework.ws.WebServiceMessageFactory
Throws:
java.io.IOException

getCharSetEncoding

protected java.lang.String getCharSetEncoding(java.lang.String contentType)
Returns the character set from the given content type. Mostly copied

Parameters:
contentType -
Returns:
the character set encoding

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object