できることは、WSA 部分を Typemap ファイルに追加してから、wsdl2h コマンドで -t パラメーターを使用して指定することです。
すなわち:
wsdl2h -o target.h -t EditedTypemap.dat target.wsdl
gSOAP ディレクトリから標準の Typemap.dat をコピーして編集するだけで、次のようになります。
wsa = <http://schemas.xmlsoap.org/ws/2004/08/addressing>
SOAP_ENV__Header =\
#import "wsa.h"\n\
struct SOAP_ENV__Header\n\
{\n\
mustUnderstand _wsa__MessageID wsa__MessageID 0;\n\
mustUnderstand _wsa__RelatesTo * wsa__RelatesTo 0;\n\
mustUnderstand _wsa__From * wsa__From 0;\n\
mustUnderstand _wsa__ReplyTo * wsa__ReplyTo 0;\n\
mustUnderstand _wsa__FaultTo * wsa__FaultTo 0;\n\
mustUnderstand _wsa__To wsa__To 0;\n\
mustUnderstand _wsa__Action wsa__Action 0;\n\
};
次に、前述のように wsdl2h を再実行します。これがうまくいくことを願っています!gSOAP は優れたツールキットですが、使いこなすには少し手間がかかります。