|
Spring Web Services Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.ws.soap.axiom.AxiomSoapMessageFactory
public class AxiomSoapMessageFactory
Axiom-specific implementation of the WebServiceMessageFactory
interface. Creates AxiomSoapMessages.
payloadCaching property to false (default is true). This this
will read the contents of the body directly from the stream. However, when this setting is enabled, the
payload can only be read once. This means that any endpoint mappings or interceptors which are based on the
message payload (such as the PayloadRootQNameEndpointMapping, the PayloadValidatingInterceptor, or
the PayloadLoggingInterceptor) cannot be used. Instead, use an endpoint mapping that does not consume the
payload (i.e. the SoapActionEndpointMapping).
Additionally, this message factory can cache large attachments to disk by setting the attachmentCaching property to true (default is false).
Optionally, the location where attachments are stored can be defined via the attachmentCacheDir property (defaults to the system temp file path).
Mostly derived from org.apache.axis2.transport.http.HTTPTransportUtils and
org.apache.axis2.transport.TransportUtils, which we cannot use since they are not part of the Axiom
distribution.
AxiomSoapMessage,
setPayloadCaching(boolean)| Constructor Summary | |
|---|---|
AxiomSoapMessageFactory()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
AxiomSoapMessage |
createWebServiceMessage()
Creates a new, empty SoapMessage. |
AxiomSoapMessage |
createWebServiceMessage(InputStream inputStream)
Reads a SoapMessage from the given input stream. |
protected XMLInputFactory |
createXmlInputFactory()
Create a XMLInputFactory that this resolver will use to create XMLStreamReader objects. |
protected String |
getCharSetEncoding(String contentType)
Returns the character set from the given content type. |
void |
setAttachmentCacheDir(File attachmentCacheDir)
Sets the directory where SOAP attachments will be stored. |
void |
setAttachmentCacheThreshold(int attachmentCacheThreshold)
Sets the threshold for attachments caching, in bytes. |
void |
setAttachmentCaching(boolean attachmentCaching)
Indicates whether SOAP attachments should be cached or not. |
void |
setLangAttributeOnSoap11FaultString(boolean langAttributeOnSoap11FaultString)
Defines whether a xml:lang attribute should be set on SOAP 1.1 <faultstring> elements. |
void |
setPayloadCaching(boolean payloadCaching)
Indicates whether the SOAP Body payload should be cached or not. |
void |
setSoapVersion(SoapVersion version)
Sets the SOAP Version used by this factory. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AxiomSoapMessageFactory()
| Method Detail |
|---|
public void setPayloadCaching(boolean payloadCaching)
true.
Setting this to false will increase performance, but also result in the fact that the message
payload can only be read once.
public void setAttachmentCaching(boolean attachmentCaching)
false.
Setting this to true will cause Axiom to store larger attachments on disk, rather than in memory.
This decreases memory consumption, but decreases performance.
public void setAttachmentCacheDir(File attachmentCacheDir)
attachmentCaching is set to true.
The parameter should be an existing, writable directory. This property defaults to the temporary directory of the
operating system (i.e. the value of the java.io.tmpdir system property).
public void setAttachmentCacheThreshold(int attachmentCacheThreshold)
attachment cache directory. Only used when attachmentCaching is set to true.
Defaults to 4096 bytes (i.e. 4 kilobytes).
public void setSoapVersion(SoapVersion version)
SoapMessageFactory
setSoapVersion in interface SoapMessageFactoryversion - the version constantSoapVersion.SOAP_11,
SoapVersion.SOAP_12public 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 afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic AxiomSoapMessage createWebServiceMessage()
SoapMessageFactorySoapMessage.
createWebServiceMessage in interface SoapMessageFactorycreateWebServiceMessage in interface WebServiceMessageFactory
public AxiomSoapMessage 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 from
IOException - if an I/O exception occursprotected String getCharSetEncoding(String contentType)
protected XMLInputFactory createXmlInputFactory()
XMLInputFactory that this resolver will use to create XMLStreamReader objects.
Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
so this method will only be called once.
public String toString()
toString in class Object
|
Spring Web Services Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||