In this post, I will explain how to use WSDL file to consume web service with example. If you want to know WSDL element then please click below link.
WSDL - Element Description
Follow the below step to use WSDL file.
1) Open up Visual Studio.
2) Create a Project (web project or console app : ClientApp - doesn't matter )
3) Right click on Project and click "Add Service Reference"
2) Create a Project (web project or console app : ClientApp - doesn't matter )
3) Right click on Project and click "Add Service Reference"
4) Enter the path and name into the Address to import the WSDL file or to consume web service.
This will generate WCF client for you to use all method available in that file or service.
5) You should find a "FirstWCFServiceClient" class which should have all the methods defined on the WSDL contract.
5) You should find a "FirstWCFServiceClient" class which should have all the methods defined on the WSDL contract.
6) Instantiate the client and call the methods.
7) You are done. That's all.
If you have any questions, post here. Also, provide your valuable suggestions and thoughts in form of comments in the section below.
Thank you !!!
If you have any questions, post here. Also, provide your valuable suggestions and thoughts in form of comments in the section below.
Thank you !!!
No comments:
Post a Comment