WCF with netTcpBinding + cPython

穿精又带淫゛_ 提交于 2019-12-24 15:33:02

问题


I've read this question WCF and Python. But in case, the wcf service use netTcpBinding, could we call it from cPython. If it's possible, please help to give an simple example ?


回答1:


could we call it from cPython

No, netTcpBinding is interoperable only with WCF clients.

From here:

The default configuration for the NetTcpBinding is faster than the configuration provided by the WSHttpBinding, but it is intended only for WCF-to-WCF communication.

From comments:

does wsHttpBinding work or only basicHttpBinding work?

Short answer is no, basicHttpBinding is the only binding (except for the web bindings) which support interoperability with non-wcf clients. Even then you may have difficulty consuming it from non-windows.

Long answer is that the reason this is the case is because basicHttpBinding supports communication over SOAP 1.1, which is a relatively simple protocol, and most vendors have implemented it in very similar ways. Therefore, these different implementations tend to be interoperable. However, wsHttpBinding is Microsoft's attempt to support the SOAP 1.2 protocol and WS-* web service extensions, which is a much larger and more complex set of standards. So there is a much larger scope for interpretation between the various vendors, leading normally to non-interoperability between implementations. It is theoretically possible, therefore, to call an endpoint exposed over wsHttpBinding from a non-wcf (or even non-windows) client, but you would have to overcome all the niggles.

A much better approach would be to move away from SOAP completely if possible, and just use HTTP/POX or HTTP/REST services.



来源:https://stackoverflow.com/questions/31266930/wcf-with-nettcpbinding-cpython

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!