Forum Discussion

maheshdsouza's avatar
maheshdsouza
Occasional Visitor
9 years ago

SOAP UI MTOM attachmemt problems.

I am having problems with MTOM attachment with SOAP UI where its converting all attributes to inc:Include href="cid: format instead of just the one attribute I want. If you see below in the XML request snippet I just want the attachment data to be included as an MTOM attchment but its converting all attributes to MTOM attchment format. I have pasted the raw data below the xml snippet.I have also attached the XML request and Raw data. If anyone has any similar issue please help.

 

</Attachment>
<Attachment>
<AttachmentAction>Import</AttachmentAction>
<AttachmentName>test.xml</AttachmentName>
<!--Optional:-->
<AttachmentDescription></AttachmentDescription>
<!--You have a CHOICE of the next 2 items at this level-->
<AttachmentData>cid:test.xml</AttachmentData>
<ECMReference></ECMReference>
</Attachment>

</imp:importRequestHeader>
<gen1:GENDOCRequest>
<!--Optional:-->
<any:AMS_DOCUMENT>
<!--You may enter ANY elements at this point-->
<JV_DOC_HDR AMSDataObject="Y">
<DOC_CAT Attribute="Y"><![CDATA[JV]]></DOC_CAT>
<DOC_TYP Attribute="Y"><![CDATA[JV]]></DOC_TYP>
<DOC_CD Attribute="Y"><![CDATA[JV]]></DOC_CD>
<DOC_DEPT_CD Attribute="Y"><![CDATA[010]]></DOC_DEPT_CD>
<DOC_ID Attribute="Y"><![CDATA[MD11030000000000020]]></DOC_ID>
<DOC_VERS_NO Attribute="Y"><![CDATA[1]]></DOC_VERS_NO>
<DOC_ACT_FL Attribute="Y"><![CDATA[true]]></DOC_ACT_FL>
<DOC_ACTN_CD Attribute="Y"><![CDATA[122]]></DOC_ACTN_CD>
<DOC_S_ACTN_CD Attribute="Y"><![CDATA[0]]></DOC_S_ACTN_CD>
<DOC_ACTU_AM Attribute="Y"><![CDATA[100.00]]></DOC_ACTU_AM>
<DOC_CMNT_FL Attribute="Y"><![CDATA[false]]></DOC_CMNT_FL>
<DOC_CREA_DT Attribute="Y"><![CDATA[2003-12-11 11:16:02.000000]]></DOC_CREA_DT>
<DOC_CREA_USID Attribute="Y"><![CDATA[trmcclen]]></DOC_CREA_USID>
<DOC_FUNC_CD Attribute="Y"><![CDATA[1]]></DOC_FUNC_CD>
<DOC_S_FUNC_CD Attribute="Y"><![CDATA[1]]></DOC_S_FUNC_CD>
<DOC_EXPT_AM Attribute="Y"><![CDATA[0.00]]></DOC_EXPT_AM>
<DOC_CLSD_AM Attribute="Y"><![CDATA[null]]></DOC_CLSD_AM>
<DOC_CLSD_DT Attribute="Y"><![CDATA[null]]></DOC_CLSD_DT>
<DOC_LAST_DT Attribute="Y"><![CDATA[2003-12-11 11:16:25.000000]]></DOC

 

************************Raw Data*************

<Attachment>
<AttachmentAction>Import</AttachmentAction>
<AttachmentName>error.log</AttachmentName>
<!--Optional:-->
<AttachmentDescription/>
<!--You have a CHOICE of the next 2 items at this level-->
<AttachmentData><inc:Include href="cid:error.log" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></AttachmentData>
<ECMReference/>
</Attachment>
<Attachment>
<AttachmentAction>Import</AttachmentAction>
<AttachmentName>test.xml</AttachmentName>
<!--Optional:-->
<AttachmentDescription/>
<!--You have a CHOICE of the next 2 items at this level-->
<AttachmentData><inc:Include href="cid:test.xml" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></AttachmentData>
<ECMReference/>
</Attachment>

</imp:importRequestHeader>
<gen1:GENDOCRequest>
<!--Optional:-->
<any:AMS_DOCUMENT>
<!--You may enter ANY elements at this point-->
<JV_DOC_HDR AMSDataObject="Y">
<DOC_CAT Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322116941634" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_CAT>
<DOC_TYP Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322116991429" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_TYP>
<DOC_CD Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117033242" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_CD>
<DOC_DEPT_CD Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117073154" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_DEPT_CD>
<DOC_ID Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117113446" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_ID>
<DOC_VERS_NO Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117152977" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_VERS_NO>
<DOC_ACT_FL Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117193270" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_ACT_FL>
<DOC_ACTN_CD Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117234322" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_ACTN_CD>
<DOC_S_ACTN_CD Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117274994" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_S_ACTN_CD>
<DOC_ACTU_AM Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117317947" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_ACTU_AM>
<DOC_CMNT_FL Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117359379" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_CMNT_FL>
<DOC_CREA_DT Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117404613" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_CREA_DT>
<DOC_CREA_USID Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117447566" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_CREA_USID>
<DOC_FUNC_CD Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117489758" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_FUNC_CD>
<DOC_S_FUNC_CD Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117531571" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_S_FUNC_CD>
<DOC_EXPT_AM Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117573383" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></DOC_EXPT_AM>
<DOC_CLSD_AM Attribute="Y"><inc:Include href="cid:http://www.soapui.org/82322117614436" xmlns:inc="http://www.w3.org/2004/0

 

......

2 Replies

  • Hi, 

     

    I have here exactly the same problem. When enabling MTOM = true also some other elements are changed into unexpected format. 

     

    -- This was sent ---

     

    <mes:Attachments>
       <com:name>Jellyfish.jpg</com:name>
       <com:mimeType>image/jpeg</com:mimeType>
       <com:data>cid:Jellyfish.jpg</com:data>
    </mes:Attachments>

     

    --- This was received by the WS-Endpoint  ---

    <mes:Attachments>
       <com:name><inc:Include href="cid:http://www.soapui.org/83397145883111" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></com:name>
       <com:mimeType><inc:Include href="cid:http://www.soapui.org/83397146167615" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></com:mimeType>
       <com:data><inc:Include href="cid:Jellyfish.jpg" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></com:data>
    </mes:Attachments>

     

    -------------------

     

    But this gets even more strange. On my team mate's workstation this is working as expected. There only the base64binary type element ( data ) got wrapped for XOP include.

     

    We are both having the SoapUI 5.2.0 version ( latest ).

     

      

    • surffer_dude's avatar
      surffer_dude
      New Contributor

      Hi,

       

      I don't know if this is really a solution for the problem, but I seem to have some sort of workaround for this by creating a new Project. Newly created project wraps only the binary element for MTOM. 

       

      Maybe someone from smartbear could comment this...