Monday, 15 March 2010

Web Services on Devices : Environment Set Up in Windows Vista

Web Services on Devices(WSD) is still a new technology as the amount of literature available on the web on developing WSD applications is limited. Here, I am presenting a series of posts, which may help those who are new to WSD.

Microsoft provides set of WSD APIs for developing WSD Applications from Windows Vista onwards. Here are some FAQs while setting up environment in Vista for WSD Development.

Setting up Windows SDK and Visual Studio environment for developing Web Services on Devices Applications:-
Best way to set up the required environment is to first install Visual Studio and then Windows SDK. This will avoid the getting into unnecessary problems relating to integrating Windows SDK directory paths to Visual Studio.
Please Note : When I started using WSDAPIs for developing WSD Applications, I had used Windows SDK 6.1 and Microsoft Visual Studio 2008. So, the information provided here pertain to these softwares.

What if I have already installed Windows SDK and now installing Visual Studio?
Once the Visual Studio installation is complete, follow the instructions in the following Microsoft Windows SDK blog, where you need to use Windows SDK Configuration tool to integrate with the Visual Studio. http://blogs.msdn.com/windowssdk/archive/2008/03/01/integrating-windows-sdk-and-vs-with-new-sdk-configuration-tool.aspx. Make sure you choose the latest version of Windows SDK from configuration tool, in this case 6.1, if you also have older versions of Windows SDK installed.

How to validate whether Visual Studio directories were successfully updated with Windows SDK?
Go to Start, Programs, Microsoft Visual Studio 2008, Visual Studio Tools, Visual Studio 2008 Command Prompt. At the command prompt, type PATH. Check the following path is listed, "dir where Latest Windows SDK was installed\bin"

Where do I start reading about WSDAPIs?
You can refer to the following blog link by Dan Driscol, a Microsoft developer. http://blogs.msdn.com/dandris/archive/2007/11/09/wsdapi-101-part-1-web-services-from-10-000-feet.aspx. In case of any doubt, you can drop a comment in his blog post. Usually replies within a day or two.

Where can I find sample programs on WSDAPIs in windows SDK?
Go to "Folder where windows SDK is installed\Samples\Web\WSDAPI". Here you will find 2 folders: Stock Quote and File Service. Stock Quote is a simple example where Client is calling a method on Service. File Service is more complete example which covers WS Eventing as well. Both examples have code for Client and Service and require Client to know the device address/UUID.

Ok, where can I find a sample program where a Client discovers WSD devices on the network?
Go to "Folder where windows SDK is installed\Samples\NetDs\FunctionDiscovery". This sample program discovers PnP devices on the network. This code can be easily modified to find WSD devices on the network.

No comments:

LinkWithin

Related Posts with Thumbnails