Why are access modifiers on web service proxy methods important

Posted by cand on Stack Overflow See other posts from Stack Overflow or by cand
Published on 2010-03-12T13:56:16Z Indexed on 2010/03/12 13:57 UTC
Read the original article Hit count: 424

I'm creating interface to an external web service with C# client generated from WSDL. And in this client class I have methods with signature like: public ResponseType InvokeMethod(RequestType request). I want to change its access modifier to protected, but then web service responds with "web service method name is not valid" exception. Do You know why is that so? I understand that maintaining method name can be important for some reasons, but why can't I change this access modifier? Shouldn't it be a matter of my code what access I want to give to this method? Thanks for all the answers in advance.

© Stack Overflow or respective owner

Related posts about c#

Related posts about web-services