public class JmsReceiverConnection
extends org.springframework.ws.transport.AbstractReceiverConnection
WebServiceConnection that is used for server-side JMS access. Exposes a BytesMessage or TextMessage request and response message.
The response message type is equal to the request message type, i.e. if a BytesMessage is received as
request, a BytesMessage is created as response, and if a TextMessage is received, a
TextMessage response is created.
| Modifier | Constructor and Description |
|---|---|
protected |
JmsReceiverConnection(BytesMessage requestMessage,
Session session)
Constructs a new JMS connection with the given
BytesMessage. |
protected |
JmsReceiverConnection(TextMessage requestMessage,
String encoding,
Session session)
Constructs a new JMS connection with the given
TextMessage. |
| Modifier and Type | Method and Description |
|---|---|
void |
addResponseHeader(String name,
String value) |
String |
getErrorMessage() |
Iterator<String> |
getRequestHeaderNames() |
Iterator<String> |
getRequestHeaders(String name) |
protected InputStream |
getRequestInputStream() |
Message |
getRequestMessage()
Returns the request message for this connection.
|
Message |
getResponseMessage()
Returns the response message, if any, for this connection.
|
protected OutputStream |
getResponseOutputStream() |
URI |
getUri() |
boolean |
hasError() |
protected void |
onSendAfterWrite(org.springframework.ws.WebServiceMessage message) |
protected void |
onSendBeforeWrite(org.springframework.ws.WebServiceMessage message) |
createTransportInputStream, createTransportOutputStream, onCloseprotected JmsReceiverConnection(BytesMessage requestMessage, Session session)
BytesMessage.requestMessage - the JMS request messagesession - the JMS sessionprotected JmsReceiverConnection(TextMessage requestMessage, String encoding, Session session)
TextMessage.requestMessage - the JMS request messagesession - the JMS sessionpublic Message getRequestMessage()
BytesMessage or a TextMessage.public Message getResponseMessage()
BytesMessage or a TextMessage.public URI getUri() throws URISyntaxException
URISyntaxExceptionpublic String getErrorMessage() throws IOException
IOExceptionpublic boolean hasError()
throws IOException
IOExceptionpublic Iterator<String> getRequestHeaderNames() throws IOException
IOExceptionpublic Iterator<String> getRequestHeaders(String name) throws IOException
IOExceptionprotected InputStream getRequestInputStream() throws IOException
getRequestInputStream in class org.springframework.ws.transport.AbstractReceiverConnectionIOExceptionprotected void onSendBeforeWrite(org.springframework.ws.WebServiceMessage message)
throws IOException
onSendBeforeWrite in class org.springframework.ws.transport.AbstractWebServiceConnectionIOExceptionpublic void addResponseHeader(String name, String value) throws IOException
IOExceptionprotected OutputStream getResponseOutputStream() throws IOException
getResponseOutputStream in class org.springframework.ws.transport.AbstractReceiverConnectionIOExceptionprotected void onSendAfterWrite(org.springframework.ws.WebServiceMessage message)
throws IOException
onSendAfterWrite in class org.springframework.ws.transport.AbstractWebServiceConnectionIOException