我正在使用SoapUI将带有MTom附件的SOAP请求发送到DataPower端点。以下是从SoapUI提取的原始请求。如何从.NET HttpWebReqeust或HttpClient发送相同的请求?
POST https://ebppitbiller.sadad.com:5878/S2/wsdl/BulkUploadService/V1.0 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/related; type="application/xop+xml"; start="<rootpart@soapui.org>"; start-info="text/xml"; boundary="----=_Part_22_17218297.1550585942035"
SOAPAction: ""
MIME-Version: 1.0
Content-Length: 2910
Host: ebppitbiller.sadad.com:5878
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
------=_Part_22_17218297.1550585942035
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <rootpart@soapui.org>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/" xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://sadad.com/schema/service/Upload/1.0" xmlns:ns2="http://sadad.com/schema/Common/1.0">
<soapenv:Header>
<ns:Messaging>
<ns:SignalMessage>
<ns:MessageInfo>
<ns:Timestamp>2019-02-17T13:30:47</ns:Timestamp>
<ns:MessageId>74dcad2e-8c14-4f03-bb15-f0b0d56688c1</ns:MessageId>
</ns:MessageInfo>
</ns:SignalMessage>
<ns:UserMessage>
<ns:MessageInfo>
<ns:Timestamp>2019-02-17T13:30:47</ns:Timestamp>
<ns:MessageId>74dcad2e-8c14-4f03-bb15-f0b0d56688c1</ns:MessageId>
</ns:MessageInfo>
<ns:PartyInfo>
<ns:From>
<ns:PartyId>901</ns:PartyId>
<ns:Role>BILLER</ns:Role>
</ns:From>
<ns:To>
<ns:PartyId>SADAD-001</ns:PartyId>
<ns:Role>SADAD</ns:Role>
</ns:To>
</ns:PartyInfo>
<ns:CollaborationInfo>
<ns:Action>UploadMsg</ns:Action>
<ns:Service>AUPLRQ</ns:Service>
<ns:ConversationId>74dcad2e-8c14-4f03-bb15-f0b0d56688c1</ns:ConversationId>
</ns:CollaborationInfo>
</ns:UserMessage>
</ns:Messaging>
</soapenv:Header>
<soapenv:Body>
<ns1:UploadMsgRq>
<ns2:FileType>.xml</ns2:FileType>
<ns2:AsyncRqUID>f610d072-d16c-4483-8d74-1fce8c56247e</ns2:AsyncRqUID>
<ns2:Attachment><inc:Include href="cid:76855233430" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></ns2:Attachment>
</ns1:UploadMsgRq>
</soapenv:Body>
</soapenv:Envelope>
------=_Part_22_17218297.1550585942035
Content-Type: text/xml; charset=us-ascii; name=AUPLRQ-2019-02-14-6.xml
Content-Transfer-Encoding: 7bit
Content-ID: <AUPLRQ-2019-02-14-6.xml>
Content-Disposition: attachment; name="AUPLRQ-2019-02-14-6.xml"; filename="AUPLRQ-2019-02-14-6.xml"
<SADAD><SignonRq><ClientDt>2019-02-14T15:07:25</ClientDt><LanguagePref>en-gb</LanguagePref><SignonProfile><Sender>901</Sender><Receiver>SADAD-001</Receiver><MsgCode>AUPLRQ</MsgCode></SignonProfile></SignonRq><BillerSvcRq><RqUID>c356e366-0a5a-40e8-ac48-11fb41916236</RqUID><AccountUploadRq><Timestamp>2019-02-14T15:07:25</Timestamp><AccountInfo><BillerId>901</BillerId><BillingAcct>1006373811</BillingAcct><ServiceType>UTIL</ServiceType><AccountStatusCode>AcctNew</AccountStatusCode></AccountInfo></AccountUploadRq></BillerSvcRq></SADAD>
------=_Part_22_17218297.1550585942035--