简体   繁体   English

在WebService中,XML和SOAP over TCP是否有状态?

[英]Is XML and SOAP over TCP stateful in a WebService?

TCP is a stateful protocol and it can maintain state between client and server interaction. TCP是一种有状态协议,它可以维护客户端和服务器之间的交互状态。 SOAP maintain communication neutrality and can be used over any transport protocol such as HTTP, SMTP, TCP, or JMS, so if we are using SOAP as protocol for data exchange and it is maintained over TCP protocol than whether WebService will maintain its state while doing interaction with client. SOAP保持通信中立性,可以在任何传输协议(如HTTP,SMTP,TCP或JMS)上使用,因此,如果我们使用SOAP作为协议进行数据交换,则通过TCP协议维护,而不是WebService在执行时是否保持其状态与客户的互动。

Depends on the service. 取决于服务。 With WCF, it is possible to create both stateful and stateless services when using TCP. 使用WCF,可以在使用TCP时创建有状态和无状态服务。 See http://msdn.microsoft.com/en-us/library/ms733040.aspx and ServiceContractAttribute.SessionMode for more info. 有关详细信息,请参阅http://msdn.microsoft.com/en-us/library/ms733040.aspx和ServiceContractAttribute.SessionMode。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM