Here is a target: build client app using N wsdl's and when some SOAP requests launched - add some specific SOAP:Header ( session tokens and client data as usual )
Here we got a few limitations:
So here is the question: How to add custom generated XML into SOAP:Header field in requests ?
ps. Frankly speaking I got one solution resolving this question via gsoap plugin's but I think its a bit "ugly-hacky" and really appreciate more beautiful and elegant solution
Ok, here is proper solution to do it:
Add #import "header.h" to typemap.dat:
[
#import "header.h"
]
The content of the SOAP_ENV__Header struct in header.h is user-defined, typically with members that are pointers and member names qualified:
struct SOAP_ENV__Header
{
type *prefix__name;
};
If you want "arbitrary" headers, then use DOM:
#import "dom.h"
struct SOAP_ENV__Header
{
xsd__anyType *dom;
};
when using DOM object in custom SOAP headers - don't forget to pass "-d" option in soapcpp2 execution - otherwise there will be compilation/linking problems.