ServiceContract hierarchy?

Hi,

We have a server written with .NET Remoting, which we are now trying to integrate with WCF, but there is an issue which we can't seem to find any solution for:

Let's say our main interface looks something like this:

publicinterfaceIApplicationServer
{
ISmartTrigger SmartTrigger
{
get;
}
...
}

publicinterfaceISmartTrigger
{
int AddSmartTrigger(int TriggerID);
}

The implementation is not critical at this stage. In general, the main object (ApplicationServer) will only hold other objects (like SmartTrigger), which have our API methods declared in them. This is a logical division which we've made, our IApplicationServer interface holds more then 20 objects and each of these objects hold a few methods.

Trying to integrate this architecture with WCF, we've defined IApplicationServer as a [ServiceContract], but then couldn't continue from that point... Should each inner interface be a [ServiceContract] of its own? we're not sure, because they cannot reside in a hierarchy. Could they be DataContracts? No, because they hold methods. Ouch.

Any suggestions?

[1990 byte] By [Ron-N] at [2007-12-28]
# 1

This should not work on WCF (or any service-oriented framework). One of the tenets of service-oriented frameworks is the separation between data and behavior - services accept incoming requests that are basically data, and reply with data. That allows for services developed by different companies to talk to each other, without sharing code.

CarlosFigueira-MSFT at 2007-9-3 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...

Visual Studio Orcas

Site Classified