There's some misleading info in gSOAP's official documents in SOAP Header Processing Part.
This article leads you to the right way and can make your program work.
This article leads you to the right way and can make your program work.
The use case is:
Client needs to pass user name and password to Server Side to get authenticated.
The username and password info should be embeded in SOAP Header.
Client needs to pass user name and password to Server Side to get authenticated.
The username and password info should be embeded in SOAP Header.
Steps:
1. Edit struct SOAP_ENV__Header in soapStub.h file which is generated by gSOAP's soapcpp2 compiler
Add the neccesary info to this struct
For example:
1. Edit struct SOAP_ENV__Header in soapStub.h file which is generated by gSOAP's soapcpp2 compiler
Add the neccesary info to this struct
For example:
The original one is:
struct SOAP_ENV__Header
{
public:
void *dummy; /* transient */
};
This should be changed to:
struct SOAP_ENV__Header
{
public:
void *dummy; /* transient */
};
This should be changed to: