all groups > dotnet web services > october 2006 >
You're in the

dotnet web services

group:

Using multiple web services through proxy giving error



Using multiple web services through proxy giving error Ankur Goenka
10/16/2006 1:07:02 AM
dotnet web services: Hi,

I am trying to include two proxy classes (from two different web services
say Namespace.Service1 and Namespace.Service2) in a project (C# Class lib).

These webservice internally use (as input or return) custom classes' objects
e.g. userinfo, customerinfo etc. When i generate the proxy classes for these
services using wsdl, the definition for custom classes' is also generated in
the proxy classes.

Now, when i include these proxy classes in the project (class lib), and try
building the same, it throws the error:
The namespace '<global namespace>' already contains a definition for
'userinfo'.

Is there a way to resolve this? (So that definitions for custom classes are
not included in both the proxy classes but in only one)

Re: Using multiple web services through proxy giving error Pablo Cibraro [MVP]
10/16/2006 10:26:18 AM
Hi,

The wsdl.exe tool to generate the web services proxies always create the
custom classes. This tool also accepts a "namespace" argument, so you can
use it to create the classes in different namespaces. In that way, you won't
have the global namespace problem.

Regards,
Pablo Cibraro.

[quoted text, click to view]

AddThis Social Bookmark Button