Compartilhar via


Web Services stacks on Windows

It has never been particularly easy to choose a Web Services stack on which to build your application.  Microsoft has produced many over the years (for example, WCF and WSDAPI) and other software vendors produce even more.  The feature sets of these stacks often overlaps, but rarely are they all exactly the same--so making a decision about which stack to use can be complicated and time-consuming.

And things are about to get even more complicated--but for very good reason--with the introduction of the Windows Web Services API (WWSAPI).  Even though it means one more stack to choose from, I'm actually very excited about WWSAPI, because it brings WCF-like functionality to native non-managed Windows applications.  This fills a big gap in the development story for Web Services.

So soon there will be at least three different stacks you can use to build WS applications.

  • Web Services on Devices API (WSDAPI)  is the one-stop shop for building applications on DPWS, WSD, or WS-Discovery.  If you use any of these three technologies, use WSDAPI.  (And if you're lost in the acronyms, see this post.)
  • Windows Communication Foundation (WCF) is the generic Web Services stack available in .NET.  If you're not communicating with devices but are using managed code, use WCF.
  • Windows Web Services API (WWSAPI) is the generic Web Services stack available on Windows.  If you're not communicating with devices but are using native code, use WWSAPI.

Additionally, there are other technology-specific WS stacks available in Windows (such as WinRM for WS-Management) that I'm not listing here for brevity.

The short version is that if you're using devices, WSDAPI is probably the first place to look for Web Services connectivity.  For more generic Web Services applications, WWSAPI is a great solution if you're writing native code.

More information on WWSAPI can be found on the blogs of two WWSAPI team members, Hao Xu and Nikola Dudar.

Comments

  • Anonymous
    September 09, 2009
    I am very new to web services, and my question might sound very silly. But still I would like to ask this.. I have a USB connected device which i want to discover through WS-Discovery. As it is USB connected, i would be writing a proxy application which will run on the PC. This proxy application will act like the real device. If i need to implement this, which stack i shuld be using?

  • Anonymous
    September 09, 2009
    Hi Don- First, you should know that there is no Web Services protocol specifically for USB drives.  WS-Discovery will let you find a service representing the drive, but from there you will need to design your own WS-* protocol, or reuse another protocol (either WS-* or otherwise, such as SMB). Let's get into the stacks.  Of these three, WSDAPI is currently the only stack that includes support for WS-Discovery.  WCF 4.0 Beta supported WS-Discovery as well, but I don't have a final release date.  WWSAPI, as far as I know, does not support WS-Discovery. If you use WSDAPI, you will probably want to use the IWSDDeviceHost interface to represent your drive as a virtual device on the network.  IWSDDeviceHost implements WS-Discovery and DPWS, which would be an obvious choice of protocol frameworks for designing a WS-* protocol to communicate with the device.  This post describes the interfaces in greater detail: http://blogs.msdn.com/dandris/archive/2008/03/03/wsdapi-101-part-4-the-interfaces-under-the-generated-code.aspx I'm less familiar with WCF.  I do know that WCF does not support DPWS, so if you want to communicate with the device, your WS-* protocol would not be able to use many of the device-friendly helpers included in DPWS (at least, not without inventing the support yourself). Note that DPWS support is required for the device to show up in the Vista and Windows 7 "Network" folder. Hope this helps --Dan

  • Anonymous
    July 15, 2010
    Hello Dan, I have found that there exists another implementation of the DPWS stack called WSDAPI for .NET. But it looks like it is available only in Windows Embedded Standard 7. Do you know if it will be supported in Windows too? It would be very helpful to be able to communicate with devices using managed code. Thanks,

  • Anonymous
    July 16, 2010
    Hi aZubi, My name is Jeff and I work on the Windows WSDAPI stack.  Unfortunately, I am not aware of any plans to port WSDAPI to .NET on Windows.  The .NET WSDAPI stack on Windows Embedded is designed to only work on Windows Embedded. Thanks! Jeff

  • Anonymous
    August 24, 2010
    Hi Dan, what about "WSDAPI for .NET"? msdn.microsoft.com/.../ff793745.aspx How does it relates to the other stacks? Do you still do not recommend WCF for communicating with devices, do you? Stephan

  • Anonymous
    August 24, 2010
    Hi Stephan- WSDAPI for .NET is a separate project and I don't know enough about it to comment. WCF is still not well-suited for communicating with devices.  It's certainly possible to get it to do so, but WCF does not include native support for DPWS and some of its dependencies (WS-Eventing) so you would have to implement those from the ground up. --Dan