|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.xml.transform.TransformerObjectSupport org.springframework.ws.server.endpoint.AbstractJDomPayloadEndpoint
public abstract class AbstractJDomPayloadEndpoint
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
.
Field Summary |
---|
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
AbstractJDomPayloadEndpoint()
|
Method Summary | |
---|---|
protected Element |
getDocumentElement(Source source)
Returns the payload element of the given source. |
Source |
invoke(Source request)
Invokes the endpoint with the given request payload, and possibly returns a response. |
protected abstract Element |
invokeInternal(Element requestElement)
Template method. |
void |
setAlwaysTransform(boolean alwaysTransform)
Set if the request Source should always be transformed into a new JDOMResult . |
Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport |
---|
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractJDomPayloadEndpoint()
Method Detail |
---|
public void setAlwaysTransform(boolean alwaysTransform)
Source
should always be transformed into a new JDOMResult
.
Default is false
, which is faster.
public final Source invoke(Source request) throws Exception
PayloadEndpoint
invoke
in interface PayloadEndpoint
request
- the payload of the request message, may be null
null
to indicate no response
Exception
- if an exception occursprotected Element getDocumentElement(Source source) throws TransformerException
DOMSource
, and uses a DOMBuilder
to create
a JDOM Element
. In all other cases, or when alwaysTransform is
true
, the source is transformed into a JDOMResult
, which is more expensive. If the passed source
is null
, null
is returned.
source
- the source to return the root element of; can be null
TransformerException
- in case of errorsprotected abstract Element invokeInternal(Element requestElement) throws Exception
Element
, and
allows subclasses to return a response Element
.
requestElement
- the contents of the SOAP message as JDOM element
null
to specify no response.
Exception
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |