Class AbstractDomPayloadEndpoint
java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.server.endpoint.AbstractDomPayloadEndpoint
- All Implemented Interfaces:
PayloadEndpoint
@Deprecated
public abstract class AbstractDomPayloadEndpoint
extends TransformerObjectSupport
implements PayloadEndpoint
Deprecated.
as of Spring Web Services 2.0, in favor of annotated endpoints
Abstract base class for endpoints that handle the message payload as DOM elements.
Offers the message payload as a DOM Element
, and allows subclasses to create a response by returning an
Element
.
An AbstractDomPayloadEndpoint
only accept one payload element. Multiple payload elements are not in
accordance with WS-I.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma, Alef Arendsen
- See Also:
-
Field Summary
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected DocumentBuilder
Deprecated.Create aDocumentBuilder
that this endpoint will use for parsing XML documents.protected DocumentBuilderFactory
Deprecated.Create aDocumentBuilderFactory
that this endpoint will use for constructing XML documents.protected Element
getDocumentElement
(Source source, DocumentBuilder documentBuilder) Deprecated.Returns the payload element of the given source.final Source
Deprecated.Invokes the endpoint with the given request payload, and possibly returns a response.protected abstract Element
invokeInternal
(Element requestElement, Document responseDocument) Deprecated.Template method that subclasses must implement to process the request.void
setAlwaysTransform
(boolean alwaysTransform) void
setExpandEntityReferences
(boolean expandEntityRef) Deprecated.Set if the XML parser should expand entity reference nodes.void
setNamespaceAware
(boolean namespaceAware) Deprecated.Set whether or not the XML parser should be XML namespace aware.void
setValidating
(boolean validating) Deprecated.Set if the XML parser should validate the document.Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
-
Constructor Details
-
AbstractDomPayloadEndpoint
public AbstractDomPayloadEndpoint()Deprecated.
-
-
Method Details
-
setNamespaceAware
public void setNamespaceAware(boolean namespaceAware) Deprecated.Set whether or not the XML parser should be XML namespace aware. Default istrue
. -
setValidating
public void setValidating(boolean validating) Deprecated.Set if the XML parser should validate the document. Default isfalse
. -
setExpandEntityReferences
public void setExpandEntityReferences(boolean expandEntityRef) Deprecated.Set if the XML parser should expand entity reference nodes. Default isfalse
. -
setAlwaysTransform
public void setAlwaysTransform(boolean alwaysTransform) Deprecated. -
invoke
Deprecated.Description copied from interface:PayloadEndpoint
Invokes the endpoint with the given request payload, and possibly returns a response.- Specified by:
invoke
in interfacePayloadEndpoint
- Parameters:
request
- the payload of the request message, may benull
- Returns:
- the payload of the response message, may be
null
to indicate no response - Throws:
Exception
- if an exception occurs
-
createDocumentBuilder
protected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory) throws ParserConfigurationException Deprecated.Create aDocumentBuilder
that this endpoint will use for parsing XML documents. Can be overridden in subclasses, adding further initialization of the builder.- Parameters:
factory
- theDocumentBuilderFactory
that the DocumentBuilder should be created with- Returns:
- the
DocumentBuilder
- Throws:
ParserConfigurationException
- if thrown by JAXP methods
-
createDocumentBuilderFactory
Deprecated.Create aDocumentBuilderFactory
that this endpoint will use for constructing XML documents. Can be overridden in subclasses, adding further initialization of the factory. The resultingDocumentBuilderFactory
is cached, so this method will only be called once.- Returns:
- the DocumentBuilderFactory
- Throws:
ParserConfigurationException
- if thrown by JAXP methods
-
getDocumentElement
protected Element getDocumentElement(Source source, DocumentBuilder documentBuilder) throws TransformerException Deprecated.Returns the payload element of the given source.Default implementation checks whether the source is a
DOMSource
, and returns the node of that. In all other cases, or when alwaysTransform istrue
, the source is transformed into aDOMResult
, which is more expensive. If the passed source isnull
,null
is returned.- Parameters:
source
- the source to return the root element of; can benull
documentBuilder
- the document builder to be used for transformations- Returns:
- the document element
- Throws:
TransformerException
- in case of errors
-
invokeInternal
protected abstract Element invokeInternal(Element requestElement, Document responseDocument) throws Exception Deprecated.Template method that subclasses must implement to process the request.Offers the request payload as a DOM
Element
, and allows subclasses to return a responseElement
.The given DOM
Document
is to be used for constructingNode
s, by using the variouscreate
methods.- Parameters:
requestElement
- the contents of the SOAP message as DOM elementsresponseDocument
- a DOM document to be used for constructingNode
s- Returns:
- the response element. Can be
null
to specify no response. - Throws:
Exception
-