Overriding namespaces in gSOAP
-
03-07-2019 - |
Question
I am using gSOAP
as a Web Service toolkit and have generated the stub and proxy classes through soapcpp2
from multiple WSDL
s all at once. Thus all the namespace bindings are in a single .nsmap
file.
Now the problem is that all the namespace bindings are being sent with all the method calls I make. The HTTP POST
packet is unusually large and ugly.
Is there a way to programatically override the namespace bindings ?
Solution
Check soapcpp2
and its -q
flag, it will help you.
Other than that, the -penv
flag will pack basic gSOAP-related methods within the executable, not including any service objects.
Therefore the files generated with -penv
can be shared across multiple namespaces, pertaining to different generated gSOAP Web Services.