<p>I'm working on a project where I have 2 web services that need the same entity. The 2 web services are on the same server so on the back-end, they share the same classes. </p>

<p>On the front-end side, my code consumes <em>both</em> web services and sees the entities from both services as separate (in different namespaces) so I can't use the entity across both services.</p>

<p>Does anyone know of a way to allow this to work in .NET 2.0?</p>

<p>I've done this with my entity:  </p>

<pre><code>[XmlType(TypeName = "Class1", Namespace = "myNamespace")]
public class Class1
{
    public int field;
}
</code></pre>

<p>Hoping that my IDE would somehow "know" that the class is the same on both web services so that it wouldn't create separate entities for both classes, but no luck.</p>

<p>Is this possible to do with .NET 2.0 web services?</p>

I'm not sure about the implementation details with .NET 2.0, but I believe what you want to do is put the common classes in a seperate XSD file and refer to it from within your two WSDL's. This way, the common types have the same namespace between the two services.
Now, how you do this in .NET 2.0 I couldn't give you the specifics on...