Discussion:
C++ web service
harshadnatiye-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org
12 years ago
Permalink
Hi All,

I am new to webservice domain and gsoap as well.I have legacy code to
which I need to provide web interface.

Currently, I am working on Calculator POC application.

My main() function contains below code:

CalculatorService c;

c.bind(NULL, 9090, 100);

c.accept();

soap_begin_serve(&c)

When I invoke my service thru' browser I message as,

<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>HTTP GET method not implemented</faultstring>
</SOAP-ENV:Fault>

My calc.h contains below code
// Content of file "calc.h":
//gsoap ns service name: Calculator
//gsoap ns service style: rpc
//gsoap ns service encoding: encoded
//gsoap ns service location: http://www.cs.fsu.edu/~engelen/calc.cgi
//gsoap ns schema namespace: urn:calc
//gsoap ns service method-action: add ""
int ns__add(double a, double b, double &result);
int ns__sub(double a, double b, double &result);
int ns__mul(double a, double b, double &result);
int ns__div(double a, double b, double &result);

I had used soapcpp2 -i calc.h to generate the required files.

Can you let me know where I am going wrong ?
Your suggestions are welcome.

Thanks in advance.
Regards,
Harshad
Rolf Ackermann
12 years ago
Permalink
Dear Harshad

If you create a WebService with gSOAP only the communication via SOAP
protocol is established. You have to implement HTTP GET/POST methods by
you own (see samples)

Best regards
Rolf (aka spieler67)
...
------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/gsoap/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/gsoap/join
(Yahoo! ID required)

<*> To change settings via email:
gsoap-digest-***@public.gmane.org
gsoap-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
gsoap-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
harshadnatiye-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org
12 years ago
Permalink
Thanks Rolf for your response. :)
I will look into samples.
Regards,
Harshad
...
------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/gsoap/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/gsoap/join
(Yahoo! ID required)

<*> To change settings via email:
gsoap-digest-***@public.gmane.org
gsoap-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
gsoap-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

harshadnatiye-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org
12 years ago
Permalink
Hi All,

I tested my service thru' soapUI tool, it works fine.

Is it the case that,gSOAP service can not be accessed thru browser who
expects GET method to be implemented ?
or What should I need to do to resolve the problem ?

Regards,
Harshad
...
------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/gsoap/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/gsoap/join
(Yahoo! ID required)

<*> To change settings via email:
gsoap-digest-***@public.gmane.org
gsoap-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
gsoap-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Rolf Ackermann
12 years ago
Permalink
Hi Harshad
Post by harshadnatiye-ur4TIblo6goN+***@public.gmane.org
Is it the case that,gSOAP service can not be accessed thru browser who
expects GET method to be implemented ?
or What should I need to do to resolve the problem ?
By default gSOAP only supports the "standard" communication. If you
want to serve also via
HTTP GET/POST (like browswers do) then you have to implement a GET
method via the gSOAP plugin
system (see samples/webserver of your gSOAP installation).

Best regards
Rolf (aka spieler67)



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/gsoap/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/gsoap/join
(Yahoo! ID required)

<*> To change settings via email:
gsoap-digest-***@public.gmane.org
gsoap-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
gsoap-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Loading...