0

Hi,

When I have a class that has an object variabel where other types is in. When I send a web-request to the server and gets the variable, it works fine when the data is set to known-types. The problem is when I want to use the data in the object returned. I can not typecast it and gets an error when trying to getType() of the object.

How can I make it it's own type of the content? I know the type because of other variables in the class so I just have to make it of this type but how? I have thought about making a xml-parser of these object to the given class; but do not know if this is possible at all and nessesary at all?

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by sniper1983
0

Can you upload a sample project demonstrating this behavior? And by known type are you referring to types in a KnownType attribute or primitive types in the BCL? Which WCF serializer are you using? etc etc.

0

Can you upload a sample project demonstrating this behavior? And by known type are you referring to types in a KnownType attribute or primitive types in the BCL? Which WCF serializer are you using? etc etc.

Your surgestion of making a simple sample project showed me that the problem was in the client not the wcf-service. I located the problem in a class and fixed it. Thanks for the reply. I've maked it as an answer.. :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.