Thursday, March 11, 2004

WebService annoyance

So being a WebService newbie I encountered the following annoyance again today (I forgot from my first encounter - hopefully typing this will remind me not to do it again): When calling a web method, any object parameter intended to be passed by reference must be explictly marked as ref The lazy approach that I was used to by now - just passing the object reference without a ref keyword and depending on the fact that my underlying object would be updated whenever I modified my method parameter - only works when using "regular" references. This of course makes sense - a webservice requires the actual, serialized object value, and will create an corresponding output only for return values and method parameters marked as ref or out.



Post a Comment

<< Home