如何使用VC编写gSOAP服务器++ (VS2008)?
我已经从sourceforge下载了gSOAP2.8。我想用它来编写基于 gsoap 的服务器。我需要能够从 PHP UI 调用我的 C++ 代码。
我的 php 页面将显示如下内容:
$res = a + b = ? [Submit]
单击提交按钮时,我希望将这些参数传递给我的 C++ 函数,例如 compute_sum()
...并且应该使用这些参数调用该函数,并且结果返回到我的 php 页面。
我想编写这个基于 gsoap 的 C++ 服务器。有人可以帮助我开始使用它吗?
我需要知道:
- 它应该是什么样的C++代码? (Windows 控制台应用程序或 Windows 服务)
- 如何启动此服务器? (它需要是一个 Web 服务,托管在 apache 之类的东西上吗?)
I have downloaded gSOAP2.8 from sourceforge. I want to use it for writting a gsoap based server. I need to be able to invoke my C++ code from PHP UI.
My php page would show something like:
$res = a + b = ? [Submit]
When submit button is clicked I want these parameters to be passed to my c++ function lets say compute_sum()
... and this function should be invoked with these parameters, and the results given back to my php page.
I want to write this gsoap based c++ server. Can someone please help me with getting started with it?
I need to know:
- What kind of c++ code it should it be? (Windows console app, or a windows service)
- How do I launch this server? (Would it need to be a webservice, hosted over something like apache?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在此处下载示例。
http://www.cs.fsu.edu/~engelen/soap.html
我建议暂时只使用控制台应用程序。要与服务对话,您可以使用 phpSoap 扩展或 Zend_Soap。
You can download examples here.
http://www.cs.fsu.edu/~engelen/soap.html
I recommend using just console application for a moment. To talk to service you can use phpSoap extension or Zend_Soap.