I am building a WCF Client with VS2010. The web service we consume defines some data that it returns as xs:nonNegativeInteger. However VS2010, upon generation of the WCF client code, generates classes with properties of type string for these xs:nonNegativeInteger attributes.
I am wondering why that's the case and if and how I can tell VS2010 to adjust its mappings from xs:nonNegativeInteger to integer rather than string.
(I can't change the wsdl of the web service we consume... And I am also hesitant of simply changing the generated code in case we need to update the service reference, so some sort of data type mapping via a config would be ideal.)
Thanks all!
Example snippet of the WSDL we consume:
<xs:element minOccurs="0" name="blub" type="xs:nonNegativeInteger" />
Example snippet of the generated WCF client code:
<System.Xml.Serialization.XmlElementAttribute(DataType:="nonNegativeInteger", Order:=0)> _
Property blub() As String