Consumed WCF service returns void although return type (& value) specified

Posted by Abs on Stack Overflow See other posts from Stack Overflow or by Abs
Published on 2010-03-26T11:18:58Z Indexed on 2010/03/26 11:23 UTC
Read the original article Hit count: 708

Filed under:
|
|
|

I have a WCF service that I am attempting to connect to via a console application for testing (although will move to WPF for the final interface). I have generated the proxy, added the service reference to my project in visual studio and I can see all the methods I have created in my WCF interface:

SupportStaffServiceClient client = new SupportStaffServiceClient("WSHttpBinding_ISupportStaffService");
client.myMethod(message);

However when I call a method, which in the WCF interface is specified as returning a value, the method returns void in the console application.

client.getMethod(message);

The WCF service method is definitely returning a message, I'm just unsure as to why the client cannot "see" the return.

© Stack Overflow or respective owner

Related posts about c#

Related posts about wcf