Classes in different sub-namespaces all appear at top level in WSDL <p>I'm creating a web service with a variety of classes, many of which can contain references to other classes. Sometimes these "sub classes" have the same name (e.g. Customer and Customer), but are actually different, so I've placed these in different namespaces (e.g. MyRoot.Sub1, MyRoot.Sub2, etc.)</p> <p>When I build the service, the generated WSDL places all of these classes at the top level, without specifying any delineation by sub-namespace. Therefore, it will define two versions of "Customer". Curiously, it doesn't complain during the build process.</p> <p>When I host the service and try to reference it with a browser, I get the following error:</p> <blockquote> <p><em>The top XML element 'Customer' from</em> <em>namespace 'RE: http://...' references</em> <em>distinct types MyRoot.Sub1.Customer</em> <em>and MyRoot.Sub2.Customer. Use XML</em> <em>attributes to specify another XML name</em> <em>or namespace for the element or types.</em></p> </blockquote> <p>I looks like I could use XmlTypeAttribute TypeName to provide an unique class name, but this makes documentation quite a hassle, as everything's going to have two names. Considering the differentiation is already specified by the namespaces, is there any way to utilize that information? I haven't tried using TypeName="Sub1.Customer", etc., but none of the examples that I've seen use this notation, so I'm skeptical.</p> <p>Is there something else obvious that I'm missing?</p>