如何调用Web服务? [英] How to call web services?

查看:86
本文介绍了如何调用Web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
linux机器将在无限循环中异步调用大约300台远程linux机器的Web服务,可能会有延迟。策略是缓存一些可能在本地计算机上连接不良的更改数据。当调用一个OnComplete回调时,在几秒或几分钟后准备另一个异步调用,以保持它们在本地机器上的最新数据。

远程机器上的Web服务用PHP编写并由NuSoap实现。一个过程将写在本地机器上以处理任务。



我们有一些方法可以实现这个:



1.在php中编写代码,因为调用远程Web服务很容易。本地机器上的NuSoap有 nusoap_client 类进行Web服务调用,我们不用担心任何事情。但NuSoap可以异步调用Web服务吗?另一方面,我可以在php中有一个进程来运行而无需从客户端连接到本地机器并继续作为一个单独的进程运行吗?



2参与gSoap并用C ++编写代码。我不确定使用gSoap在C ++中调用Web服务的速度要快。我认为这种方法很复杂。我应该通过gSoap生成额外的代码来处理Web服务调用。



说实话,我没有足够的信息或经验。所以,喜欢听你的建议和照明方式。

thx



我尝试了什么:



刚搜索和研究过。我找到了ReachPHP,但我不确定它是否与我需要的相关。

解决方案

首先:你对nusoap_client的想法应该有效。一些说明和示例代码。在某些方面,框架应该是同步的。



Sceond:主要问题是从来没有速度但是如果它有效。 C ++的速度主要是任何代码可以运行的最高速度。问题是稳定且稍微优化的实现。这是一个丰富的文档如何使用Gsaop与C ++



听起来你有一份非常有趣的工作。 ; - )

hi a linux machine is going to call web services of about 300 remote linux machines asynchronously in an infinite loop maybe with a delay. the policy is to cache some changing data from them which may have poor connections on the local machine. when the OnComplete callback of one is called, another asynchronous call is prepared after some seconds or minutes to keep the up-to-date data of them on the local machine.
the web services on the remote machines are written in php and implemented by NuSoap. a process is going to be written on the local machine to handle the task.

we have some ways for implementing this:

1. write the code in php, because calling the remote web services is easy. the NuSoap on the local machine has nusoap_client class which do the web service call and we've not to worry about anything. but can NuSoap call the web services asynchronously? in the other hand, can i have a process in php to get running without any connection from a client to the local machine and remain running as a separate process?

2. getting involved with gSoap and write the code in C++. i'm not sure calling a web service from within C++ using gSoap be as fast. i think this method is complicated. i should generate additional code by gSoap to handle web service calls.

to be honest, i've not sufficient information or experience in both. so, like to hear your suggestions and lighting of the way.
thx

What I have tried:

just searched and researched. i found ReachPHP, but i'm not sure whether it's relative to what i need.

解决方案

First: your idea with nusoap_client should work. Some explanation and sample code. The framework should work asyncronous in some matter.

Sceond: the primary problem is never ever the speed but if it work. The speed of C++ is mostly the top speed in which any code can run. The problem is a stable and somewhat optimized implementation. Here is a rich documentation how to use Gsaop with C++.

Sounds like you have a very interesting job. ;-)


这篇关于如何调用Web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆