Class JmsMessageReceiver
java.lang.Object
org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
org.springframework.ws.transport.support.SimpleWebServiceMessageReceiverObjectSupport
org.springframework.ws.transport.jms.JmsMessageReceiver
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
WebServiceMessageListener
Convenience base class for JMS server-side transport objects. Contains a
WebServiceMessageReceiver
, and has
methods for handling incoming JMS BytesMessage
and TextMessage
requests. Also contains a
textMessageEncoding
property, which determines the encoding used to read from and write to
TextMessages
. This property defaults to UTF-8
.
Used by WebServiceMessageListener
.
- Since:
- 1.5.0
- Author:
- Arjen Poutsma
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Default encoding used to read from and write toTextMessage
messages.Fields inherited from class org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final void
handleMessage
(jakarta.jms.Message request, jakarta.jms.Session session) Handles an incoming message.void
setPostProcessor
(org.springframework.jms.core.MessagePostProcessor postProcessor) Sets the optionalMessagePostProcessor
to further modify outgoing messages after the XML contents has been set.void
setTextMessageEncoding
(String textMessageEncoding) Sets the encoding used to read from and write toTextMessage
messages.Methods inherited from class org.springframework.ws.transport.support.SimpleWebServiceMessageReceiverObjectSupport
afterPropertiesSet, getMessageReceiver, handleConnection, setMessageReceiver
Methods inherited from class org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
getMessageFactory, handleConnection, handleNoEndpointFoundException, setMessageFactory
-
Field Details
-
DEFAULT_TEXT_MESSAGE_ENCODING
Default encoding used to read from and write toTextMessage
messages.- See Also:
-
-
Constructor Details
-
JmsMessageReceiver
public JmsMessageReceiver()
-
-
Method Details
-
setTextMessageEncoding
Sets the encoding used to read from and write toTextMessage
messages. Defaults toUTF-8
. -
setPostProcessor
public void setPostProcessor(org.springframework.jms.core.MessagePostProcessor postProcessor) Sets the optionalMessagePostProcessor
to further modify outgoing messages after the XML contents has been set. -
handleMessage
protected final void handleMessage(jakarta.jms.Message request, jakarta.jms.Session session) throws Exception Handles an incoming message. Uses the given session to create a response message.- Parameters:
request
- the incoming messagesession
- the JMS session used to create a response- Throws:
IllegalArgumentException
- when request is not aBytesMessage
Exception
-