SOAP Execute snap attachment error

Hello All,

Trying to send a zip file to a SOAP service using the SOAP Execute snap. I attach it in the snap but do I need to reference it in the envelope? I mention the filename but I am clueless as to how do I reference the file in the soap envelope. The Sample SOAP payload is below:

<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/"
    xmlns:ns1="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <ns0:loadAndImportData>
            <ns0:document>
                <ns1:Content>$document.Content</ns1:Content>
                <ns1:FileName>$document.FileName</ns1:FileName>
                <ns1:ContentType>$document.ContentType</ns1:ContentType>
                <ns1:DocumentTitle>$document.DocumentTitle</ns1:DocumentTitle>
                <ns1:DocumentAuthor>$document.DocumentAuthor</ns1:DocumentAuthor>
                <ns1:DocumentSecurityGroup>$document.DocumentSecurityGroup</ns1:DocumentSecurityGroup>
                <ns1:DocumentAccount>$document.DocumentAccount</ns1:DocumentAccount>
                <ns1:DocumentName>$document.DocumentName</ns1:DocumentName>
                <ns1:DocumentId>$document.DocumentId</ns1:DocumentId>
            </ns0:document>#foreach($jobList in $jobList)
            <ns0:jobList>
                <ns1:JobName>$jobList.JobName</ns1:JobName>
                <ns1:ParameterList>$jobList.ParameterList</ns1:ParameterList>
                <ns1:JobRequestId>$jobList.JobRequestId</ns1:JobRequestId>
            </ns0:jobList>#end
            <ns0:interfaceDetails>$interfaceDetails</ns0:interfaceDetails>
            <ns0:notificationCode>$notificationCode</ns0:notificationCode>
            <ns0:callbackURL>$callbackURL</ns0:callbackURL>
        </ns0:loadAndImportData>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Any help is appreciated.
-Amol

@wani-amol, it appears that you are using Oracle Financials (Cloud?) and the ERP Integration Service’s loadAndImportData operation.

According to this documentation:

https://docs.oracle.com/en/cloud/saas/financials/18c/oeswf/document-information-DocumentDetails-svcDataObj-30.html

the type of the <ns1:Content> field is {http://xmlns.oracle.com/adf/svc/types/}base64Binary-DataHandler - I imagine that means the file content is Base64-encoded.

SnapLogic provides Base64 encoding via the Expression Language and also via the Binary to Document Snap - you could use either of those depending on your pipeline design. Mapping the Base64 encoded data to the $document.Content property, so that it may be used in the SOAP Execute’s template, should complete the required steps.

Hey Robin,

I figured the issue. I was trying to find a way to reference the file I am attaching to the soap snap in the envelope. Refer below:

erp:Content
<xop:Include
xmlns:xop=“http://www.w3.org/2004/08/xop/include” href=“cid:ArAutoinvoiceImport.zip”/>
</erp:Content>

I had to add the xop line and reference the filename to send it across.
I had encoded the file in Base64 format but it gave me an error. When i sent the file without encoding, it went through which was weird but it solved my error.
Thanks for your help though! :slight_smile:

-Amol