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.
Transfer binary and text data to Glassfish
-
13-04-2022 - |
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?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow