public async Task test([FromQuery] string value) { Hello_PortTypeClient client = new Hello_PortTypeClient(); Console.WriteLine($"Got value as {value}"); sayHelloResponse sayHelloResponse = await client.sayHelloAsync(value); Console.WriteLine($"Greeting recieved is {sayHelloResponse.greeting}"); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.Run(async(context) => { var client = new Hello_PortTypeClient(); var response = await client.sayHelloAsync("World"); await context.Response.WriteAsync(response.greeting); }); }