title: Sharing WSDL types without XSD
body: <p>I can't seem to find an example of generating proxies from WSDLs with shared types but without having any XSDs to go along with them. Can anyone please mark this as duplicate and point me to an example please?</p>
  
  <p>Here are 2 services, each has its own namespace and a common type. The only thing that is publicly accessible are their WSDLs, there is no type's XSD or its .dll to pass to <code>wsdl.exe /sharedtypes</code> or <code>svcutils</code> and without it I end up with identical <code>class Foo</code> that I can't pass in to <code>SetFoo</code> and <code>class Foo1</code>. </p>
  
  <p>The best I could come up with is generating proxies programmatically and detecting duplicates via CodeDOM, ignoring <code>DataContract</code>/<code>WebServiceBinding</code> namespaces, but it's a huge mess...</p>
  
  <pre><code>[WebService(Namespace = "http://tempuri.org/FOO1")]
  public class Service1 : WebService
  {
      [WebMethod]
      public Foo GetFoo()
      {
          return new Foo();
      }
  }
  
  [WebService(Namespace = "http://tempuri.org/FOO2")]
  public class Service2 : WebService
  {
      [WebMethod]
      public void SetFoo(Foo foo)
      {
      }
  }
  
  public class Foo
  {
      public int Bar { get; set; }
  }
  </code></pre>