Web Service returning object with null fields

Posted by Xaiter on Stack Overflow See other posts from Stack Overflow or by Xaiter
Published on 2009-03-26T13:11:15Z Indexed on 2010/05/03 15:18 UTC
Read the original article Hit count: 184

Filed under:
|
|
|

Never seen this one before.

WebService.Implementation imp = new WebService.Implementation();
WebService.ImplementationRequest req = new WebService.ImplementationRequest();
return imp.GetValue(req);

The object that imp returns is not null. It's returning an ImplementationResponse, as expected. But all of the fields in that object are null. Which is not expected. The WebService, currently, just returns some constant dummy data. We've tested this on another developer's machine, works just fine.

I suppose I should also note that the WebService should throw an exception if I pass null into the GetValue method. It doesn't. Not for me.

Any idea what could be wrong with my environment that could make a WebService return an object, but make every value in that object null? And somehow 'magically' return this mystery object when it should be throwing an exception?

© Stack Overflow or respective owner

Related posts about c#

Related posts about web-services