I'm basically a java developer and i have a web services created using java. Now I need a client coded with C , to consume that java WS. After surfing a lot, I landed with gSOAP cos of its support of WS.
Now, I was able to generate the header file and also the corresponding stub classes. I also have created a main class that will invoke the actual proxy method., but for some reasons my code is not getting compiled at all.
Steps of what am I doing:
- wsdl2h.exe -c -o calc.h calc.wsdl
- soapcpp2.exe -C calc.h
- gcc.exe -o CalcClient CalcClient.c soapC.c soapClient.c stdsoap2.c
The first two steps are fine, but its only the 3 step thats giving the trouble with the undefined references error. Please note that am running the above in windows platform and the gcc compiler is provided by Bloodshed Dev tool.
The error that i get when performing step 3 is (copied a few lines..),
CalcClient.C:5: undefined reference to soap_new_LIBRARY_VERSION_REQUIRED_20816'
soap_call_ns2__add'
CalcClient.C:7: undefined reference to
CalcClient.C:10: undefined reference to soap_print_fault'
soap_end'
CalcClient.C:11: undefined reference to
and
C:\TEMP/ccS0iaaa.o(.text+0x129):stdsoap2.c: undefined reference to sendto@24'
send@16'
C:\TEMP/ccS0iaaa.o(.text+0x154):stdsoap2.c: undefined reference to
C:\TEMP/ccS0iaaa.o(.text+0x224):stdsoap2.c: undefined reference to sendto@24'
send@16'
C:\TEMP/ccS0iaaa.o(.text+0x24f):stdsoap2.c: undefined reference to
C:\TEMP/ccS0iaaa.o(.text+0x28b):stdsoap2.c: undefined reference to WSAGetLastError@0'
inet_addr@4
C:\TEMP/ccS0iaaa.o(.text+0x4a9b):stdsoap2.c: undefined reference to
I know am definitely doing something wrong (as i'm new to C).I tried all the options which I can think of, Could you please help me out here?