I am attempting to send a SOAP message with PowerShell that uses MTOM to attach an XML file. MTOM is the method specified by the web service so I don't have the option to include the XML file inline.
I'm getting confused when it comes to actually attaching the file to the SOAP message. I understand that the file is attached using the <xop:Include>
element in the SOAP message. But how do I specify the value that should be included for the href
attribute (i.e. how do I determine the string that should replace xxxxxxxxx
?
In all the examples that I've seen up to now the value for href
is always specified as something like 0ccceb3ce8deda6a3a666b587962a26a7524fe64d35d73ea@apache.org
but I don't understand how this is generated.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header></soapenv:Header>
<soapenv:Body>
<ns1:RequestAttInfo xmlns:ns1="urn:abb.com:project/isem/types">
<requestType xmlns="">mp.report</requestType>
<adminRole xmlns="">false</adminRole>
<requestDataCompressed xmlns="">false</requestDataCompressed>
<requestDataType xmlns="">XML</requestDataType>
<sendRequestDataOnSuccess xmlns="">true</sendRequestDataOnSuccess>
<sendResponseDataCompressed xmlns="">false</sendResponseDataCompressed>
<requestSignature xmlns="">yyyyyyyyy</requestSignature>
<requestData xmlns="">
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:xxxxxxxxx"></xop:Include>
</requestData>
</ns1:RequestAttInfo>
</soapenv:Body>
</soapenv:Envelope>