ATTENTION ALL FANS!!! THIS BLOG HAS MOVED!!!
go to: http://www.taotekaching.com

Tuesday, November 11, 2008

C++, Web Services, TinyXML, and Me...

Greetings...

So my current employer wants our existing MFC application to interface with some web services exposed by our new website (sorry, need to stay hush-hush about it at the moment).  Now, while the MFC side of things is turning out to be a bitch, I threw together some classes to make life easier for me.  The source is here.

CppHttp.h is a simple class to do GET and POST requests through.  Currently, it does NOT do multi-part requests, but I promise to update this when I get to that.  To consume the responses, I'm using TinyXML.  I looked at some other libraries, including using the MsXml stuff, but they were WAY overboard what I needed.  I included a sample class that calls a stock market thing I found on xmethods.net.  The Find method in there is particularly useful when getting, say, a DataTable back and wanting to go straight to the nodes.

Anyway, hope this is useful.  Let me know your thoughts.

~ZagNut

Submit this story to DotNetKicks