我有一个返回结果的网络服务multipart/related
:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_FCAC227A0F1D534C2D1349803588825;
type="application/soap+xml"; start="<0.urn:uuid:FCAC227A0F1D534C2D1349803588826@apache.org>"; action="urn:MyServiceAction"
Date: Tue, 09 Oct 2012 17:26:28 GMT
Content-Length: 2961
--MIMEBoundaryurn_uuid_FCAC227A0F1D534C2D1349803588825
Content-Type: application/soap+xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <0.urn:uuid:FCAC227A0F1D534C2D1349803588826@apache.org>
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
[... snipped ...]
</soapenv:Envelope>
--MIMEBoundaryurn_uuid_FCAC227A0F1D534C2D1349803588825--
WCF 似乎不支持这一点。我正在使用自定义绑定,并显示TextMessageEncodingBindingElement
一条消息告诉我不支持该内容类型。MtomMessageEncodingBindingElement
也抱怨,因为它不期望application/soap+xml
但是application/xop+xml
。
是否有可以正确处理的multipart/related
MessageEncoder application/soap+xml
?还是有一种简单的方法可以让我挂接到管道中并在有效负载被发送到之前提取它TextMessageEncodingBindingElement
?