473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using multiple web services through proxy giving error

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)

Please suggest
Oct 16 '06 #1
1 2114
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.

"Ankur Goenka" <Ankur Go****@discussions.microsoft.comwrote in message
news:60**********************************@microsof t.com...
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)

Please suggest

Oct 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: SQLScott | last post by:
I have a Web Service in which I am trying to pass an XMLDocument as a parameter to one of the methods. I would like to use the XMLTextReader to read the XML but I am getting the following error: ...
3
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
4
by: Mike Malter | last post by:
I have a standalone Windows Server 2003 running IIS, SQL Server and ISA Server. We've managed to successfully disable socket pooling, got vpn working and have published a web site. The box is...
0
by: hazz | last post by:
After generating an XML Web Service proxy class using wsdl.exe, I added a proxy class to a new VS2005 project to consume my webservice. I want to call the method ReturnCustomer() whose proxy...
4
by: John | last post by:
I have WSDL file with <wsdl:fault> element. When I use Websphere WSAD to generate Java proxy classes from WSDL, I am able to see the custom exception classes that correspond to the <wsdl:fault>...
2
by: rcp | last post by:
Hi all, I've read all posts from all existing threads and none of them worked to solve my problem, although its exactly the same. I'll try to explain my case and see if a kind soul could help me...
1
by: dan kisting | last post by:
Hello, I am writing a c# application which connects to web services through a Proxy Server. I am running a local Proxy Host to simulate what the user is seeing, and his problem is he is getting...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
1
by: =?Utf-8?B?Z2FsbGFu?= | last post by:
We have an application that is running fine on several of our customer’s servers. However, one of our customers is having a problem running the application. The application works on one of his...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.