cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

SOAP Execute with MTOM fails with Snaplogic but same envelope works with SoapUI

swright
New Contributor III

I am using the following envelope in a SOAP execute snap to transfer a file using MTOM and it is failing but the same envelope in SoapUI works (only difference is that in snaplogic I use a variable to pass the filename):

<soapenv:Envelope

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:ucm="http://www.oracle.com/UCM">

<soapenv:Header/>

<soapenv:Body>

    <ucm:GenericRequest webKey="cs">

        <ucm:Service IdcService="CHECKIN_UNIVERSAL">

            <ucm:Document>

                <ucm:Field name="dDocTitle">Department Load File</ucm:Field>

                <ucm:Field name="dDocType">Document</ucm:Field>

                <ucm:Field name="dDocAuthor">[sakthisundarajan.rajaram@drivestream.com</ucm:Field](mailto:sakthisundarajan.rajaram@drivestream.com%3c/ucm:Field)>

                <ucm:Field name="dSecurityGroup">FAFusionImportExport</ucm:Field>

                <ucm:Field name="dDocAccount">hcm$/dataloader$/import$</ucm:Field>

                <ucm:Field name="primaryFile">$filename1</ucm:Field>

                <ucm:File name="primaryFile" href="$filename1">

                    <ucm:Contents>cid:$filename1</ucm:Contents>

                </ucm:File>

            </ucm:Document>

        </ucm:Service>

    </ucm:GenericRequest>

</soapenv:Body>

</soapenv:Envelope>

3 REPLIES 3

swright
New Contributor III

The error suggests to me that there may be something wrong with the filename or how it is being passed. Here is part of the response, and below that are screen shots of some of my settings:

{โ€œ@IdcServiceโ€:โ€œCHECKIN_UNIVERSALโ€,โ€œns2:Documentโ€:{โ€œns2:Fieldโ€:{โ€œ@nameโ€:โ€œerrorโ€,โ€œ$โ€:โ€œError: java.lang.reflect.InvocationTargetExceptionโ€}}}}}}

image

image

Hi swright,

Good day, I think you might need to add the xop node as per document (https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1437963/SOAP+Execute)

I donโ€™t see the xop node in your soap envelope

image

Thanks,
EmEm

swright
New Contributor III

Thanks EmEm! I tried this but it still doesnโ€™t work. Here is the envelope I used to try it with:

<soapenv:Envelope
xmlns:soapenv=โ€œhttp://schemas.xmlsoap.org/soap/envelope/โ€
xmlns:ucm=โ€œhttp://www.oracle.com/UCMโ€>
xmlns:ns0=โ€œhttp://www.snaplogic.com/snapbox/mtomโ€>
soapenv:Header/
soapenv:Body
<ucm:GenericRequest webKey=โ€œcsโ€>
<ucm:Service IdcService=โ€œCHECKIN_UNIVERSALโ€>
ucm:Document
<ucm:Field name=โ€œdDocTitleโ€>Department Load File</ucm:Field>
<ucm:Field name=โ€œdDocTypeโ€>Document</ucm:Field>
<ucm:Field name=โ€œdDocAuthorโ€>SKIDMORE.INT</ucm:Field>
<ucm:Field name=โ€œdSecurityGroupโ€>FAFusionImportExport</ucm:Field>
<ucm:Field name=โ€œdDocAccountโ€>hcm$/dataloader$/import$</ucm:Field>
<ucm:Field name=โ€œprimaryFileโ€>$filename</ucm:Field>
ns0:File
<xop:Include
xmlns:xop=โ€œhttp://www.w3.org/2004/08/xop/includeโ€
href=โ€œcid:ScottSkidID_Snap1โ€/>
</ns0:File>
</ucm:Document>
</ucm:Service>
</ucm:GenericRequest>
</soapenv:Body>
</soapenv:Envelope>

BTW - I also changed the Content_ID:

image

Thanks,
Scott