I have created a stand-alone gSoap Service. I have a simple WSDL which I used 
to create the service. I used the soapcpp2 -S option to create the skeletion 
methods for the remote calls.

The service provides just one remote call called getPrice. The soapcpp2 
compiler creates the virtual decleration as provided below:


class SOAP_CMAC SoapBindingService : public soap
{
....................
....................
//Web service operation 'getPrice' (returns error code or SOAP_OK)
virtual int getPrice(_ns1_priceRQ *ns1__priceRQ, _ns1_priceRS *ns1__priceRS).
....................
};

The ".cpp" file for this service does not implement this method, as I have to 
provide the implementation.

I have created an Implementation class which extends the above class and 
provides the implementation for the getPrice method

class myClass : public SoapBindingService 
{

      myclass::getPrice(_ns1_priceRQ *ns1__priceRQ, _ns1_priceRS *ns1__priceRS)
      {
              _ns1_priceRs->price = "100";
              return SOAP_OK;
      }

};

I have a the server which waits on requests and serves the request using 
soap_serve function. The server implementation instatiaes the implementation I 
have provided using

int main(int argc, char **argv)
{
  ....................
  ...................
  SoapBindingService *soap = new myClass();
  ....................
  ...................
  myClass->serve();
  ..................
  ...................

}


Now when I link the applications I get a link error stating the the 
SoapBindingService class does not define the "getPrice" method.

However the SoapBindingService is a service generated from the WSDL and I do 
not wish to define the implementaion in the generated source, and want the 
service to use the implementation I have provided in my class.

How can I resolve this issue?

Thanks,
dinumehta

Reply via email to