I'm doing some wsdl- and client-first development in C# with WCF (the wsdl and client already exist, I'm building the server-side,) and I'm having an odd issue. I used wsdl.exe to generate a contract from my .wsdl, and I'm able to build it and host the WCF service as a Windows service.
However, the wsdl I get from http://localhost/Service?wsdl exposes private fields instead of the public properties (e.g.: instead of OsType
I get m_OsTypeField
, which is the private variable associated with the public OsType
property.)
Here are the attributes for one of the classes having this issue:
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://xxxxxxx.com/")]
I'm completely stumped, as the .NET XML serializer is supposed to ignore any private members. Any ideas about why this might be happening?