How do you consume a web service ?

Answer Posted / pravesh

Web service Discovery mechanism enables client to locate
and discover web service on the net. Web service discovery
mechanism provides a discovery document , this discovery
document is written in WSDL and provides all the
information about web service, e.g.
1. its location
2. What methode is provides.
etc..
Following are the steps to consume a web service:-

1.Add web reference to project.
Enter url of the web service to locate the web service and
its methods.

2.Add reference to namespace of web service on the page (eg
using MyWebService)

3. Create an instance of web service class (e.g.
MywebServiceClass obj1= new MywebServiceClass();

4. call the required method (eg. int x= obj1.GetAge();)

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is iis administration?

480


What is the difference between app pool and app domain in iis?

521


In iis version 6.0 through application pool we can provide different -2 applications for the client.

519


How do I create a iis application?

482


How do I host a website using iis?

471






How do I know if iis is running?

539


What is w3wp process?

522


What is iis 8?

482


How do I restart iis?

529


What is the purpose of iis server?

515


What is iis on windows 10?

494


Can I uninstall iis express?

529


IIS Asp & .net settings

1875


What is the main function of iis?

529


how we can change a PSD file in a clipart to use in word or power point ?

1691