J2EE WEB SERVICE
package org.bursteg.calculator;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public class CalculatorService
{
@WebMethod
public int Add(int a, int b)
{
return a + b;
}
}
.NET CLIENT
static void Main(string[]
args)
ServiceReference1.NewWebServiceClient a= new
console.ServiceReference1.NewWebServiceClient();
int
r = a.Add(2, 3);
Console.WriteLine(“RESULT”
+r.ToString());
}
Run the program and see that the web service is being called and
the result is correct.
No comments:
Post a Comment