I will be doing some work on C# side using MessagePack and I have learned that I can send a request by serializing/packing it first by using MsgPack API and then converting the serialized/packed object into a byte[]
, to a Java restful service. And on the Java side the developer who wrote the Java restful service is also expecting a byte array with a mime type application/octet-stream
.
There are a couple of things that I'm confused with.
The serialized object that will be sent from C# as a byte array needs to be deserialized on Java side and the response will be sent back to C# presumably again in a binary format i.e. another byte array. But according to this stackoverflow post here MessagePack library is not able to do such a thing, though this example is for communication between C# and C++.
If some how its possible to communicate between C# and Java restful service using MsgPack, do I need to have Java developer write media formatter of type
application/x-msgpack
so that he can understand the serialized object that is coming in from C#. And in such a case I would assume that rather than sending a byte array I will have to send MsgPack serialized object written into a stream.Has anyone done something similar for communicating between C# and Java using MsgPack? If yes please post any code snippets or link to your work. I will really appreciate it.