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
- See Also:
-
Field Summary
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DocumentBuilderDeprecated.Create aDocumentBuilderthat this endpoint will use for parsing XML documents.protected DocumentBuilderFactoryDeprecated.Create aDocumentBuilderFactorythat this endpoint will use for constructing XML documents.protected ElementgetDocumentElement(Source source, DocumentBuilder documentBuilder) Deprecated.Returns the payload element of the given source.final SourceDeprecated.Invokes the endpoint with the given request payload, and possibly returns a response.protected abstract ElementinvokeInternal(Element requestElement, Document responseDocument) Deprecated.Template method that subclasses must implement to process the request.voidsetAlwaysTransform(boolean alwaysTransform) voidsetExpandEntityReferences(boolean expandEntityRef) Deprecated.Set if the XML parser should expand entity reference nodes.voidsetNamespaceAware(boolean namespaceAware) Deprecated.Set whether or not the XML parser should be XML namespace aware.voidsetValidating(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:PayloadEndpointInvokes the endpoint with the given request payload, and possibly returns a response.- Specified by:
invokein interfacePayloadEndpoint- Parameters:
request- the payload of the request message, may benull- Returns:
- the payload of the response message, may be
nullto indicate no response - Throws:
Exception- if an exception occurs
-
createDocumentBuilder
protected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory) throws ParserConfigurationException Deprecated.Create aDocumentBuilderthat this endpoint will use for parsing XML documents. Can be overridden in subclasses, adding further initialization of the builder.- Parameters:
factory- theDocumentBuilderFactorythat the DocumentBuilder should be created with- Returns:
- the
DocumentBuilder - Throws:
ParserConfigurationException- if thrown by JAXP methods
-
createDocumentBuilderFactory
Deprecated.Create aDocumentBuilderFactorythat this endpoint will use for constructing XML documents. Can be overridden in subclasses, adding further initialization of the factory. The resultingDocumentBuilderFactoryis 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,nullis returned.- Parameters:
source- the source to return the root element of; can benulldocumentBuilder- 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
Documentis to be used for constructingNodes, by using the variouscreatemethods.- Parameters:
requestElement- the contents of the SOAP message as DOM elementsresponseDocument- a DOM document to be used for constructingNodes- Returns:
- the response element. Can be
nullto specify no response. - Throws:
Exception
-