Hi,
For example I have two services hosted in IIS.
[ServiceContract]
public interface IDeviceService
{
[OperationContract]
DeviceCollection GetAllDevices(Customer customer);
}
[ServiceContract]
public interface IUserService
{
[OperationContract]
User Authenticate(string username, string password);
}
Both the User object that is returned from the Authenticate operation in the UserService and the DeviceCollection that is returned from the GetAllDevices operation in the DeviceService have a child object definition of Customer. Customer is a business object is in the same assembly as the User and Device objects.
My problem is on the client - when I call the device operation
userProxy.GetAllDevices(user.Customer);
The compiler complains with the following message:
Argument 1 - Cannot convert from UserService.Customer to DeviceService.Customer
I can connect to both services fine, it's the object definition of Customer that is the problem. I don't really want to put the Operations in the same service as they seem to live naturally in their own services. I guess what I'm asking is that how to other programmers deal with such a problem?
Cheers, Stuart