private static void consumeWebServiceHello(string name) { HelloEndpointClient client = new HelloEndpointClient(); helloRequest request = new helloRequest { Name = name }; SayHelloBody body = new SayHelloBody(request); SayHello sayHello = new SayHello { Body = body }; SayHelloResponse response = client.SayHello(sayHello); Console.WriteLine(response.Body.HelloResponse.Message); }
private static async Task CallWCFService() { HelloEndpointClient proxy = new HelloEndpointClient(); var request = new helloRequest { Name = "John Doe" }; var response = await proxy.SayHelloAsync(request); Console.WriteLine(response.Body.HelloResponse.Message); }