Package org.springframework.ws.context
Class DefaultMessageContext
java.lang.Object
org.springframework.ws.context.AbstractMessageContext
org.springframework.ws.context.DefaultMessageContext
- All Implemented Interfaces:
MessageContext
Default implementation of
MessageContext
.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
-
Constructor Summary
ConstructorDescriptionDefaultMessageContext
(WebServiceMessageFactory messageFactory) Construct a new, empty instance of theDefaultMessageContext
with the given message factory.DefaultMessageContext
(WebServiceMessage request, WebServiceMessageFactory messageFactory) Construct a new instance of theDefaultMessageContext
with the given request message and message factory. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes the response message, if any.Returns the request message.Returns the response message.boolean
Indicates whether this context has a response.void
readResponse
(InputStream inputStream) Reads a response message from the given input stream.void
setResponse
(WebServiceMessage response) Sets the response message.Methods inherited from class org.springframework.ws.context.AbstractMessageContext
containsProperty, getProperty, getPropertyNames, removeProperty, setProperty
-
Constructor Details
-
DefaultMessageContext
Construct a new, empty instance of theDefaultMessageContext
with the given message factory. -
DefaultMessageContext
Construct a new instance of theDefaultMessageContext
with the given request message and message factory.
-
-
Method Details
-
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
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
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
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
-