Google News
logo
Web Services - Interview Questions
Write an example to demonstrate the working of the Web Service Provider.
Here is the example of a Web Service Provider :
using System;  
using System.Web.Services;  
using System.Xml.Serialization;  
  
[WebService(Namespace="http://localhost/MyWebServices/")]  
public class FirstService : WebService{  
   [WebMethod]  
   public int Add(int a, int b) {  
      return a + b;  
   }  
  
   [WebMethod]  
   public String SayHello() {  
      return "Hello World";  
   }  
}​
 
Advertisement