简体   繁体   English

如何使用基于WSDL的Web服务通知客户端(Java,C#)

[英]How to notify clients (Java,C#) using a WSDL based Webservice

I have to implement a webservice which will be used by different clients written using several languages (eg Java,C#) and frameworks. 我必须实现一个Web服务,该服务将由使用几种语言(例如Java,C#)和框架编写的不同客户端使用。

Because of this i decided to use JAX-WS and the Apache CXF Framework to create an WSDL first webservice. 因此,我决定使用JAX-WS和Apache CXF Framework创建WSDL第一Web服务。

Now my problem is that the webservice has to notify all clients whenever the user performed certain actions on one of them (like adding an element to the database). 现在我的问题是,每当用户对其中一个客户端执行某些操作(例如向数据库中添加元素)时,Web服务都必须通知所有客户端。

After some research I found that the technique of long-polling might help me to get this task done. 经过一些研究,我发现长轮询技术可以帮助我完成此任务。 However I'm not sure that this is the best solution and that this one will work on all target plattforms. 但是,我不确定这是否是最好的解决方案,并且该解决方案是否可以在所有目标平台上使用。

Is the technique of long-polling suited in a Webservice (WSDL) context or is there another method widely used and supported? 长轮询技术是否适合Web服务(WSDL)上下文,或者是否存在另一种广泛使用和支持的方法?

长轮询或Comet技术最适合这种情况,Web服务是无状态的,并且不支持在不对托管服务(例如IIS,Apache等)进行大量修改的情况下将数据推送到客户端。

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

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