public class ByteArrayMessageFormat extends java.lang.Object implements MsmqMessageFormat
Depending on the version of Windows / architecture then the default encoding for a VT_BSTR variant may not be UTF-8; it may be UTF-16 which of course gives you double-byte encoding. This sometimes presents issues for .NET applications which are not designed for that. Using this ByteArrayMessageFormat causes the variant to be VT_UI1 | VT_ARRAY which, if your message isn't already double-byte encoded, will enable interoperability with older .NET applications due to internal MSMQ auto conversion.
StringMessageFormat
In the adapter configuration file this class is aliased as msmq-byte-array-message-format which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
ByteArrayMessageFormat() |
Modifier and Type | Method and Description |
---|---|
void |
writePayload(AdaptrisMessage aMsg,
Message msmqMsg) |
public void writePayload(AdaptrisMessage aMsg, Message msmqMsg) throws MSMQException
writePayload
in interface MsmqMessageFormat
MSMQException
Copyright Adaptris