简体   繁体   English

具有node.js和socket.io的SOAP客户端

[英]SOAP client with node.js and socket.io

I am trying to create a web app using Node.js. 我正在尝试使用Node.js创建一个Web应用程序。 I want to use socket.io to stream data that I pull from a soap service. 我想使用socket.io来传输从soap服务提取的数据。 I am having trouble finding any information about this. 我无法找到有关此的任何信息。 what would be the best option for this situation. 在这种情况下最好的选择是什么。

right now: 马上:

  • I am using PHP to call a soap service and retrieve data. 我正在使用PHP调用Soap服务并检索数据。
  • my client side java script makes interval calls using AJAX to the PHP function containing the SOAP call.(this is inefficient which is why I would like to switch to socket.io setup). 我的客户端Java脚本使用AJAX对包含SOAP调用的PHP函数进行间隔调用。(这效率低下,这就是为什么我想切换到socket.io设置的原因)。

What I would like to do: 我想做的是:

  • Node.js app with express possibly 带有Express的Node.js应用可能
  • SOAP call using PHP or Node.js if possible. 如果可能,使用PHP或Node.js进行SOAP调用。
  • stream data from SOAP to client side to be viewed using socket.io 将数据从SOAP流传输到客户端,以便使用socket.io查看

I am not sure if this setup is possible and I have not found and good documentation on this. 我不确定是否可以进行此设置,但是我还没有找到很好的文档。 would this be possible ? 这可能吗? if so, what would be the best method or is there a tutorial for this? 如果是这样,什么是最好的方法,或者是否有针对此的教程?

There is excellent node.js module called 'soap', you may get it via npm install soap . 有一个出色的node.js模块,称为“ soap”,您可以通过npm install soap获得它。 Also see the docs at https://github.com/milewise/node-soap . 另请参阅https://github.com/milewise/node-soap上的文档。

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

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