[ACCEPTED]-Create an ASMX web service from a WSDL file-asmx
If you already created interfaces you need 10 to implement those interfaces.
Just create 9 a new web service and add the interface 8 that you generated so that it inherits from 7 that interface. Visual Studio can automatically 6 generate stubs for every method in interface. Mark 5 them with the WebMethod attribute and put 4 some code in that will return some test 3 data/results.
If you have this interface 2 (with some more attributes that were automatically 1 generated):
public interface IRealWebService
{
string GetName();
}
You should make a new service:
public class WebTestService : System.Web.Services.WebService, IRealWebService
{
#region IRealWebService Members
[WebMethod]
public string GetName()
{
return "It Works !!!!";
}
#endregion
}
All you need to do is create a class that 3 inherits from the interface that WSDL.EXE 2 has generated, and then implement the methods 1 from the interface.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.