aspose file tools*
The moose likes Web Services and the fly likes Does JAX-WS require that attachments be base64 encoded? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Does JAX-WS require that attachments be base64 encoded?" Watch "Does JAX-WS require that attachments be base64 encoded?" New topic
Author

Does JAX-WS require that attachments be base64 encoded?

Ravi Danum
Ranch Hand

Joined: Jan 13, 2009
Posts: 104
Hello,

I am tasked with writing a web service which uploads and downloads various file types. The files could be very large. I don't want to use base64 encoding for the transport. I can use either JAX-WS or SAAJ. Does JAX-WS require that the data be base64 encoded? Thank you for any help you can give.

Ravi
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Not if you are using attachments (JAX-WS: Binary Attachments (MTOM)).

base64 encoding is only used if you intend to include the non-XML content inside the XML payload of the SOAP envelope (binary data without attachments).

The problem with the various attachment technologies is that they aren't equally well supported by all client SOAP stacks - so base64 encoding may be preferable.
Ravi Danum
Ranch Hand

Joined: Jan 13, 2009
Posts: 104
Thank you so much. That is a good start.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does JAX-WS require that attachments be base64 encoded?