How to deploy a gSOAP Web Service in Ubuntu?

你。 提交于 2019-12-22 09:10:23

问题


I have a doubt concerning the deployment of a Web Service in Ubuntu. It was implemented using gSOAP and it should be deployed, e.g. be accessible from websites (which are developed in e.g. ASP .NET).

I got confused with the whole CGI, Ubuntu, Apache topics. Until now I was able to implement a Web Service in ASP .NET and deploy it on Microsoft ISS. Other than that I can also access a gSOAP Web Service described in a WSDL, using ASP .NET

What are the steps to deploy my own Web Service? I have some more specific questions:

  1. Do I have to compile the WS as CGI?
  2. Do I have to install Apache in Ubuntu or the service is already enabled?
  3. In which particuar directory do I have to place the generated code from the WS compilation ("CGI" I guess)?

I am quite a newbie with regard to gSOAP and the whole "Web Service world", especially in Ubuntu...

Thank you very much in advance!


回答1:


Do I have to compile the WS as CGI? Do I have to install Apache in Ubuntu or the service is already enabled?

No, gSoap doesn't need Apache, gSoap implements a standalone server. The gSoap documentation recommends not to use CGI because it's stateless and slow. Instead you should use the standalone server or the gSoap Apache modules included in the package. I use gSoap as standalone service with Debian. Therefore I did following (summarized):

  1. Install gSoap: apt-get install gSoap
  2. Manually created the header file (e.g. header.h)
  3. Create the client and server files with soapcpp2 -I /usr/include/gsoap header.h
  4. Implemented the functions declared in header.h

Good luck



来源:https://stackoverflow.com/questions/5405764/how-to-deploy-a-gsoap-web-service-in-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!