我和这个几乎有同样的问题,但我只需要在 SOAP 正文中发送 [MyXML]。就像这样:
POST /soap HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/octet-stream
SOAPAction: "getData"
Content-Length: 1664
Host: abc.com
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://xy.com/ns1">
<soapenv:Header>
<ns1:metadata>
<ns1:processGroup>PG</ns1:processGroup>
<ns1:processName>PN</ns1:processName>
<ns1:applReqID>445526687456</ns1:applReqID>
<ns1:receiver>XY</ns1:receiver>
<ns1:documentVersion>2<ns1:documentVersion>
</ns1:metadata>
</soapenv:Header>
<soapenv:Body>
<sh:StandardBusinessDocument>
<sh:StandardBusinessDocumentHeader>
<sh:HeaderVersion>1.0</sh:HeaderVersion>
...
</sh:StandardBusinessDocument>
</soapenv:Body>
</soapenv:Envelope>
在delphi 2010中是否有可能以及如何做到这一点?
另一个问题是我将如何更改 Content-Type,因为您可以看到 web 服务请求是 application/octet-stream?