In this article I will explain how to consume a Webservice.
In my following previous articles I have explained how to
create and authenticate a Webservice :
http://aspdotnetandmssqlserver.blogspot.com/2016/08/create-sample-webservice-in-c.html
http://aspdotnetandmssqlserver.blogspot.com/2016/08/authenticate-webservice-using-soap.html
Consider a Webservice hosted in local computer and
has to use a Webservice method in a website. Following
are the steps to be followed.
Open Website in Visual Studio. Right Click on Solution Explorer
and click "Add Web Reference...", you will get a screen like this :
Provide the url of the Webservice and Click "Go", it will display the
Webservice found at that URL. Provide Web Reference Name and
click "Add Reference". Then we can see the service reference as
follows in the folder, App_WebReferences :
Consider a WebPage that has two textboxes and has to display Webservice's result
on Button click to a Label.
<body>
protected void Button1_Click(object sender, EventArgs e)
In my following previous articles I have explained how to
create and authenticate a Webservice :
http://aspdotnetandmssqlserver.blogspot.com/2016/08/create-sample-webservice-in-c.html
http://aspdotnetandmssqlserver.blogspot.com/2016/08/authenticate-webservice-using-soap.html
Consider a Webservice hosted in local computer and
has to use a Webservice method in a website. Following
are the steps to be followed.
Open Website in Visual Studio. Right Click on Solution Explorer
and click "Add Web Reference...", you will get a screen like this :
Provide the url of the Webservice and Click "Go", it will display the
Webservice found at that URL. Provide Web Reference Name and
click "Add Reference". Then we can see the service reference as
follows in the folder, App_WebReferences :
Consider a WebPage that has two textboxes and has to display Webservice's result
on Button click to a Label.
No comments:
Post a Comment