Class AbstractJDomPayloadEndpoint
java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.server.endpoint.AbstractJDomPayloadEndpoint
- All Implemented Interfaces:
PayloadEndpoint
@Deprecated
public abstract class AbstractJDomPayloadEndpoint
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 JDOM elements.
Offers the message payload as a JDOM Element
, and allows subclasses to create a response by returning an
Element
. <pAn AbstractJDomPayloadEndpoint
can accept only one payload element. Multiple
payload elements are not in accordance with WS-I.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
-
Field Summary
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.jdom2.Element
getDocumentElement
(Source source) 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 org.jdom2.Element
invokeInternal
(org.jdom2.Element requestElement) Deprecated.Template method.void
setAlwaysTransform
(boolean alwaysTransform) Deprecated.Set if the requestSource
should always be transformed into a newJDOMResult
.Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
-
Constructor Details
-
AbstractJDomPayloadEndpoint
public AbstractJDomPayloadEndpoint()Deprecated.
-
-
Method Details
-
setAlwaysTransform
public void setAlwaysTransform(boolean alwaysTransform) Deprecated.Set if the requestSource
should always be transformed into a newJDOMResult
.Default is
false
, which is faster. -
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
-
getDocumentElement
Deprecated.Returns the payload element of the given source.Default implementation checks whether the source is a
DOMSource
, and uses aDOMBuilder
to create a JDOMElement
. In all other cases, or when alwaysTransform istrue
, the source is transformed into aJDOMResult
, which is more expensive. If the passed source isnull
,null
is returned.- Parameters:
source
- the source to return the root element of; can benull
- Returns:
- the document element
- Throws:
TransformerException
- in case of errors
-
invokeInternal
protected abstract org.jdom2.Element invokeInternal(org.jdom2.Element requestElement) throws Exception Deprecated.Template method. Subclasses must implement this. Offers the request payload as a JDOMElement
, and allows subclasses to return a responseElement
.- Parameters:
requestElement
- the contents of the SOAP message as JDOM element- Returns:
- the response element. Can be
null
to specify no response. - Throws:
Exception
-