Class AbstractSaxPayloadEndpoint

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

@Deprecated public abstract class AbstractSaxPayloadEndpoint 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 with a SAX ContentHandler. Allows subclasses to create a response by returning a Source.

Implementations of this class should create a new handler for each call of createContentHandler, because of thread safety. The handlers is later passed on to createResponse, so it can be used for holding request-specific state.

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

    • AbstractSaxPayloadEndpoint

      public AbstractSaxPayloadEndpoint()
      Deprecated.
  • Method Details

    • invoke

      public final Source invoke(Source request) throws Exception
      Deprecated.
      Invokes the provided ContentHandler on the given request. After parsing has been done, the provided response is returned.
      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
      See Also:
    • createContentHandler

      protected abstract ContentHandler createContentHandler() throws Exception
      Deprecated.
      Returns the SAX ContentHandler used to parse the incoming request payload. A new instance should be created for each call, because of thread-safety. The content handler can be used to hold request-specific state.

      If an incoming message does not contain a payload, this method will not be invoked.

      Returns:
      a SAX content handler to be used for parsing
      Throws:
      Exception
    • getResponse

      protected abstract Source getResponse(ContentHandler contentHandler) throws Exception
      Deprecated.
      Returns the response to be given, if any. This method is called after the request payload has been parsed using the SAX ContentHandler. The passed ContentHandler is created by createContentHandler(): it can be used to hold request-specific state.

      If an incoming message does not contain a payload, this method will be invoked with null as content handler.

      Parameters:
      contentHandler - the content handler used to parse the request
      Throws:
      Exception