XML Serializer

NuGet Package NServiceBus (3.x)
Standard support for version 3.x of NServiceBus has expired. For more information see our Support Policy.



Inferring message type from root node name

In integration scenarios where the sender is unable to add headers to the message, the serializer can infer the CLR message type based on the root node of the XML payload. To take advantage of this, the name of the payload's root node must match the Type.FullName of a message type known to the receiving endpoint.

This technique allows messages without any headers, including the NServiceBus.EnclosedMessageTypes header, to be processed. This is demonstrated by the native integration with RabbitMQ sample.


XML attributes

The XML serializer in NServiceBus is a custom implementation. As such it does not support the standard .NET XML attributes.

Unsupported types

  • HashTable
  • Types with non-default constructors. So types must have a public constructor with no parameters.
  • ArrayList


Last modified