1

I need to send a SOAP request and include a file.

I have read the Karate framework documentation and can see examples for file upload using a json request but cant work out how this can be modified for a SOAP request.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <AddDocumentRequest>
            <applicationId>123213</applicationId>
            <siteId>siteid</siteId>
            <username>User</username>
            <token>token</token>
            <documentName>testfile.txt</documentName>
            <documentFile>
                <xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:12324"/>
            </documentFile>
            <description>payslip</description>
            <isPrivate>true</isPrivate>
        </AddDocumentRequest>
    </soap:Body>
</soap:Envelope>

I usually use soap ui for this test but want to achieve the same thing using karate framework as I am using karate for all my api and performace testing.

Pablo
  • 35
  • 4

0 Answers0