Help. :) I have 4 large web services, in which in part of each contains the
filling of the same class. I want to print all the information from this
class, but it can't implicitly convert the type of the web service class to
the other web service class. I'm sure this is confusing, here's an example:
Web services 1, 2, 3, and 4 all contain the class PrintData. Each populate
the class differently. The local client application can call each of the
four web services and return an instance of the PrintData class. The
problem is, in my local class I'd have to have a web reference to each one,
with four different constructors. Currently each web service has it's own
client app, but I wanted to share the same utilities class library that will
handle the printing for all, since it uses the exact same class, but from a
different namespace/web service.
I hope this made sense. This is a real pain in the booty and would really
appreciate anyone's help.
Thanks,
Josh 4 1753
Two approaches:
1) You could make an IPrintData interface. All of the webserivces would
return an IPrintData interface. You could put the IPrintData interface in a
namespace like XYZ.Common. Then all the webserivces and the client app can
reference that. Then your client app could have something like
IPrintData appropriatePrintData = WebServiceX.GetPrintData();
and GetPrintData would be defined as
IPrintData GetPrintData(Params);
I have no idea how webserives work...but that's how I do it in remoting.
2) You could create a fifth webserivce that knows about the other four. So
the client just has to call that one webserive and the webserive takes care
of returning the appropriate PrintData based on the parameters passed to it.
Hope it helps
"Joshua Moore" wrote: Help. :) I have 4 large web services, in which in part of each contains the filling of the same class. I want to print all the information from this class, but it can't implicitly convert the type of the web service class to the other web service class. I'm sure this is confusing, here's an example:
Web services 1, 2, 3, and 4 all contain the class PrintData. Each populate the class differently. The local client application can call each of the four web services and return an instance of the PrintData class. The problem is, in my local class I'd have to have a web reference to each one, with four different constructors. Currently each web service has it's own client app, but I wanted to share the same utilities class library that will handle the printing for all, since it uses the exact same class, but from a different namespace/web service.
I hope this made sense. This is a real pain in the booty and would really appreciate anyone's help.
Thanks, Josh
I appreciate your feedback. The same problem is that still there will be a
different namespace on the returned interface.
"GreyAlien007" <Gr**********@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com... Two approaches:
1) You could make an IPrintData interface. All of the webserivces would return an IPrintData interface. You could put the IPrintData interface in a namespace like XYZ.Common. Then all the webserivces and the client app can reference that. Then your client app could have something like IPrintData appropriatePrintData = WebServiceX.GetPrintData(); and GetPrintData would be defined as IPrintData GetPrintData(Params);
I have no idea how webserives work...but that's how I do it in remoting.
2) You could create a fifth webserivce that knows about the other four. So the client just has to call that one webserive and the webserive takes care of returning the appropriate PrintData based on the parameters passed to it.
Hope it helps
"Joshua Moore" wrote:
Help. :) I have 4 large web services, in which in part of each contains the filling of the same class. I want to print all the information from this class, but it can't implicitly convert the type of the web service class to the other web service class. I'm sure this is confusing, here's an example:
Web services 1, 2, 3, and 4 all contain the class PrintData. Each populate the class differently. The local client application can call each of the four web services and return an instance of the PrintData class. The problem is, in my local class I'd have to have a web reference to each one, with four different constructors. Currently each web service has it's own client app, but I wanted to share the same utilities class library that will handle the printing for all, since it uses the exact same class, but from a different namespace/web service.
I hope this made sense. This is a real pain in the booty and would really appreciate anyone's help.
Thanks, Josh
your speaking to the fact that your client app has to reference all of the
webservices right?
"Joshua Moore" wrote: I appreciate your feedback. The same problem is that still there will be a different namespace on the returned interface.
"GreyAlien007" <Gr**********@discussions.microsoft.com> wrote in message news:04**********************************@microsof t.com... Two approaches:
1) You could make an IPrintData interface. All of the webserivces would return an IPrintData interface. You could put the IPrintData interface in a namespace like XYZ.Common. Then all the webserivces and the client app can reference that. Then your client app could have something like IPrintData appropriatePrintData = WebServiceX.GetPrintData(); and GetPrintData would be defined as IPrintData GetPrintData(Params);
I have no idea how webserives work...but that's how I do it in remoting.
2) You could create a fifth webserivce that knows about the other four. So the client just has to call that one webserive and the webserive takes care of returning the appropriate PrintData based on the parameters passed to it.
Hope it helps
"Joshua Moore" wrote:
Help. :) I have 4 large web services, in which in part of each contains the filling of the same class. I want to print all the information from this class, but it can't implicitly convert the type of the web service class to the other web service class. I'm sure this is confusing, here's an example:
Web services 1, 2, 3, and 4 all contain the class PrintData. Each populate the class differently. The local client application can call each of the four web services and return an instance of the PrintData class. The problem is, in my local class I'd have to have a web reference to each one, with four different constructors. Currently each web service has it's own client app, but I wanted to share the same utilities class library that will handle the printing for all, since it uses the exact same class, but from a different namespace/web service.
I hope this made sense. This is a real pain in the booty and would really appreciate anyone's help.
Thanks, Josh
Sorry...I'm not very good at explaining myself and I appreciate you sticking
with me. When WebService1 retuns the PrintData class instance the strong
typed name is:
WebService1.PrintData. Whether this is an interface or a class or whatever,
it won't let me convert this directly, and I was hoping not to have to test
each variable for nulls, set each value, etc. manually. My hope was if I
created a local class that was identical to the one that the web service
returns, I wouldn't have to explitcity set each value, checking for nulls,
etc. I cannot reference all the web services is this class library
(direction from manager) - it's the whole reason we're trying to put
everything in one class/method, so there's not a method for each webservice.
Thanks,
Josh
"GreyAlien007" <Gr**********@discussions.microsoft.com> wrote in message
news:9C**********************************@microsof t.com... your speaking to the fact that your client app has to reference all of the webservices right?
"Joshua Moore" wrote:
I appreciate your feedback. The same problem is that still there will be a different namespace on the returned interface.
"GreyAlien007" <Gr**********@discussions.microsoft.com> wrote in message news:04**********************************@microsof t.com... > Two approaches: > > 1) You could make an IPrintData interface. All of the webserivces > would > return an IPrintData interface. You could put the IPrintData interface > in > a > namespace like XYZ.Common. Then all the webserivces and the client app > can > reference that. Then your client app could have something like > IPrintData appropriatePrintData = WebServiceX.GetPrintData(); > and GetPrintData would be defined as > IPrintData GetPrintData(Params); > > I have no idea how webserives work...but that's how I do it in > remoting. > > 2) You could create a fifth webserivce that knows about the other > four. > So > the client just has to call that one webserive and the webserive takes > care > of returning the appropriate PrintData based on the parameters passed > to > it. > > Hope it helps > > > > > "Joshua Moore" wrote: > >> Help. :) I have 4 large web services, in which in part of each >> contains >> the >> filling of the same class. I want to print all the information from >> this >> class, but it can't implicitly convert the type of the web service >> class >> to >> the other web service class. I'm sure this is confusing, here's an >> example: >> >> Web services 1, 2, 3, and 4 all contain the class PrintData. Each >> populate >> the class differently. The local client application can call each of >> the >> four web services and return an instance of the PrintData class. The >> problem is, in my local class I'd have to have a web reference to each >> one, >> with four different constructors. Currently each web service has it's >> own >> client app, but I wanted to share the same utilities class library >> that >> will >> handle the printing for all, since it uses the exact same class, but >> from >> a >> different namespace/web service. >> >> I hope this made sense. This is a real pain in the booty and would >> really >> appreciate anyone's help. >> >> Thanks, >> Josh >> >> >> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Vlad |
last post by:
Is there any way to install multiple instances of the same windows service
designed with VS.NET 2003? I tried copying the binaries into a separate
folder and then copying registry entries for the...
|
by: Fernando Nasser |
last post by:
Multiple database services and multiple versions on Red Hat Linux systems
The way it works is that we require a specific service script for each
database service (that is listening on each port)....
|
by: Mike |
last post by:
Looking to find any information on how to properly configure multiple
instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking
for information on how the multiple instance settings...
|
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...
|
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() {
|
by: Matt |
last post by:
I have approximately 5 instances on my test server that are identical
to my prod server. On the prod server, when I look at the services
file, there is a single entry per instance and everything...
|
by: v4u2chat |
last post by:
Do I need to extend any of classes from AXIS to return multiple values? I'm exposing the following method as web service through AXIS to return multiple values.
public ContactAddress...
|
by: assgar |
last post by:
Hi
I was using a schroll bar to display multiple rows of dynamically created from database records.
The scrolling was not displaying the data properly so I have decided to use pagination.
The...
|
by: Adam Clauss |
last post by:
We have a service written in C#. The generated code "hardcodes" the service
name into the exe.
We have a situation where we would like to allow multiple Windows Services
to be defined. These...
|
by: mcosgriff |
last post by:
Using Visual Studio 2005, language is C#
What I did so far was add a web reference, with this I can listen to a web service and receive an XML file with updated data and store relevant data off to...
|
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...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |