casting incomptability between 2 instances of the same class

P

Pierre

Hi,

I am using 2 different web services: Manage_Login and Manage_Employee.
In these WS I can have the same message (using the appropriate
methods), and this message is an object that I serialize: Employee.

On the client side, after using my WS, I try to compare two objects:
Manage_Login.Employee and Manage_Employee.Employee. It is the same
class, from the same assembly (my underlying business objects
assembly), but coming from 2 different web services.

I get a casting incomptability between 2 instances of the same class.
Is there a way around that?

I would like not to have to write a function that does:
Manage_Login.Employee.Name=Manage_Employee.Employee.Name;
Manage_Login.Employee.EMail=Manage_Employee.Employee.EMail;
....

thank you for you thoughts and help,
Pierre
 
M

Marc Gravell

One option here is to use the command-line version of WSDL.exe, specifying
/sharetypes and *both* web-services in a single cs file; as long as the
namespace etc match, this will result in a single class that is used by both
services.

The other (huge) advantage of WSDL.exe (over the IDE UI) is that you can
specify /edb to get property-change notifications.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top