【发布时间】:2011-11-14 14:04:58
【问题描述】:
我收到了构建服务以处理来自预先设计的客户端的流量的请求。
文档声明该服务是 SOAP 服务,但后来我发现预先设计的客户端使用的协议是使用 SOAP 1.2 的 gSOAP
我得到的问题是,当将绑定分配给basicHttpBinding 时,我得到Action '' not supported 的错误,因为客户端不发送SOAPAction 标头(因为它没有在 SOAP 1.2 中使用),如果我使用wsHttpBinfing 设置我的 WCF 服务的绑定我收到错误
HTTP/1.1 415
Cannot process the message because the content type 'text/xml; charset=utf-8'
was not the expected type 'application/soap+xml; charset=utf-8'.
所以基本上看起来他们使用的 gSOAP 客户端发送的是 SOAP 1.2 的 SOAP 结构,但具有 SOAP 1.1 的 Content-Type
我的问题是如何让我的 WCF 服务来处理来自客户端的请求。 (不能以任何方式修改客户端)
我已尝试设置自定义绑定
<customBinding>
<binding name="myCustomBinding">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport/>
</binding>
</customBinding>
具有各种 messageVersion 值。但我还没有找到有效的组合。
【问题讨论】: