Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to call a webservice from a C++ 5.0 application and get the return value.

Is this possible, and what is the best route to go?

I have ZERO experience with webservices, and am a little afraid about the limitations of working in 5.0.

Please Help! I don't want to start going too far down a path until I know it's the correct path. Thanks much,

AmVal
Posted

 
Share this answer
 
Comments
Monjurul Habib 25-Apr-11 18:21pm    
nice links.my5
Sergey Alexandrovich Kryukov 25-Apr-11 18:33pm    
Thank you, Monjurul.
--SA
Niklas L 26-Apr-11 4:26am    
Good links, but the first two does not apply to VS VC 5.0. None the less a 5.
Sergey Alexandrovich Kryukov 26-Apr-11 11:35am    
Than you.
And thank you for pointing out the problem with version. It was my concern but I wasn't sure.
--SA
Try gSoap for SOAP based web-service, its very easy to use...
http://gsoap2.sourceforge.net/[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 26-Apr-11 11:36am    
My 5.
--SA
A webservice is just a fancy name for something very simple. Sending/receiving XML strings over TCP/IP. All you really need in its simplest form is a socket for communication and an XML-formatter/parser. The XML-formatting can be as easy as sending a hard coded XML-string. Parsing might require a bit more work. Using libraries for this is a good idea.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 26-Apr-11 11:37am    
Good point, a 5. (The whole problem is actually reduced to what library to use.)
--SA
Thanks to everyone for the links and suggestions.

I am pursuing gSOAP, and it looks like it will work.

I found the CurrencyConverter example helpful:
CurrencyConvertor: How to Use gSOAP and Webservices, Part One[^]
CurrencyConvertor - How use gSOAP and WebServices - Part 2 Doing the first WS client.[^]

For anyone else trying to do this with VC++ 5.0, the only changes needed to get the sample app to compile are:

1. in stdafx.h, comment out the line #include <afxdtctl.h>
2. in stdsoap2.h, add these two lines to the top of the file:

#define LONG64 long
#define ULONG64 unsigned LONG64

I am also able to successfully call this webservice from my 'real' application... So now just waiting for our 'real' webservice to be written. Hopefully I'll be able to call that one and get response just as easily, or I'll be back!

Thanks much!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900