[Fix Pack 5 or later]


Configuring SOAP over JMS message types

You can configure your SOAP over Java™ Message Service (JMS) request or response messages to use either BytesMessage or TextMessage objects.

Before you begin

A Web service must be implemented as an enterprise bean for accessibility through the JMS transport.

About this task

For your Web services that use the emerging industry standard SOAP over JMS protocol, you can configure the SOAP over JMS requests and responses to specify whether the messages are transmitted within JMS BytesMessage (javax.jms.BytesMessage) or TextMessage (javax.jms.TextMessage) objects. The default message type is BytesMessage.

If the JMS message is a BytesMessage, the body of the JMS message is binary data.

If the JMS message is a TextMessage, the body of the JMS message is string data. For example, consider configuring text messages if you want to implement an audit or logging facility that requires JMS messages that are human readable.

When using SOAP over JMS as a transport for Web services request and response messages, it is important to understand the following performance considerations when deciding whether to use BytesMessage or TextMessage objects:
  • Memory usage -

    The payload within a TextMessage is string-based and because the individual characters are based on the UTF-16 character encoding, the payload within a TextMessage is likely to occupy twice as many bytes as an equivalent BytesMessage. For request and response messages with small payloads, this difference in memory usage between TextMessages and BytesMessages might not be important, but for large payloads, the difference in memory usage might become more important to consider for your business environment.

  • Binary attachments -

    When a JMS TextMessage is used to transport request and response messages, any binary attachments that are included along with the SOAP message body must be base64-encoded because the underlying message payload is string-based. When binary attachments are base64-encoded, additional processing time and memory are required to perform the transformation on that data. As a result, it is possible that the base64-encoded binary attachment might be up to one-third larger than the original unencoded version of the attachment. In this case, if this larger encoded attachment part is then transported in a string-based message payload, the memory usage required to transport the binary attachment part might be almost three times the memory size of the original unencoded binary attachment within a BytesMessage.

Procedure

Results

You have configured a Web service client to use either TextMessage or BytesMessage objects when using the SOAP over JMS protocol to transmit request and response messages.




In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Oct 21, 2010 10:04:34 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-mp&topic=twbs_soapjmsreqresp_msgtype
File name: twbs_soapjmsreqresp_msgtype.html