Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
using gsoap
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1317

PostPosted: Fri Feb 12, 2016 11:17 pm    Post subject: using gsoap Reply with quote

I'm tryign to use gsoap to coordinate wsdl compliant web servicces, I'm trying to use the following service:
http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdl

and I've followed the following tutorial:
http://www.cs.fsu.edu/~engelen/soap.html

here's my code so far:
#include "soapH.h"

struct soap *soap1;
const char* char1;
struct _ns1__GetQuickQuote **test;
const char * char2;
main() {
if (soap_in_PointerTo_ns1__GetQuickQuote(soap1 , char1, test, char2) == SOAP_OK)
printf("yay");
}


when I try to compile I get:
/tmp/cc8TFgYV.o: In function `main':
/media/hdd/mcs/soa/assignment-3/temp/file.c:8: undefined reference to `soap_in_PointerTo_ns1__GetQuickQuote'
collect2: error: ld returned 1 exit status


please help, I'm also willing to try out anything that providess the same functionality provided I can get this done in 2 days or less.

thanks
Back to top
View user's profile Send private message
manywele
l33t
l33t


Joined: 12 Jul 2003
Posts: 731
Location: Inside

PostPosted: Thu Feb 18, 2016 1:04 am    Post subject: Reply with quote

Well, it's been a while since I wrestled with gsoap but I think you at least need to do the following:

Code:

#include "soapH.h"
#include "DelayedStockQuoteSoap.nsmap" //add the map

const char* char1;
struct _ns1__GetQuickQuote **test;
const char * char2;
main() {
   struct soap *soap1 = soap_new(); //soap1 needs to be initialized
   if (soap_in_PointerTo_ns1__GetQuickQuote(soap1 , char1, test, char2) == SOAP_OK)
   printf("yay");
}


Then running
Code:

wsdl2h -cs -o soaptest.h http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdl
soapcpp2 -i -C -Iimport soaptest.h
gcc soaptest.c soapC.c -lgsoap -o soaptest

at least gets the code to compile for me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum