Class DefaultMessageContext

java.lang.Object
org.springframework.ws.context.AbstractMessageContext
org.springframework.ws.context.DefaultMessageContext
All Implemented Interfaces:
MessageContext

public class DefaultMessageContext extends AbstractMessageContext
Default implementation of MessageContext.
Since:
1.0.0
Author:
Arjen Poutsma
  • Constructor Details

    • DefaultMessageContext

      public DefaultMessageContext(WebServiceMessageFactory messageFactory)
      Construct a new, empty instance of the DefaultMessageContext with the given message factory.
    • DefaultMessageContext

      public DefaultMessageContext(WebServiceMessage request, WebServiceMessageFactory messageFactory)
      Construct a new instance of the DefaultMessageContext with the given request message and message factory.
  • Method Details

    • getRequest

      public WebServiceMessage getRequest()
      Description copied from interface: MessageContext
      Returns the request message.
      Returns:
      the request message
    • hasResponse

      public boolean hasResponse()
      Description copied from interface: MessageContext
      Indicates whether this context has a response.
      Returns:
      true if this context has a response; false otherwise
    • getResponse

      public WebServiceMessage getResponse()
      Description copied from interface: MessageContext
      Returns the response message. Creates a new response if no response is present.
      Returns:
      the response message
      See Also:
    • setResponse

      public void setResponse(WebServiceMessage response)
      Description copied from interface: MessageContext
      Sets the response message.
      Parameters:
      response - the response message
    • clearResponse

      public void clearResponse()
      Description copied from interface: MessageContext
      Removes the response message, if any.
    • readResponse

      public void readResponse(InputStream inputStream) throws IOException
      Description copied from interface: MessageContext
      Reads a response message from the given input stream.
      Parameters:
      inputStream - the stream to read the response from
      Throws:
      IOException - in case of I/O errors
    • getMessageFactory

      public WebServiceMessageFactory getMessageFactory()