I thought that I would try to answer my question with details about how I came up with this solution. It was based on an article in a Dan Minek blog article.
Is a summary, I think that my concept of having multiple services for each of my root business objects was wrong.
Instead, I discovered one service that implemented several DataContracts, for example
public partial class DeviceService : IDeviceService, IUserService { }
Since the device service is created as a partial class, this allowed me to separate the services, and I say separately, they are still the same service, but this allowed me to separate them into separate files and provide some structural organization to the service.
The last part of the implementation was to declare two endpoints in the service definition, for example
<service behaviorConfiguration="GPSCloudHost.DeviceServiceBehavior" name="BusinessService.DeviceService"> <endpoint address="Device" binding="wsHttpBinding" contract="BusinessService.DataContracts.IDeviceService"></endpoint> <endpoint address="User" binding="wsHttpBinding" contract="BusinessService.DataContracts.IUserService"></endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
I'm not sure about WCF to say if this is the βrightβ solution or not, but it works with my requirements. If anyone else has a better solution, I would love to hear it!
Greetings
Simian
source share