How to receive / send files using java Webservice

I am writing a WebService in Java that should receive a file as input, and then WebService does some processing in that file and finally has to send a new client to the client. How to send a file to a client? (and how can I tell them to download it).

+3
source share
2 answers

Files are usually transferred by encoding them with Base64 and putting them in xsd:base64binary

+2
source

For a large file, find MTOM (Message Transfer Optimization Mechanism). From the JAX-WS Metro Guide: Binary Attachment :

MTOM , 33% , xs:base64Binary . , , W3C. MIME multipart , .

+1

Source: https://habr.com/ru/post/1748823/


All Articles