Anyway hope this will be help ful for Webservice starting people

Creating a webservice application with dotnet is simple as A B C….

Just select “Web Service” from create a new window. All the necessary code will be premade by windows itself

Which will look like this:

using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {

//Uncomment the following line if using designed components
//InitializeComponent();
}

[WebMethod]
public string HelloWorld() {
return “Hello World”;
}

}

The web application is over and now you can create an application for accessing this web service

Here I used a standard C# Windows application. Add “Web Reference” to your web service. (Eg: http://pvn/WebService/Service.asmx).
Now place a button on the form and type the following C# code

private void button1_Click(object sender, EventArgs e)
{
pvn.Service s = new WindowsApplication1.pvn.Service();
MessageBox.Show(s.HelloWorld());
}

Web Service Over!!!

I found this link and felt very useful: http://abstractvb.com/code.asp?A=1006

VN:F [1.1.6_502]
Rating: 0.0/5 (0 votes cast)
Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • LinkedIn
  • Live
  • MySpace
  • StumbleUpon
  • Technorati

Related posts:

  1. Invoke a ASP.NET WebService from Flex
  2. Return DataTable from Web Service
  3. Article: Flex Communication with ASP.NET WebService
  4. Move a control with mouse on form
  5. A simple ISAPI extension with C#