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

public class JmsMessageReceiver extends org.springframework.ws.transport.support.SimpleWebServiceMessageReceiverObjectSupport
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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Default encoding used to read from and write to TextMessage messages.

    Fields inherited from class org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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 optional MessagePostProcessor 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 to TextMessage 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_TEXT_MESSAGE_ENCODING

      public static final String DEFAULT_TEXT_MESSAGE_ENCODING
      Default encoding used to read from and write to TextMessage messages.
      See Also:
  • Constructor Details

    • JmsMessageReceiver

      public JmsMessageReceiver()
  • Method Details

    • setTextMessageEncoding

      public void setTextMessageEncoding(String textMessageEncoding)
      Sets the encoding used to read from and write to TextMessage messages. Defaults to UTF-8.
    • setPostProcessor

      public void setPostProcessor(org.springframework.jms.core.MessagePostProcessor postProcessor)
      Sets the optional MessagePostProcessor 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 message
      session - the JMS session used to create a response
      Throws:
      IllegalArgumentException - when request is not a BytesMessage
      Exception