
SoapUI Cookbook
By :

In this recipe, we'll look at how to mock and test SOAP attachments using SoapUI. Without going into too many details, there are several options for sending binary attachments using SOAP:
Inline Attachment: The attachment is encoded using Base64 and is represented as XML inside the SOAP envelope.
SOAP with attachments (SwA): The attachment is not encoded, and is represented separately to the SOAP envelope as binary data using a mime attachment. The attachment is then referenced from the SOAP message using href
, for example, <attachment href="cid:imgID"/>
.
Message Transmission Optimization Mechanism (MTOM) using XML-binary Optimized Packaging (XOP): Like SwA, a separate mime attachment is used to represent the binary data, but XOP allows the attachment data to be logically included within the SOAP envelope using an XOP ref, for example, <attachment><xop:Include href="cid:imgID" xmlns:xop="http://www.w3.org/2004/08/xop/include...