473,320 Members | 1,926 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,320 software developers and data experts.

Multiple asmx with same datatype causes multiple namespaces in vs2

Here's the scenario:
- Created a web service project
- Added 2 services (asmx files)
- Created a custom entity ("Customer")
- Created a method in each service which returns/receives the above entity

- Created a class library
- Added 2 web references (one for each asmx)
The created proxy contains the "Customer" class for each service (asmx) -
each class with it's own namespace !! This, for example, prevents me from
receiving a Customer from Service1 and sending it to Service2 as a parameter,
although they originate from the same service (conceptually speaking).

a few more things :
1. The problem is that adding a web reference in a class library doesn't
allow creation of the same namespace
2. The problem doesn't exist in website projects - there you can add
numerous web references in the same namespace.

Any ideas of how to do the same in class library ?

Jan 14 '06 #1
1 1937
Hello Ido,

To use Customer class from each service u need to open generated proxy class
and remove decraration of Customer class

IF> - Created a web service project
IF> - Added 2 services (asmx files)
IF> - Created a custom entity ("Customer")
IF> - Created a method in each service which returns/receives the above
IF> entity
IF> - Created a class library
IF> - Added 2 web references (one for each asmx)
IF> The created proxy contains the "Customer" class for each service
IF> (asmx) -
IF> each class with it's own namespace !! This, for example, prevents me
IF> from
IF> receiving a Customer from Service1 and sending it to Service2 as a
IF> parameter,
IF> although they originate from the same service (conceptually
IF> speaking).
IF> a few more things :
IF> 1. The problem is that adding a web reference in a class library
IF> doesn't
IF> allow creation of the same namespace
IF> 2. The problem doesn't exist in website projects - there you can add
IF> numerous web references in the same namespace.
IF> Any ideas of how to do the same in class library ?
IF>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jan 14 '06 #2

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

Similar topics

3
by: John Smith | last post by:
Ok, I am not sure if it is possible. But what I'm trying to do is validate an XML file with out having to add namespace in the xml. What I mean is lets say I have 2 XSD they have different...
3
by: D. Shane Fowlkes | last post by:
Sorry for the length of this post. I have created a rather complex form which has a header/line item (parent and child records) structure. It's for an intranet. A screenshot can be seen here: ...
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...
0
by: Peter Theill | last post by:
I have these two web services: namespace WebService1 { public class Service1 : System.Web.Services.WebService { public Service1() { } public string HelloWorld() {
6
by: Orgun | last post by:
Hi, I sent this message to the moderated c++ group too but it is waiting for moderator approval and I wanted to send here too. I am new to Design Patterns. I want to write a simple...
6
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public...
1
by: =?Utf-8?B?UEI=?= | last post by:
Hi I was investigating whether we could have a single entry-point (.asmx) to multiple Web Service classes instead of just one. Something like: <%@ WebService Language="C#" Class="Class1"...
5
by: =?Utf-8?B?a3Jpcw==?= | last post by:
I created a simple webservice .asmx on Visual Studio 2005. As I plan to deploy it to Sharepoint Portal 2003, I copied asmx to \web server extensions\60\ISAPI directory of the server, where all...
2
by: jparulan | last post by:
Hi All, I am developing web service that does not use IIS, I was successful on deploying a normal web service with System.Data and System.Web namespaces. BUT when I added the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.