../Iservice1.cs/
public interface IService1
{
[OperationContract]
Int32 Add(Int32 Num1, Int32 Num2);
}
../Iservice1.svc.cs/
public class Service1 : IService1
{
public Int32 Add(Int32 Num1, Int32 Num2)
{
return Num1 + Num2;
}
}
I created the service. I opened a project in Javada and added the service. But how can I call the service in java "add" method.?
SOLVE:
public class JavaApplication {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
MathService service = new MathService();
IMathService serv;
serv = service.getBasicHttpBindingIMathService();
int x=8, y=2;
int ans;
ans=serv.add(x, y);
System.out.println(ans);
// TODO code application logic here
}
}