title: XML Error when calling web service
body: <p>I have 4 portals (WW, EU, AU, US), every one of them has its own web service (through PHP which means I do not have control over).</p>
  
  <p>For those 4 web services, I have 4 clients (generated by VS.Net Add Web Reference).</p>
  
  <p>There is a method called <code>CommonMethod</code> it is the same on all web services, returns an object of type <code>CommonClass</code>.</p>
  
  <ul>
  <li>When I call that method (using EU proxy class) I am getting an InvalidOperationException <code>There is an error in XML document (2, 615).</code>, and the InnerException says "Cannot assign object of type NS.com.AU.CommonClass to an object of type NS.com.EU.CommonClass.".</li>
  <li>When I call that method (using US proxy class) I am getting an InvalidOperationException <code>There is an error in XML document (2, 615).</code>, and the InnerException says "Cannot assign object of type NS.com.AU.CommonClass to an object of type NS.com.US.CommonClass.".</li>
  <li>When I call that method (using AU proxy class), No exception is thrown.</li>
  <li>When I call that method (using WW proxy class) I am getting an InvalidOperationException <code>There is an error in XML document (2, 615).</code>, and the InnerException says "Cannot assign object of type NS.com.AU.CommonClass to an object of type NS.com.WW.CommonClass.".</li>
  </ul>
  
  <p>I searched the web for such error, well it is XML so a lot of irrelevant stuff comes up and could not find something useful.</p>
  
  <p>Now I noticed, the 4 web services are using the same namespace in their WSDL documents (xmlns:tns="urn:rambo.com:RamboComApi"). Can this be the source of confusion and type-casting exception? Should I tell the authors of the web services to choose different namespace for each web service?</p>