Home arrow XML arrow Page 3 - Creating a Web Service with Web Matrix

Creating a Web Service with Web Matrix

The Web Matrix project appears to have served as a test bed in the development of ASP.NET. This freebie attracted a lot of attention since it did not require an installation of IIS. It had its own http server whenever needed. Of course, one could use it also in the presence of an installed IIS. This tutorial is about creating a web service on Web Matrix and testing the service on the built in mini web server, as well as testing a second example on the IIS 5.1 on the local machine.

Author Info:
By: Jayaram Krishnaswamy
Rating: 5 stars5 stars5 stars5 stars5 stars / 6
March 22, 2006
  1. · Creating a Web Service with Web Matrix
  2. · Testing the web service with built-in mini web server
  3. · Second example: the Pythagoras Theorem
  4. · Testing this web service

print this article

Creating a Web Service with Web Matrix - Second example: the Pythagoras Theorem
(Page 3 of 4 )

The web service we create will return the hypotenuse, the longest side of a right angled triangle, c shown in the figure if the values of the sides "b" and "a" are known. This comes through the equation which shows that a, b and c are related by:

c=square root( a * a + b * b).

The web service shown in the next picture will deliver the measure of the hypotenuse to the client, provided the client supplies the sides a and b.

In order to use the mathematics function sqrt, the class System.Math was included using the imports System.Math statement at the top of the page. However, this did not allow returning just sqrt (a*a + b * b). Hence a full reference was given in the return statement.

blog comments powered by Disqus

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials