【发布时间】:2011-07-17 20:30:18
【问题描述】:
需要从第三方发送和接收以下格式的 SOAP 消息:
POST /api HTTP/1.1
Host: mytesthost.com
Content-Type: multipart/related;
boundary="aMIMEBoundary";
type="text/xml";
start="<soap-start>"
Content-Length: 2014
SOAPAction: ""
--aMIMEBoundary
Content-Type: text/xml; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-ID: <soap-start>
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-
env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
...
</soap-env:Header>
<soap-env:Body>
...
</soap-env:Body>
</soap-env:Envelope>
--aMIMEBoundary
Content-Type: image/gif
Content-ID: dancingbaby.gif
Content-Transfer-Encoding: base64
Content-Disposition: attachment
<Binary Data Here>
--aMIMEBoundary--
这是否被视为“带有附件的 SOAP”?我们刚开始研究这个问题,发现对使用 .NET 技术发送此类消息的支持非常少。
如果您有此类操作的起点,请告诉我。我们已经了解了 ServiceStack 和 PocketSOAP(.NET 的 SOAP 框架)。
我们还看到 DIME 和 MTOM 被提及。这可以代替 SWA(带附件的 SOAP)消息吗?
如果您需要更多信息,请告诉我。我们主要尝试将二进制数据作为 SOAP 消息的一部分发送,这是我们第一次接触它。谢谢!
【问题讨论】:
-
你的第三方远远落后于时代。 swa 和 DIME 都不是现行标准。他们几乎死了。
标签: c# web-services .net-3.5 soap mime