WebSphere Message Service Clients for C/C++ and .NET, Version 1.2 Operating Systems: Linux, Windows

ObjectMessage

An object message is a message whose body comprises a serialized Java or .NET object.

Inheritance hierarchy:
xms::PropertyContext
   |
   +----xms::Message
           |
           +----xms::ObjectMessage
Related reference
Object messages

Methods

Summary of methods:
Method Description
getObject Get the object that forms the body of the object message.
setObject Set the string that forms the body of the object message.

getObject – Get Object as Bytes

Interface:
xmsINT getObject(xmsSBYTE *buffer,
                 xmsINT bufferLength,
                 xmsINT *actualLength);

Get the object that forms the body of the object message.

For more information about how to use this method, see C++ methods that return a byte array.

Parameters:
buffer (output)
The buffer to contain the object, which is returned as an array of bytes.
bufferLength (input)
The length of the buffer in bytes. If you specify XMSC_QUERY_SIZE instead, the object is not returned, but its length is returned in the actualLength parameter.
actualLength (output)
The length of the object in bytes. If you specify a null pointer on input, the length is not returned.
Returns:
The length of the object in bytes.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION
  • XMS_X_MESSAGE_NOT_READABLE_EXCEPTION
  • XMS_X_MESSAGE_EOF_EXCEPTION
Notes:
  1. If the buffer is not large enough to store the whole object, XMS returns the object truncated to the length of the buffer, sets the actualLength parameter to the actual length of the object, and returns error code XMS_E_DATA_TRUNCATED.
  2. If any other error occurs while attempting to get the object, XMS reports the error but does not set the actualLength parameter.

setObject – Set Object as Bytes

Interface:
xmsVOID setObject(xmsSBYTE *value,
                  xmsINT length);

Set the string that forms the body of the object message.

Parameters:
value (input)
An array of bytes representing the object to be set.
length (input)
The number of bytes in the array.
Returns:
Void
Exceptions:
  • XMS_X_GENERAL_EXCEPTION
  • XMS_X_MESSAGE_NOT_WRITABLE_EXCEPTION

Inherited methods


Reference topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.