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

How do I create a virtual directory?

458


How do I turn off iis in windows 10?

516


How do I determine iis version?

575


Can I uninstall iis express?

517


What are the different iis authentication modes in iis 5.0 and explain? Difference between basic and digest authentication modes?

495






How do I run iis on windows 7?

512


What is deploying a website?

486


What is net start?

490


How do you administer Connection Pooling in IIS 4.0?

1821


How do I enable iis logs?

493


How do I start iis from command line?

506


What is a iis express?

521


Exp the different types of identity available in iis 6.0?

485


How do I stop and start iis?

488


What are the different types of identity available in iis 6.0?

501