Extension function to create a text message from an object. The object must be serializable to XML.

Namespace:  Apache.NMS
Assembly:  Apache.NMS (in Apache.NMS.dll)

Syntax

Visual Basic
<ExtensionAttribute> _
Public Shared Function CreateXmlMessage ( _
	producer As IMessageProducer, _
	obj As Object _
) As ITextMessage
C#
public static ITextMessage CreateXmlMessage(
	this IMessageProducer producer,
	Object obj
)
Visual C++
[ExtensionAttribute]
public:
static ITextMessage^ CreateXmlMessage(
	IMessageProducer^ producer, 
	Object^ obj
)
JavaScript
Apache.NMS.MessageProducerExtensions.createXmlMessage = function(producer, obj);

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IMessageProducer. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also