Deserializing XML to an Auto-Generated Proxy Class
I'm trying to deserialize a parameter being passed into a web service call using XML Serialization. I am targeting the type of the proxy class that is generated by Visual Studio when referencing the web service. The deserialization appears to work except(no exceptions) yet none of the xml fields are mapped to their corresponding properties in the proxy class. What's even stranger is that I can deserialize to the actual class hidden behind the web service that is being proxied into objects by the refe开发者_开发技巧rencing application. What am I missing????
The problem was that the proxy class defines an XML namespace via the namespace attribute generated by the proxy class generator. Removing that namespace allows me to deserialize into that class from XML that doesn't have that namespace specified. Problem solved.
精彩评论