I have a chat application working fine sending and receiving to Windows Service Bus 1.0 (not Azure - this in on-premise windows server version)
I can send/receive my message objects perfectly well using BrokeredMessage through the 1.8 SDK
When I send the exact same object to the same topic using the REST API then my receiver complains that "There was an error deserializing the object of type ServiceBusChat.ChatMessage. The input source is not correctly formatted."
This exception fires at this line in my async receiver
ChatMessage receivedMessage = message.GetBody<ChatMessage>();
Just to be clear - this listener is working fine when the message is sent through the SDK, but fails when the same BrokeredMessage is sent via the REST API. (and yes, my POST to the REST API does get a successful 201 created response)
When I look at what is being sent behind the scenes using Fiddler it looks like the SDK serializes BrokeredMessages differently from the built in REST API. I've tried using a BinaryFormatter to deserialize the message stream on the receiver but no joy. I've also tried binary formatting the message when I send it to the REST API but I can not find a way that works when messages are sent both through the SDK and also through REST API.
Surely it should be possible to send the same messages through SDK or REST API and receive both in the same way? Or is this something which will be fixed in version 2.0IF that ever gets released for Windows Server?
(Aside : or have Microsoft abandoned on-premise Windows Server version - the focus seems to be 100% on Azure version now and everything has gone quiet for on-premise Windows Server version)