public class DefaultMessageContext extends AbstractMessageContext
MessageContext
.Constructor and Description |
---|
DefaultMessageContext(WebServiceMessageFactory messageFactory)
Construct a new, empty instance of the
DefaultMessageContext with the given message factory. |
DefaultMessageContext(WebServiceMessage request,
WebServiceMessageFactory messageFactory)
Construct a new instance of the
DefaultMessageContext with the given request message and message
factory. |
Modifier and Type | Method and Description |
---|---|
void |
clearResponse()
Removes the response message, if any.
|
WebServiceMessageFactory |
getMessageFactory() |
WebServiceMessage |
getRequest()
Returns the request message.
|
WebServiceMessage |
getResponse()
Returns the response message.
|
boolean |
hasResponse()
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.
|
containsProperty, getProperty, getPropertyNames, removeProperty, setProperty
public DefaultMessageContext(WebServiceMessageFactory messageFactory)
DefaultMessageContext
with the given message factory.public DefaultMessageContext(WebServiceMessage request, WebServiceMessageFactory messageFactory)
DefaultMessageContext
with the given request message and message
factory.public WebServiceMessage getRequest()
MessageContext
public boolean hasResponse()
MessageContext
true
if this context has a response; false
otherwisepublic WebServiceMessage getResponse()
MessageContext
MessageContext.hasResponse()
public void setResponse(WebServiceMessage response)
MessageContext
response
- the response messagepublic void clearResponse()
MessageContext
public void readResponse(InputStream inputStream) throws IOException
MessageContext
inputStream
- the stream to read the response fromIOException
- in case of I/O errorspublic WebServiceMessageFactory getMessageFactory()