public static double TestiSummaaLuvutYhteen(int Kokonaisluku, double Liukuluku) { BasicHttpBinding basicHttpBinding = new BasicHttpBinding(); EndpointAddress endpointAddress = new EndpointAddress("http://localhost:56071/ADMCompletedDemoService.svc"); IADMCompletedDemoService service = new ChannelFactory< IADMCompletedDemoService >(basicHttpBinding, endpointAddress).CreateChannel(); var serviceResponse = service.TestiSummaaLuvutYhteen(Kokonaisluku, Liukuluku); return serviceResponse; }