0

I am writing a wsclient in which server side expects a zipped file as attachment using mtom method. After having some errors I now learned that server side expect file in zip folder to be base64 encoded. I know encoding with base64 make filesize 33% longer and that is why mtom is preferred. Thus, I want to ask your opinion about if there is any logical reason to base64 encode mtom attachment or this is just a poor design ?

cacert
  • 2,677
  • 10
  • 33
  • 56

1 Answers1

2

I would not say it's poor design, but in most cases it's preferable to enable MTOM and let him decide if it's more efficient to send the data as a MIME attachment or leave it as Base64 encoded data.

Note that if the file size you are sending is smaller than a certain size it's not optimal to send it as a MIME attachment. So if I create the web service and I know the files I will be receiving or sending back to the client are small, I won't need to use MTOM.

David Lizárraga
  • 1,172
  • 10
  • 17