1

I have a WCF service that returns a complex object (just a class). I can step into the construction on the object and see that it's properties are being populated but when I hit the F11 key on the return statement of the method that populates the object and i'm on the next line back in the client all the objects properties are NULL

I made a method in my service that returns just a string and that works ok. I also set the httpBinding.MaxReceivedMessageSize = int.MaxValue

The object returned is marked as serialisable etc..

Running out of ideas now???

2
  • Can you show us the service interface? Can you show us your data contract? Can you show us your service implementation?? Without these, it's a bit hard to diagnose..... Marc Commented Jul 21, 2009 at 5:20
  • @Bob, if JP's answer was the right one, then you should accept it. Commented Jul 21, 2009 at 14:28

2 Answers 2

2

Try rebuilding your proxy class from the WSDL. Long shot but might help.

Sign up to request clarification or add additional context in comments.

2 Comments

+1 good idea! Maybe the service has changed and the proxy still deals with the old data layout.
Like you said, without any more info, it's just a guess. :)
0

The class needs to be marked with the

[DataContract]

attribute and the properties marked with the

[DataMember]

attribute.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.