Friday, 8 November 2013

Develop a .NET Client to access J2EE Web Service



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:

Don't You Think this Awesome Post should be shared ??
| Develop a .NET Client to access J2EE Web Service |
Back To Top Related Posts Plugin for WordPress, Blogger...