Transcoding a byte array into a message payload

A mediation can transcode a byte array into a message payload without changing the meaning of the message.

Example

A mediation can reconstruct the message payload from a byte array, for example after logging a message. The table below describes the rules for transcoding a byte array into an SIMessage data graph.
Format argument Pre-conditions Outcome
JMS: None Returns null
JMS:text java.lang.String(inputBytes, ”UTF-8”) does not result in an exception. Returns new data graph instance of format JMS:text. Value of graph at path data/value has value equal to java.lang.String(inputBytes, ”UTF-8”).
JMS:bytes inputBytes is not null. Returns new data graph instance of format JMS:bytes. Value of graph at path data/value is a copy of the inputBytes byte array.
JMS:stream Byte array is XML, and is valid with respect to the JmsStreamBody type of the XML schema definition. Returns new data graph instance of format JMS:stream. Value of graph at path data/value has type List, containing a sequence of simple typed values according to the types and values of each of the elements in the XML document.
JMS:object Not null
Note: You must ensure that the byte array is a valid serialized object.
Returns new data graph instance of format JMS:object. Value of graph at path data/value is a copy of the inputBytes byte array.
SOAP: The byte buffer contains valid SOAP with respect to the associated WSDL model. Returns new data graph with type system defined by the WSDL referenced by the byte buffer, and values of the graph defined by the SOAP payload.
Bean: The byte buffer contains valid Bean with respect to the associated WSDL model. Returns new data graph with type system defined by the WSDL referenced by the byte buffer, and values of the graph defined by the Bean payload.



Related reference
Transcoding between message formats
Reference topic    

Terms of Use | Feedback

Last updated: Aug 29, 2010 10:43:27 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v602web&product=was-nd-mp&topic=transcode_byte_array_to_msg_payload
File name: transcode_byte_array_to_msg_payload.html