Working with Web Services Using ASP.NET
page 7 of 11
by SANJIT SIL
Feedback
Average Rating: 
Views (Total / Last 10 Days): 58577/ 228

Testing the Web Service

Web Services are not designed to be viewed in a browser.  Instead, Web Services are consumed by a client application using protocols.  Some of these protocols, such as SOAP, are more appropriate for server-to-server communication while others, such as HTTP GET, are more frequently associated with the model of traditional web page access.

A Web Service that uses HTTP GET as a transport protocol can be accessed in much the same way as a regular web page.  All that is necessary to access such a page is to point a web browser to the service endpoint.  In our example, the endpoint comes is an .asmx page.  Web Services are applications that expose functionality to Web Service clients and as a result have no required graphical user interface.  .NET provides a Web Service test page that is displayed when we point our browser to an .asmx page.  If we open a browser and type in the URL of the .asmx web service we just created, we will see the IE test page shown as follows.

The below page is generated by the .NET HTTP runtime each time it receives a request for an .asmx page.

Figure 2

The test page displays the Service1 service name along with the Populate method, the Add method and even a link to the service description.  The service name and any additional information about this service are retrieved through a process called reflection which uses the System.Reflection namespace to reveal information about existing types via metadata.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-10-07 7:19:57 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search