问题
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:
- Do I have to compile the WS as CGI?
- Do I have to install Apache in Ubuntu or the service is already enabled?
- 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):
- Install gSoap:
apt-get install gSoap
- Manually created the header file (e.g.
header.h
) - Create the client and server files with
soapcpp2 -I /usr/include/gsoap header.h
- Implemented the functions declared in
header.h
Good luck
来源:https://stackoverflow.com/questions/5405764/how-to-deploy-a-gsoap-web-service-in-ubuntu