What is a webservice , give a simple example program?

Monday, July 20, 2009


A Web Service is programmable application logic accessible via standard Web protocols.

Ex:
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 Myconcat(string s1, string s2)
{
return s1 + s2;
}

}


www.codecollege.NET

0 comments

Post a Comment

LinkWithin

Blog Widget by LinkWithin

Recommended Books