Question

I need to transfer a large amount of data like video or audio from java based client (stand alone app or Android) to Glassfish 3.1.2 application server. The stream should contain text and binary data. I am thinking of a SOAP message containing the data in itself like this:

  <song>
      <title>Some name</title>
      <data dt:dt="binary.base64">84592gv8Z53815Zb82bA68g</data>
  </song>

... and at server side - Web Service to process the data. Is this the right approach to do this?

Was it helpful?

Solution

If you go for the web service approach, I would recommend to use MTOM (Message Transmission Optimization Mechanism From) to transfer large payload. See How does MTOM work.

OTHER TIPS

I wouldn't implement it by myself, instead use an existing framework for it.

Check out Hessian. I haven't used it by myself, but Adam Bien keeps telling in his workshops that one should consider that for fast transfer of binary data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top