0

im implementing c++ webservices. i've installed gsoap as i've found that its popular toolkit for c++ webservices. however, im a little confuse in using gsoap.

basically i've got existing c++ codes and i want to use it as webservices. i read the tutorial from gsoap and its instructions are as follows:

1) use the following command and generate the header file with a wsdl file (im using the sample proj "hello" from gsoap):
wsdl2h -o -s h.h h.wsdl

2) with the hello.h, i run the following command to generate a lists of files as follows:
soapcpp2 hello.h

this generate a list of files: RECEV.log, Service.hello.req.xml....soapC.cpp, soapClient.cpp, soapClientLib.cpp, soapH.h,soapServer.cpp,soapServerLib.cpp,soapStub.h,TEST.log

it seems that i have to first generate a c++ header file from a wsdl file. but what if i have existing projects with existing .h and .cpp files. how can i turn them into a webservice?

chrizonline
  • 4,779
  • 17
  • 62
  • 102
  • 1
    Welcome to the dark side :) – Kiril Kirov Apr 26 '13 at 08:20
  • Write a WSDL file, generate the header, implement the functions in the header using the code you already have and the gSOAP library. – john Apr 26 '13 at 08:32
  • If you don't have a WSDL file then write the header first and use soapcpp2 to generate stubs, complete the stubs by calling your existing code. – john Apr 26 '13 at 08:38
  • gSOAP can only generate the *skeleton* of a web service, it's up to you to connect that skeleton to your own code. – john Apr 26 '13 at 08:40
  • oh ok john, now thats a little clearer. tks..so once im done with this, what should i do to set up the webservices for the client to talk to? which file(s) should i place into the apache webserver? – chrizonline Apr 26 '13 at 08:46

0 Answers0