What should I know when developing interoperable WCF web service?

*爱你&永不变心* 提交于 2019-11-29 00:15:09

Fairly simple:

  • avoid any .NET specifics like Exceptions (turn them into SOAP faults)

  • don't use any binding that start with net like netTcp, netNamedPipes, netMsmq and so forth - use wsHttpBinding for secure WS-* services, and basicHttpBinding for maximum reach / compatibility with even the weirdest client platforms

  • don't use the NetDataContractSerializer

I recommend WCF REST exposing multiple serialization formats, definitely xml for starters.

Ladislav Mrnka

General interoperability:

  • Only HTTP and HTTPS transport channels are interoperable
  • Negotiation of security credentials is not interoperable (negotiateServiceCredential in message security). It uses TLSNego or SPNego protocols which are not always supported by other platforms.
  • HTTP streaming can cause troubles as well
  • Binary encoding over HTTP channel is not interoperable
  • OleTransactions are not interoperable
  • Use service security context with care (estabilishSecurityContext in message security). It uses WS-Secure Conversation protocol which is not available on some platforms

Edit:

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