Visual Basic.NET
  Home arrow Visual Basic.NET arrow Page 4 - Encoding/Decoding Web Service: Web Service...
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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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

Encoding/Decoding Web Service: Web Service Provider
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2006-01-10

    Table of Contents:
  • Encoding/Decoding Web Service: Web Service Provider
  • What Does the Service Do?
  • Configuring the Web Service
  • Local 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


    Encoding/Decoding Web Service: Web Service Provider - Local Testing


    (Page 4 of 4 )

    It is very easy to test whether the service is working. Right click the Service1.asmx file in the project explorer and pick up View in Browser.  What will be displayed is shown in the next picture. There are three hyperlinks in this screen. The enc and denc are the web methods you created.

    Details of Service1

    The Service Description will take you to the details of what the service is doing (the "under the hood" stuff). Let's take a quick look at that in the next screen by clicking on the hyperlink, which will take you to the following URL: http://localhost/Hencode/Service1.asmx?WSDL. This is the protocol that was described in the introduction. It describes the service provided, using the other protocols. The result is shown in a compressed format (most nodes collapsed), but it has the message transport that uses the SOAP protocol with all the required definitions of namespaces, schemas, messages, ports, and so on.  The tutorial format is too limited to discuss all the details but you will find articles, books and volumes of materials on this subject on the Internet.

    WSDL

    Now let's take a look at the testing, which is our primary, limited interest. Click on the hyperlink enc. The following screen will be displayed:

    the enc web method hyperlink

    This screen shows the two protocols involved for the success of this service, the Soap Protocol -- a lightweight protocol -- and the HTTP request/response Protocol(which this screen shot has not captured completely because of length). To test the service, insert a string such as 'Hodentek' into the textbox with the title strEncode and click the Invoke button. This uses the HTTP protocol and you will see the following displayed in the browser. You may notice that Hodentek has been encoded as SG9kZW50ZWs=. Similarly if you now paste the above encoded value in the textbox for the other link, denc you will notice that the string 'Hodentek' shown in the picture after the next is displayed in the browser.

     

    This is proof positive that the web service is working correctly.

    Summary

    After a very brief introduction to web services, the tasks the service accomplishes were described. This service can be used to Base64 encode strings. A step by step method of creating the service and testing the service in the VS2003 IDE was also described. In part 2, creating a web consumer will be described. As described this service is hosted on the local web server. While VS2003 IDE and .NET Framework were used, these are not essential for creating a web service. In fact, language neutrality is one of the main attributes of web services.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Web Services has ushered in a new era in IT. It nicely fits into the growing area of...
     

    VISUAL BASIC.NET ARTICLES

    - 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...
    - Creating and Drawing a Game Map in VB.NET (F...
    - Working with Classes and Properties for Game...
    - Working with Loops, Arrays, and Collections ...
    - Learning Loops in VB.NET for Game Development
    - Learning VB.NET: Working with Variables, Con...
    - The Basics of VB.NET Through Text Game Devel...
    - Learning VB.NET Through Text Game Development
    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...
    - Shadowing using Shadows in Visual Basic.NET ...





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