Forum Discussion

joe_sydney's avatar
joe_sydney
Occasional Contributor
4 years ago

Response is MTOM with Attachment - What format is the Dump File in (and how do I decode it) ?

I have a WebService (Oracle Fusion to be exact) which is meant to download a file as an MTOM Attachment;

In the Request on SOAP-UI I left all properties as default, except "Enable MTOM"= true, and "Dump File" I specify the path of a file.

 

After I execute the request, the Response comes back ok (Just a normal soap / xml response, including the following fragment::

 

 

<ns2:File name="" href="Some-File-name-etc-which-is-a-Microsoft-Excel-File-whatever.xlsx">
  <ns2:Contents>
    <xop:Include 
        href="cid:c1cb91f1-e389-41ce-a941-4347afe74036" 
        xmlns:xop="http://www.w3.org/2004/08/xop/include" />
  </ns2:Contents>
</ns2:File>

 

In the SOAP-UI attachments section of the Response, the Content-Type= application/octet-stream and Type=XOP
 
  1. The Dump File gets written to disk - But what exactly are the contents of the Dump file ?
  2. And what format is it ?
  3. And how do I decode it ?
  4. Does the dump file include the request soapenv, the response soapenv, both request/response soap, just the attachment ?
  5. Is this documented anywhere on the SoapUI site ?
 
  • Answering my own question, I struggled with this un-necessarily. Could the powers that be please document more info on the Dump File ?

     

    After examining the raw response, I could see "Content-Encoding: gzip"; I guess this would be dependent on the config of the web-server / service.

     

    So I pulled out my fav lib GZipStream (C#) to decode the dump file, and got an intelligible format for the dump file. And the answer is the Dump File contains only the Body Response (+ Attachment embedded in there as a binary for my case).

  • joe_sydney's avatar
    joe_sydney
    Occasional Contributor

    Answering my own question, I struggled with this un-necessarily. Could the powers that be please document more info on the Dump File ?

     

    After examining the raw response, I could see "Content-Encoding: gzip"; I guess this would be dependent on the config of the web-server / service.

     

    So I pulled out my fav lib GZipStream (C#) to decode the dump file, and got an intelligible format for the dump file. And the answer is the Dump File contains only the Body Response (+ Attachment embedded in there as a binary for my case).