2

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.

  1. 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++.

  2. 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.

  3. 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.

user2913184
  • 590
  • 10
  • 33
  • I think that your question is too unspecific and too broad for the format of StackOverflow (it may be a good question on a forum website). Perhaps if you split it into smaller questions and add more detail it could work here. That said, there is a MsgPack for Java (I'm not familiar with it) https://github.com/msgpack/msgpack-java and if that isn't cross-language like your linked post claims, you could also look into Google Protocol Buffers which can be used for cross-language transfers and works on C# and Java – Erwin Bolwidt Jan 24 '18 at 02:35

0 Answers0