XML
  Home arrow XML arrow Creating a Web Service with Web Matrix
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM developerWorks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Creating a Web Service with Web Matrix
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2006-03-22

    Table of Contents:
  • Creating a Web Service with Web Matrix
  • Testing the web service with built-in mini web server
  • Second example: the Pythagoras Theorem
  • Testing this web service

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Creating a Web Service with Web Matrix


    (Page 1 of 4 )

    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.

    Create a file of type XML Web Service: Default Example

    When Web Matrix starts, click on File -> New File.... The window for adding a new file, Add New File, opens, presenting a number of types of files you can add.  It also shows the folder tree on the right where you can save the file you are adding. Before creating a new file, pick the type of file you want to create. In this case a XML Web Service file is chosen as shown. Since it is a service without any visible controls,  the file will be compiled as a class file and requires a class name, hence give a class name that can be remembered; here it is given the value hteksamples which is arbitrary.

    You can give a namespace to collect together a set of related classes. Since there is only one class created here, you may give any name for this; it is given the value HODENTEK. Add New File adds a new web service file, test.asmx file as shown to the C:AspApril04 folder (after you click OK to this window). All web service files will have the extension .asmx. The Workspaces window is where the tree view of folders is shown. Under the Workspaces window you will see the Classes window where all the classes starting from System are shown.

     

    When you click OK to the above, the code for the class file you are going to create will open in the code view with a default web service. The service will have a WebMethod having a function name, Add () as shown. This area where you see the code is a text editor where you can make changes. You may notice that all the imports statements have been added by the Web Matrix IDE. You will see the class name we gave is at the very top of this page. The language attribute is 'VB', but you can also use C# or J#.

    More XML Articles
    More By Jayaram Krishnaswamy


       · Evolution is the key for all processes that includes life forms as well as software....
       · how to use this xml webservices to convert the databases
       · It's [the following link to one of my old articles] not a full blown example from...
     

    XML ARTICLES

    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands
    - Creating an XUL App Installer
    - Overlays in XUL
    - Skinning Your Custom XUL Applications







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway