Package org.springframework.ws.pox.dom
Class DomPoxMessageFactory
java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.pox.dom.DomPoxMessageFactory
- All Implemented Interfaces:
WebServiceMessageFactory
public class DomPoxMessageFactory
extends TransformerObjectSupport
implements WebServiceMessageFactory
Implementation of the
WebServiceMessageFactory
interface that creates a DomPoxMessage
.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The default content type for the POX messages.Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
-
Constructor Summary
ConstructorDescriptionUse defaultDocumentBuilderFactory
.DomPoxMessageFactory
(DocumentBuilderFactory documentBuilderFactory) Provide your ownDocumentBuilderFactory
. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new, emptyWebServiceMessage
.createWebServiceMessage
(InputStream inputStream) Reads aWebServiceMessage
from the given input stream.void
setContentType
(String contentType) Sets the content-type for theDomPoxMessage
.void
setExpandEntityReferences
(boolean expandEntityRef) Set if the XML parser should expand entity reference nodes.void
setNamespaceAware
(boolean namespaceAware) Set whether or not the XML parser should be XML namespace aware.void
setValidating
(boolean validating) Set if the XML parser should validate the document.Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
-
Field Details
-
DEFAULT_CONTENT_TYPE
The default content type for the POX messages.- See Also:
-
-
Constructor Details
-
DomPoxMessageFactory
public DomPoxMessageFactory()Use defaultDocumentBuilderFactory
. -
DomPoxMessageFactory
Provide your ownDocumentBuilderFactory
.- Parameters:
documentBuilderFactory
-
-
-
Method Details
-
setContentType
Sets the content-type for theDomPoxMessage
. -
setNamespaceAware
public void setNamespaceAware(boolean namespaceAware) Set whether or not the XML parser should be XML namespace aware. Default istrue
. -
setValidating
public void setValidating(boolean validating) Set if the XML parser should validate the document. Default isfalse
. -
setExpandEntityReferences
public void setExpandEntityReferences(boolean expandEntityRef) Set if the XML parser should expand entity reference nodes. Default isfalse
. -
createWebServiceMessage
Description copied from interface:WebServiceMessageFactory
Creates a new, emptyWebServiceMessage
.- Specified by:
createWebServiceMessage
in interfaceWebServiceMessageFactory
- Returns:
- the empty message
-
createWebServiceMessage
Description copied from interface:WebServiceMessageFactory
Reads aWebServiceMessage
from the given input stream.If the given stream is an instance of
TransportInputStream
, the headers will be read from the request.- Specified by:
createWebServiceMessage
in interfaceWebServiceMessageFactory
- Parameters:
inputStream
- the input stream to read the message from- Returns:
- the created message
- Throws:
IOException
- if an I/O exception occurs
-