How do I call a web service from an MFC application? This is something I'd
like to do without bringing .NET into the picture, if possible.
Thanks in advanced for any pointers.
I don't know of WebServices library for MFC specifically, but I think
that Apache Axis has C++ implementation.
BTW, it's a strange demand, that, not to bring .NET in. It's simple
with .NET, so why are you making your life complicated?
Finally, I don't know your context, but I'd consider writing a COM
server (probably an *.exe) in .NET, that would call out from the web
service. That way, you can have an easy interface on MFC side (you
define what that is), easy life on the WebService client side, and if
you go with the *.exe, a good process isolation. But the price is a
more complicated executable module structure; 2 modules instead of 1).
Goran.
> How do I call a web service from an MFC application? This is something
> I'd like to do without bringing .NET into the picture, if possible.
There is a C library called WWSAPI (Windows Web Services API):
http://msdn.microsoft.com/en-us/library/dd430435(VS.85).aspx
You can find an interesting article here:
http://msdn.microsoft.com/en-us/magazine/ee335693.aspx
The problem is that it is complicated (and expensive...) to get the
WWSAPI binaries for Windows XP (instead, this API is included in Win7).
As an alternative, there is the open-source gSOAP:
http://www.cs.fsu.edu/~engelen/soap.html
HTH,
Giovanni
sproxy generates a C++ class whose methods map one-to-one to methods of a
service at a given URL. It can't be simpler that this.
Hope this helps.
"Eddie Paz" <drp...@hotmail.com> wrote in message
news:374F57A8-EFB9-4A47...@microsoft.com...
You can use the WinHTTP library to call webservices from MFC
application.
http://msdn.microsoft.com/en-us/library/aa384081
As Giovanni has told you I would recommend you gSoap. AFAIK is the most
used C/C++ web service library. I use it at work with a great level of
satisfaction.
http://gsoap2.sourceforge.net/
Regards
--
Cholo Lennon
Bs.As.
ARG
Thanks for the info. I realize that this would be easy in .NET. VC.NET will
make it even easier, but we currently don't have support from the network
guys to deploy .NET to 500+ PCs -- we still run Windows 2000 clients, and we
use Netware/Zen for Updates. It's not pretty, but we got to work with it.
I'll check out Axis and see it'll work for us. Thanks!
Eddie.
Thanks for the links, Giovanni. The WWSAPI looks good, but unfortunately our
clients are Windows 2000. gSOAP looks just like what I need, but I don't
much about the OS license. The software is for internal use of the
company... I don't know if that makes it commercial. I'll check with them
but definitely looks promising. Thanks!
Eddie.
Nice. I found it in VS2005, which is what we use. It seems to be based on
ATL Project, which I believe MS discontinued some time back (they even made
it open source, if I recall correctly).
The web service is written in Java, but returns XML. Hopefully this works
with Java WS. Thanks!
I must admit I don't know much about web services, but I can't find anything
on the site about how to do it with this API. Do you have a link you can
share?
It definitely looks like this is the one. Thank you all for the help!
Eddie.