This is a demo project for creating a Web Service by using Visual Studio 2010 create with two Tier concept.
1st Tier is WebSite
2st Tier is WebService site
I have create step by step to inform you.
If you not understand you can download source code from a bottom of this demo.
Step 1 : Add a WebService to your WebSite.
Step 2 : Crea Hello World Method (if not exist).
Step 3 : Add a new WebSite for call web service.
Step 4 : Add Web Reference to MainSite by click on your mainsite > Add Service Reference
Step 5 : Click Advance > Add Web Reference > WebService on this solution
It will find WebService on solution to show you and click WebService Name it to "WSTest"
Result : you will found generated file in solution.
Step 6 : Test calling a WebService.
The ResultI create method name GetString and return "Hello World + GetString" to display in page by using Response.Write.
Download create web service demo here
If you understnd how to create WebService already, Please visit How to using WebService via JavaScript/jQuery. for more information thank ^^
Enjoy ZomDev
No comments:
Post a Comment