Step 1:- Make sure to install Visual Studio from site belwo site vs_community__1147343234.1553667520.exe. Take Community Platform and install it. During installtion use .net Framework as core. If asked for restart at the end please do the same.
https://visualstudio.microsoft.com/downloads/
Step 2:- Follow the following Step to create SOAP Web service now.
Click on Create New project
Right click Project -->Add-->New Item-->Web Service ASMX
click Add Button and you are done with your Server side code ready for exposing your first SOAP WSDL Web Service.
What it do? It return you hello world text in soap.Lets check it!!!!
Run the Project using F5 button and you will be able to see the your web service on the page
Click on HelloWorld
Click on Invoke button and your webservice will be invoked
Step 2:- Now let try to create our own Web service method. Lets call it as add which will take list as in input and will give addition of all the item in the list as result.
Now run the applciation using F5 and we will be able to see Add method on the screen.
Click on add method and you will be see it SOAP 1.1 and 1.2 version.
Step 3:- Now lets use this SOAP WSDL xml for generating client code to call this Add method and get the response.
For that right click on project-->"Add Service Reference"
click on go and you will be able to see all the Method exposed
Click Ok
We also need to add the webform page to our project i.e. WebForm.aspx to give the ui for calling the SOAP Web service.
Right Click Project -> Add --> new Item --> select Web Form
click Add
We need to add folloing code in its correspondign .cs file i.e. WebForm.aspx.cs
Run the application by clicking F5
click on Button and see the result for the SOAP Web service ADD method which you had exposed.
https://visualstudio.microsoft.com/downloads/
Step 2:- Follow the following Step to create SOAP Web service now.
Click on Create New project
Right click Project -->Add-->New Item-->Web Service ASMX
click Add Button and you are done with your Server side code ready for exposing your first SOAP WSDL Web Service.
What it do? It return you hello world text in soap.Lets check it!!!!
Run the Project using F5 button and you will be able to see the your web service on the page
Click on HelloWorld
Click on Invoke button and your webservice will be invoked
Step 2:- Now let try to create our own Web service method. Lets call it as add which will take list as in input and will give addition of all the item in the list as result.
Now run the applciation using F5 and we will be able to see Add method on the screen.
Click on add method and you will be see it SOAP 1.1 and 1.2 version.
Step 3:- Now lets use this SOAP WSDL xml for generating client code to call this Add method and get the response.
For that right click on project-->"Add Service Reference"
click on go and you will be able to see all the Method exposed
Click Ok
We also need to add the webform page to our project i.e. WebForm.aspx to give the ui for calling the SOAP Web service.
Right Click Project -> Add --> new Item --> select Web Form
click Add
We need to add folloing code in its correspondign .cs file i.e. WebForm.aspx.cs
Run the application by clicking F5
click on Button and see the result for the SOAP Web service ADD method which you had exposed.
No comments:
Post a Comment