开发者

Deserializing XML to an Auto-Generated Proxy Class

开发者 https://www.devze.com 2023-01-01 18:56 出处:网络
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 w

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消