serializer
Programmer
I am having a problem with deserialization.
I have a c# dll with some classes with a namespace called "Shared". All classes resides within this namespace.
This dll is used by a web service which expose a method that takes a byte array.
A WinForms project is serializing an object that originally comes from the dll. The actual object is coming from the web service as the Winforms project is not using the dll by itself. The WinForms project is using the method to send the byte array to the web service.
The web service deserialize this array into an object. The problem is that is is not recognized as the same object and is therefor returning the correct object - but with null members.
The class that is used to serialization is called "Report". So, at the WinForms end it is referenced as:
webserviceReference.Report
At the webservice end we have:
Shared.Report
It works if I create a reference from the webservice to the webservice itself and only work with those classes. It seems like an ugly workaround.
I assume I can add/manipulate the serialization or deserialization in some way to make the deserialization to be able to deserialize the full object. Perhaps to XmlSerializerNamespaces but I have no idea. Can someone shed some light here?
I have a c# dll with some classes with a namespace called "Shared". All classes resides within this namespace.
This dll is used by a web service which expose a method that takes a byte array.
A WinForms project is serializing an object that originally comes from the dll. The actual object is coming from the web service as the Winforms project is not using the dll by itself. The WinForms project is using the method to send the byte array to the web service.
The web service deserialize this array into an object. The problem is that is is not recognized as the same object and is therefor returning the correct object - but with null members.
The class that is used to serialization is called "Report". So, at the WinForms end it is referenced as:
webserviceReference.Report
At the webservice end we have:
Shared.Report
It works if I create a reference from the webservice to the webservice itself and only work with those classes. It seems like an ugly workaround.
I assume I can add/manipulate the serialization or deserialization in some way to make the deserialization to be able to deserialize the full object. Perhaps to XmlSerializerNamespaces but I have no idea. Can someone shed some light here?