ibm.com— This article is a step-by-step guide to exposing C++ methods as services on the web. It includes sample code snippets for C++ integration using an open source XML-RPC Library.
Jun 22, 2006View in Crawl 4
I would stay away from Active X if I were you. Try using .NET web services instead. [WebMethod]public string HelloWorld(){ return "Hello World";}You can use this with Mono GTK#, with ASP.NET, winforms app or whatever client you like.
How come it's the "wrong approach"? It's like saying Java or C# for web services is the "wrong approach". And if you read the article, it *is* using the standard XML-RPC spec from xmlrpc.com, although it's implemented using C++. That's the beauty of web services right there. As long as both client and server both speak the same protocol in XML, you can choose whatever implementation that best suits your needs. It doesn't matter if the server or client (or both) are written in C++, Java, C# or whatever.Yes, Java and C# both have web services libraries, but they are mostly based on SOAP and at times, you just need a lightweight RPC protocol. XML-RPC fits the bill nicely in small to medium-sized SOA's. Hell, even Amazon offers both SOAP and XML-RPC for their web services API.
jer2eydevil88Jun 22, 2006
Maybe i'm missing something but wasn't Active X scripting supposed to replace the need for this kind of method?
superghostJun 22, 2006
This sounds great but I am always nervous when I hear about RPC...
adolfojpJun 22, 2006
I would stay away from Active X if I were you. Try using .NET web services instead. [WebMethod]public string HelloWorld(){ return "Hello World";}You can use this with Mono GTK#, with ASP.NET, winforms app or whatever client you like.
trollickJun 22, 2006
Never trust indian snake charmers...
balls187Jun 22, 2006
Lack of standards makes me nervous.Also it seems like using C++ for webservices is the wrong approach.
shecoJun 23, 2006
Python+Cherrypy+XML-RPC FTW
bogomillJun 23, 2006
How come it's the "wrong approach"? It's like saying Java or C# for web services is the "wrong approach". And if you read the article, it *is* using the standard XML-RPC spec from xmlrpc.com, although it's implemented using C++. That's the beauty of web services right there. As long as both client and server both speak the same protocol in XML, you can choose whatever implementation that best suits your needs. It doesn't matter if the server or client (or both) are written in C++, Java, C# or whatever.Yes, Java and C# both have web services libraries, but they are mostly based on SOAP and at times, you just need a lightweight RPC protocol. XML-RPC fits the bill nicely in small to medium-sized SOA's. Hell, even Amazon offers both SOAP and XML-RPC for their web services API.