Windows with C++: Windows Web Services

My latest Windows with C++ column, Windows Web Services, just went live on the MSDN Magazine website. Here I’m taking a break from Direct2D to highlight the new SOAP stack introduced with Windows 7 for building both clients and servers. It’s completely native, has minimal overhead, and is incredibly fast. From the article:

One of the main reasons many developers flocked to the Microsoft .NET Framework, and Java to a lesser degree, was the fact that it made it much easier to write software for the Internet. Whether you were writing an HTTP client or server application, the .NET Framework had you covered with classes for making HTTP requests and processing XML easily. You could even generate SOAP clients from WSDL documents and implement SOAP servers with ASP.NET. As the standards around Web services matured, Microsoft developed the Windows Communications Foundation (WCF), also built on the .NET Framework, to make it easier to use the increasingly complex Web standards for handling different transports, such as TCP and UDP, and provide more versatile security options.

C++ developers, however, were left wondering whether it was even practical to use C++ to write Web applications. Microsoft had provided a couple of temporary solutions in the form of ATL classes and a COM-based toolkit, but in the end these couldn’t keep up with the progress that the managed SOAP stacks had made and thus were largely abandoned.

I hope you enjoy it.

Here are links to some of the most recent Windows with C++ columns:

September 2009 –  Drawing with Direct2D

June 2009 – Introducing Direct2D

April 2009 – The Virtual Disk API in Windows 7

February 2009 – Visual C++ 2010 and the Parallel Patterns Library

December 2008 – x64 Debugging With Pseudo Variables and Format Specifiers

October 2008 – Exploring High-Performance Algorithms

August 2008 – Asynchronous WinHTTP

And here is a complete list.

3 Comments

  • Steve: thanks for the feedback. The production folks really screwed up the figures in this article. I’ve reported it – hopefully they can get it cleaned up. WWS does a great job of supporting structured data with a powerful serialization layer. Unfortunately I didn’t have enough space in this article to cover it all.

  • Hello Kenny,

    I just read your article on "Windows Web Services" in the November 2009 issue of MSDN magazine. Great stuff, but I still have a question: Is there a way to have the equivalent of an RPC context handle when
    using the WWSAPI?

    In case you don't know what an RPC context handle is: It is something that represents state of a client connection in the server. You could for instance have an initial RPC call that enumerates resources such as file names in a directory on behalf of a client and store them all in a handle (the context handle) that you give back to the client. The
    client then can use this handle in multiple subsequent calls to actually retrieve individual file names and finally make a call to free the context on the server side, so the state on the server side is deallocated. The beauty of context handles is that if a client
    disconnects before freeing its context or if it is deemed disconnected by the server, it calls the rundown method of the context handle which cleans up the state, so clients cannot lead to leaked resources in the server, if they forget to close their context handle or if they run into network connection problems before closing their context. Is there something equivalent in the WWSAPI?

  • Would be interesting to see a comparison between WWS and gSOAP (gsoap2.sourceforge.net) in usability and in performance

Comments have been disabled for this content.