Class AbstractDom4jPayloadEndpoint

java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.server.endpoint.AbstractDom4jPayloadEndpoint
All Implemented Interfaces:
PayloadEndpoint

@Deprecated public abstract class AbstractDom4jPayloadEndpoint 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 dom4j elements. Offers the message payload as a dom4j Element, and allows subclasses to create a response by returning an Element.

An AbstractDom4JPayloadEndpoint only accept one payload element. Multiple payload elements are not in accordance with WS-I.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
  • Element
  • Constructor Details

    • AbstractDom4jPayloadEndpoint

      public AbstractDom4jPayloadEndpoint()
      Deprecated.
  • Method Details

    • setAlwaysTransform

      public void setAlwaysTransform(boolean alwaysTransform)
      Deprecated.
      Set if the request Source should always be transformed into a new DocumentResult.

      Default is false, which is faster.

    • invoke

      public final Source invoke(Source request) throws Exception
      Deprecated.
      Description copied from interface: PayloadEndpoint
      Invokes the endpoint with the given request payload, and possibly returns a response.
      Specified by:
      invoke in interface PayloadEndpoint
      Parameters:
      request - the payload of the request message, may be null
      Returns:
      the payload of the response message, may be null to indicate no response
      Throws:
      Exception - if an exception occurs
    • getDocumentElement

      protected org.dom4j.Element getDocumentElement(Source source) throws TransformerException
      Deprecated.
      Returns the payload element of the given source.

      Default implementation checks whether the source is a DOMSource, and uses a DOMReader to create a JDOM Element. In all other cases, or when alwaysTransform is true, the source is transformed into a DocumentResult, which is more expensive. If the passed source is null, null is returned.

      Parameters:
      source - the source to return the root element of; can be null
      Returns:
      the document element
      Throws:
      TransformerException - in case of errors
    • invokeInternal

      protected abstract org.dom4j.Element invokeInternal(org.dom4j.Element requestElement, org.dom4j.Document responseDocument) throws Exception
      Deprecated.
      Template method. Subclasses must implement this. Offers the request payload as a dom4j Element, and allows subclasses to return a response Element.

      The given dom4j Document is to be used for constructing a response element, by using addElement.

      Parameters:
      requestElement - the contents of the SOAP message as dom4j elements
      responseDocument - a dom4j document to be used for constructing a response
      Returns:
      the response element. Can be null to specify no response.
      Throws:
      Exception