1

I'm working on a existing C++ project which uses gSOAP. I have switched from std::string to custom one and trying to force gSOAP to use it instead. I have defined following file for soapcpp2:

//env.h
extern class Wlp::string;
extern typedef Wlp::string wlpstring;

Bodies of following functions were defined: soap_serialize_wlpstring(), soap_default_wlpstring(), soap_out_wlpstring(), soap_in_wlpstring().

In subprojects I use following declaration in '*.dat' files:

xsd__string = #import "wlp_string_gsoap.h" | wlpstring

I get compilation error because in one of the subprojects gSOAP generates a code from *.wsdl with wlpstring::soap_in() and wlpstring::soap_out() member function calls.

Why does gSOAP generate code that uses soap_in() member function for the string instead of calling soap_in_wlpstring() global function?

UmmaGumma
  • 5,633
  • 1
  • 31
  • 45
  • I don't have a good answer for you, but I've been able to trigger similar behaviour by dropping the `extern` modifier from `wlp::string` in `wlp_string_gsoap.h`. This appears to cause `soapcpp2` to expect the class to have a full set of declared `soap_*` methods (including, but definitely not limited to, `soap_in` and `soap_out`) that it will then provide implementations for in the generated serialisation code. Perhaps this modifier has been dropped in one of your subprojects? – msbit Mar 25 '23 at 02:58

0 Answers0