HandymanDan
HandymanDan

Reputation: 11

gSOAP upgrade from 2.8.10 to latest (2.8.54) does not have ns: for namespace on several XML tags

Currently upgrading gSOAP from 2.8.10 to 2.8.54. This is a c++ code generation tool to allow rpc over XML. The code that is generated by the new version is not producing XML that is compatible with an earlier version. Was wondering if anyone had looked into / used these versions of gSOAP in their C++ products and found a difference in the XML used for marshaling.

The XML code needs to match as 2.8.10 products need to talk to products that use 2.8.54 My current issue is the name space for input and data in the dynamically generated code that produces the XML for 2.8.10 has

if (soap_out_PointerTostd__string(soap, "ns:method", -1, &a->method, "xsd:string"))
    return soap->error;
if (soap_out_PointerTons__ComplexType(soap, "ns:input", -1, &a->input, "ns:ComplexType"))
return soap->error;

and 2.8.54 has

if (soap_out_PointerTostd__string(soap, "method", -1, &a->method, "xsd:string"))
    return soap->error;
if (soap_out_PointerTons__ComplexType(soap, "input", -1, &a->input, "ns:ComplexType"))
    return soap->error;

So the question arises, how come ns: was dropped for method and input? It was also dropped for data.

I have tried -z1, -z2, and -z3 and none added the ns to the xml 'data', 'method' or 'input' tags. I expect to see ns:data, ns:method and ns:input.

Tried other permutations (-i, -j) too. Any help is appreciated.

Any recommendations?

Upvotes: 1

Views: 424

Answers (1)

EliD
EliD

Reputation: 41

I had the same problem. When running soapcpp2.exe of 2.8.55 on my *.h file, the 'ns:' disappeared

Finally, what helped solving this was adding the following line in the *.h file, in the section of all other '//gsoap' attributes:

//gsoap ns schema elementForm: qualified

Hope this will help

Upvotes: 4

Related Questions