On a linux system, I want to create a client app using gSOAP-2.8.8 that interacts with a SOAP service build upon WCF. Therefore, I went through the following:
wsdl2h -t typemap.dat -o myService.h myService.wsdl
soapcpp2 -Igsoap/import -CLix myService.h
And replaced '#include soapH.h' in wsseapi.h with soapcpp2-generated soapH.h as mentioned in wsseapi.h
Then, the critical step is to manually add the following lines to myService.h
#import "wsse.h"
struct SOAP_ENV__Header"
{
mustUnderstand // must be understood by receiver
_wsse__Security *wsse__Security; ///< TODO: Check element type (imported type)
};
...and compile those files like
g++ -DWITH_DOM -DWITH_OPENSSL -Igsoap -Igsoap/import -Igsoap/plugin -o test \
myService.cpp soapC.cpp soapmyServiceProxy.cpp gsoap/stdsoap2.cpp gsoap/dom.cpp \
gsoap/custom/duration.c gsoap/plugin/wsseapi.cpp gsoap/plugin/smdevp.c gsoap/plugin/mecevp.c \
-L/usr/lib -lssl -lcrypt
I do get object files for all my sources;-) but still end up with two errors at linking stage.
soapC.cpp:203: undefined reference to `soap_in_ns4__duration(soap*, char const*, long long*, char const*)'
soapC.cpp:676: undefined reference to `soap_in_ns4__duration(soap*, char const*, long long*, char const*)'
Edit: As a workaround I currently substitute soap_in_ns4__duration() with soap_in_xsd__duration(), which is implemented in custom/duration.c
Nevertheless, can anyone give me a hint whats going wrong here?! Thanks in advance
No comments:
Post a Comment