I have not verified it with this sample; however, I adapted this sample from a larger application that is working fine. In that application I added a number of types and realized that the WSDL was not correct as the types were not in the namespace. I then added the "ns__" prefix and the WSDL may be correct, but now the generated headers still have the "ns__" prefix on the types. Hopefully that explains things well enough.
To answer your other question, yes, the code I showed was auto-generated by gSOAP (with the exception of XYZ.h, which I manually generated as the starting point). --- In [email protected], "scottbell1" <scottbe...@...> wrote: > > Have you verified whether or not your method gets executed when the SOAP > method is called? > > I haven't used gSoap yet to create a Web Service, but quite a bit to consume > them. I am assuming that you are allowing gSoap to declare and implement the > method that will be called and that what you are showing below is all > auto-generated by gSoap. > > Cheers, > Scott > > --- In [email protected], "phstephan" <pstephan@> wrote: > > > > I have a simple gSOAP service declared in a header file and when I run > > soapcpp2.exe to generate the WSDL and the rest of the gSOAP plumbing, the > > function gets the "ns__" stripped, but a class that is also declared does > > not. > > > > To clarify, here is my header: > > > > ========== XYZ.h ============= > > class ns__MyType > > { > > public: > > int one; > > double two; > > }; > > > > //gsoap ns service method-action: MyMethod urn:XYZ/MyMethod > > int ns__MyMethod( int inputOne, double inputTwo, ns__MyType &myObject ); > > ========== XYZ.h ============= > > > > And here is the soapcpp2.exe command I am using: "C:\Program > > Files\gSOAP\gsoap\bin\win32\soapcpp2.exe" -i -qXYZ -dGeneratedSource -I > > "C:\Program Files\gSOAP\gsoap" $(InputName).h > > > > The resulting XYZProxy.h and XYZService.h headers contain declarations for > > XYZ::MyMethod, but it still refers to ns__MyType: > > > > ========== XYZProxy.h ============= > > namespace XYZ { > > > > class SOAP_CMAC Proxy : public soap > > { public: > > /// ... Lots of plumbing removed to reduce clutter ... > > /// Web service operation 'MyMethod' (returns error code or SOAP_OK) > > virtual int MyMethod(int inputOne, double inputTwo, ns__MyType > > &myObject); > > }; > > > > } // namespace XYZ > > ========== XYZProxy.h ============= > > > > Am I simply misunderstanding something about namespaces? I am using gSOAP > > 2.7.11, but have also tried with 2.7.13. > > > > Thanks in advance for your assistance. > > >
