SOAP标头不匹配时,调用WCF服务超时

时间:2019-01-07 07:26:15

标签: wcf soap

是否可以配置WCF服务,以便在不喜欢我的肥皂消息时不会超时?

发生了什么事

使用SOAPUI通过安全连接调用WCF服务会给我Error getting response; jave.net.SocketTimeoutException: Read times out

在服务上启用跟踪的确会导致客户端响应:

HTTP/1.1 400 Bad Request
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 07 Jan 2019 07:15:18 GMT

然后在服务跟踪日志中找到问题的原因:

The SOAP action specified on the message, '', does not match the HTTP SOAP Action ..

在SOAPUI端启用WS-A地址,可以从服务中获得更多有用的响应。

剩下的问题是如何配置我的服务,以便在不喜欢肥皂消息时给出更有用的响应。服务绑定的设置如下:

<add scheme="https" binding="customBinding" bindingConfiguration="Soap11AddressingBindingTls" /> 

<binding name="Soap11AddressingBindingTls">
          <textMessageEncoding messageVersion="Soap11WSAddressing10" />
          <sslStreamSecurity requireClientCertificate="true" />
          <security authenticationMode="CertificateOverTransport" includeTimestamp="false" />
          <httpsTransport maxBufferPoolSize="52428800" maxReceivedMessageSize="52428800"
            maxBufferSize="52428800" transferMode="Streamed" />
        </binding>

0 个答案:

没有答案
相关问题