Visual Basic.NET
  Home arrow Visual Basic.NET arrow Consuming a Service Created with Web Matri...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 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? 
VISUAL BASIC.NET

Consuming a Service Created with Web Matrix
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2006-03-28

    Table of Contents:
  • Consuming a Service Created with Web Matrix
  • Creating a client to the web service file
  • Using the reference to the mini-web server
  • Creating a web client in Web Matrix
  • Creating the client page and testing

  • 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


    Consuming a Service Created with Web Matrix


    (Page 1 of 5 )

    In an earlier article, I discussed the details involved in creating a web service using the Web Matrix. This tutorial is about creating consumers of those services.

    Introduction

    There are a couple of alternatives that can be used to access the web services created using Web Matrix. Two of the methods depend on the usage of VS 2003 IDE. A third method is probably more useful for those who do not have access to VS 2003. In the first method, where you have access to VS2003, you would reference the WSDL obtained by referencing the Web Service ASMX file with the mini-web server connected and running. In the second, you would import the web service file created in Web Matrix to a VS 2003 IDE project and generate the necessary files so that the web service becomes a part of the VS Project.

    Importing a Web Matrix Web service into VS 2003 Project: the Web Matrix Service File

    The following web service file from web matrix, which happens to be the default project with the Web Method Add (), shown in Fig.1, was used. If a client provides two numbers, the service adds them up and returns the result to the client.

    Fig.1
    Fig.1

    Importing into VS 2003 Project

    This file is now imported into a VS 2003 project called FindJay, which has its own web service file, Service1.asmx. This file is not of interest to us for this part of the discussion. At the time of importing you will be notified that a class file does not exist, and one has to be created. If you agree to this the file will be imported. The file structure in the project appears as shown in Fig.2. Notice that the imported test.asmx file has neither a design view, nor a code view. It only has the imported text.

    Fig.2
    Fig.2

    However, the test.asmx file is fully functional as seen in Fig.3. A WSDL reference to this file can be established by simply appending "? Wsdl" to the URL shown in the figure.

    Fig.3
    Fig.3

    More Visual Basic.NET Articles
    More By Jayaram Krishnaswamy


       · The tutorial shows how easy it is to create a consumer created with web matrix to...
     

    VISUAL BASIC.NET ARTICLES

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek