diff --git a/SimpleClient/Program.cs b/SimpleClient/Program.cs index 21f3910..16f46ea 100644 --- a/SimpleClient/Program.cs +++ b/SimpleClient/Program.cs @@ -29,6 +29,14 @@ static void Main(string[] args) { Console.WriteLine("{0}", endpoint.Address); } + + var channelFactory = + new ChannelFactory( + new BasicHttpBinding(), + service.Endpoints.FirstOrDefault().Address); + var response = channelFactory.CreateChannel().Echo("hello!"); + Console.WriteLine(response); + } } } diff --git a/SimpleService/Program.cs b/SimpleService/Program.cs index e096c6f..4aee380 100644 --- a/SimpleService/Program.cs +++ b/SimpleService/Program.cs @@ -25,10 +25,6 @@ static void Main(string[] args) typeof(EchoService), new Uri("http://localhost:8081/Echo"))) { - host.AddServiceEndpoint( - typeof(EchoService), - new WSHttpBinding(), - "ws"); host.AddServiceEndpoint(new UdpDiscoveryEndpoint()); host.AddDefaultEndpoints(); host.Open();