Enable MTOM support

API Scan allows you to use the SOAP Message Transmission Optimization Mechanism (MTOM) when you send attachments.

MTOM optimizes the delivery of binary data such as images or PDF files to and from webservices. With MTOM, binary data is not included in the payload of the SOAP message but sent as a Multipurpose Internet Mail Extension (MIME) attachment.

Use MTOM

You can enable MTOM support in the Attachments tab of API Scan as described in chapter "Send attachments".

If you use MTOM for your message, you have to point to the attachment that contains the binary data in the payload.

To do so, use the following reference in the payload: "<inc:Include href="cid:myfile.myfileextension" xmlns:inc="http://www.w3.org/2004/08/xop/include"/>".

Example

The example below shows a payload with a reference to an attachment.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:upl="http://UploadService">

<soapenv:Header/>

<soapenv:Body>

<upl:UploadFile>

<upl:messages>

<upl:UploadFileMessage>

<upl:FileData><inc:Include href="cid:data.bin" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></upl:FileData>

<upl:FileName>data.bin</upl:FileName>

</upl:UploadFileMessage>

</upl:messages>

</upl:UploadFile>

</soapenv:Body>

</soapenv:Envelope>