Attachments with SOAP

Just read an article on how to send (binary) attachments with SOAP.

One described approach is to include the data as MIME or Base64 encoded CDATA blocks. Another possibility is to attach the binary data outside the SOAP message (like it is done in emails). Finally the author talks about SOAP Message Transmission Optimization Mechanism (MTOM), which is supposed to fix the problem.

Well, MTOM has to be understood by the server and the client, which means we have to find a proper implementation etc. Why all this hassle? If it is necessary to send such data, it would perhaps make sense to think of using a Resource-Oriented Architecture (ROA) like RESTful Web Services. This doesn’t mean that it is necessary to switch over completely from a SOA to a ROA, but both techniques could complement each other in RPC-heavy systems. In other cases I would try to avoid using SOAP and focus on resources instead.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s