Software Technology Tips

 To test a web method present inside a web service we need to call the web service through the browser and then invoke the web method. If the web method take some parameter then we have to provide it in the supplied text box as demonstrated in the picture below.




In the above example, I have a web method called “HelloUser(string) defined in “WebserviceTest” web service. It takes a string variable as parameter named as name. So when I want to invoke the web method for testing then I have to provide the parameter value in the text box as shown above.

    But with a little modification to the WebConfig file we can also pass the parameter in the url itself. The process is described as follow:

  • We have to add the following line of code inside the <system.web> tag of the WebConfig file.



            <add name="HttpGet"/>



Then we can pass the parameter value by appending it to the url.

  • Ex: http://localhost:1115/v150/WebserviceTest.asmx/HelloUser?name=MFS

[Hope this will help you with your web method testing.]

Related Tags:

Web Service, WebMethod, Webconfig

Author: Madhusmita Rout


Let us Connect!

Awards and Achievements

Red Herringcolor DeloitteFast50 DB ZInnov1   Nascome  DB Stpi

This site uses cookies. We respect your privacy.copyright (c) Mindfire Solutions 2007-2015. Login