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:
  • 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 is true.
    • setValidating

      public void setValidating(boolean validating)
      Deprecated.
      Set if the XML parser should validate the document. Default is false.
    • setExpandEntityReferences

      public void setExpandEntityReferences(boolean expandEntityRef)
      Deprecated.
      Set if the XML parser should expand entity reference nodes. Default is false.
    • setAlwaysTransform

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

      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
    • createDocumentBuilder

      protected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory) throws ParserConfigurationException
      Deprecated.
      Create a DocumentBuilder that this endpoint will use for parsing XML documents. Can be overridden in subclasses, adding further initialization of the builder.
      Parameters:
      factory - the DocumentBuilderFactory that the DocumentBuilder should be created with
      Returns:
      the DocumentBuilder
      Throws:
      ParserConfigurationException - if thrown by JAXP methods
    • createDocumentBuilderFactory

      protected DocumentBuilderFactory createDocumentBuilderFactory() throws ParserConfigurationException
      Deprecated.
      Create a DocumentBuilderFactory that this endpoint will use for constructing XML documents. Can be overridden in subclasses, adding further initialization of the factory. The resulting DocumentBuilderFactory 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 is true, the source is transformed into a DOMResult, 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
      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 response Element.

      The given DOM Document is to be used for constructing Nodes, by using the various create methods.

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