Sunday, December 10, 2006

Building & Testing your first Web Service using .NET

Alright - it this takes more than ten minutes for you to do, then I will change the instructions and try to simplify things so that you can build & test your first web service in less than 10 minutes. The over all steps are as follows:

1. Download and install .NET WebMatrix.

2. Goto: Start > All Programs > Microsoft ASP .NET Web Matrix > ASP .NET Web Matrix.

3. You will be prompted for with a screen shown below. Fill in the information as shown. Select "Web Services" in the left panel and the "Simple" template in the right panel. I created a C:\WebServices folder to store the .asmx file and picked C#.

3. This will auto-generate a web service for you with the following code:

4. Hit the play button in the IDE and it will prompt you for the start the web application on port 9090. Make sure your local firewall is turned off.

5. A web browser with operation Add will appear. You can click this and start playing with your first web services.

Within 5 simple steps, you should have successfully setup a web services.

Note: Web Matrix cannot be accessed remotely so all your testing has to be local. For remote accessibility you can deploy your web services file (MathWS.asmx) on an IIS server.

SOA testing and building is as easy as 1,2,3 -- and 4, 5 :-)

No comments: