[英]WCF: CustomBinding confuses endpoint
I am using CustomBinding to enable Soap 1.1 (endpoint does not support 1.2) + Addressing 1.0. 我使用CustomBinding来启用Soap 1.1(端点不支持1.2)+ Addressing 1.0。 The endpoint is only available over SSL, and runs on some kind of Java/Weblogic platform.
端点仅可通过SSL使用,并可在某种Java / Weblogic平台上运行。
Here is my configuration: 这是我的配置:
<customBinding>
<binding name="Soap11Addr10">
<textMessageEncoding messageVersion="Soap11WSAddressing10" />
<httpsTransport/>
</binding>
</customBinding>
[...] [...]
<endpoint address="https://sekrit:444/more-sekrits/even-more"
binding="customBinding" bindingConfiguration="Soap11Addr10"
contract="SomePort" name="SomePortService" />
This configuration seems to confuse the endpoint. 这种配置似乎混淆了端点。 When I perform a request against SomePort, WCF first sends a RequestSecurityTokenResponse message, which I think may be unfortunate.
当我对SomePort执行请求时,WCF首先发送RequestSecurityTokenResponse消息,我认为这可能是不幸的。 Here is a trace of the RSTR envelope:
这是RSTR包络的痕迹:
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue</a:Action>
<a:RelatesTo>urn:uuid:7348d908-b767-43e8-9770-09a38461ee87</a:RelatesTo>
</s:Header>
<s:Body>
<t:RequestSecurityTokenResponse Context="uuid-7a3c9fde-053d-46e7-aa08-f5725b082691-287" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<t:BinaryExchange ValueType="http://schemas.xmlsoap.org/ws/2005/02/trust/spnego" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">TlRMTVNTUAACAAAAEAAQADgAAAA1wpriPjzjL4iwIJhAmcsBAAAAAGAAYABIAAAABgByFwAAAA9TAEsATwBHAEsAQQBUAFQAAgAQAFMASwBPAEcASwBBAFQAVAABABAAUwBLAE8ARwBLAEEAVABUAAQAEABTAGsAbwBnAGsAYQB0AHQAAwAQAFMAawBvAGcAawBhAHQAdAAHAAgAj73D884kywEAAAAA</t:BinaryExchange>
</t:RequestSecurityTokenResponse>
</s:Body>
</s:Envelope>
The endpoint barfs: 端点barfs:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header></env:Header>
<env:Body>
<env:Fault xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode xmlns="">ns0:MustUnderstand</faultcode>
<faultstring xml:lang="en" xmlns="">One or more mandatory SOAP header blocks not understood</faultstring>
</env:Fault>
</env:Body>
</env:Envelope>
Is it possible to stop the initial RSTR from being sent? 是否可以停止发送初始RSTR?
I can provide more trace and log data upon request. 我可以根据要求提供更多的跟踪和日志数据。
Without knowing more about the target service it is hard to say what it expects but I would guess that WCF is using message security which means that each message is encrypted individually. 在不了解目标服务的情况下,很难说出它的期望,但我猜想WCF正在使用消息安全性,这意味着每条消息都是单独加密的。 You probably just want transport level security (ie https).
您可能只想要传输级安全性(即https)。
You could try setting <security mode="Transport" />
in the binding configuration. 您可以尝试在绑定配置中设置
<security mode="Transport" />
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.