WCF:使用 WsHttpBinding 是否可以互操作?
顾名思义,现在我正在使用 BasicHttpBinding,但我想知道是否可以切换到 WSHttpBinding 并且仍然可以与 Java 等设备进行互操作。
As the name states... right now I'm using BasicHttpBinding, but I'm wondering if I can switch to WSHttpBinding and still be interoperable with, for example, Java.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
wsHttpBinding 和较新的 ws2007HttpBinding 都实现 WS-* 标准。您可能必须配置详细信息,以便它们与您的特定客户端进行互操作。
wsHttpBinding and the newer ws2007HttpBinding both implement WS-* standards. You may have to configure the details so that they interoperate with your specific clients.
WSHttpBinding 提供了许多可互操作的功能,但同时它默认使用带有 Windows 身份验证的消息安全性、通过 SPNego 协议的服务凭证协商和安全上下文 (WS-SecureConversation)。 Windows 身份验证和 SPNego 不适合互操作性,并且旧的 SOAP 堆栈不必提供安全对话。
所以答案是“这取决于”。您通常必须配置 WSHttpBinding 才能与 Java 互操作。此外,您对所使用的协议(尤其是安全部分)没有“完全”控制权,因此有时您会使用自定义绑定来实现互操作性。
WSHttpBinding offers a lot of interoperable features but in the same time it by default uses message security with Windows authentication, service credentials negotiation over SPNego protocol and security context (WS-SecureConversation). Windows authentication and SPNego are not good candidates for interoperability and secure conversation doesn't have to be provided by older SOAP stacks.
So the answer is "it depends". You usually have to configure WSHttpBinding to be interoperable with Java. Moreover you don't have "full" control over used protocols (especially for security part) so sometimes you will use custom binding for interoperability.