Here is my wcf duplex service callback interface:
public interface ICallback
{
[OperationContract(IsOneWay = true)]
void SendClientCallback(CallbackMessage callbackMessage);
[OperationContract]
void GetTemplateList(ref List<ISpecimenTemplateDescriptor> templateDescriptors, IDrawerLayout drawerLayout);
}
I configured my service reference to use the System.Collections.Generic.List type. I did this by right clicking on the service reference, selecting the configure service option, and changing the Collection type. This configured the service reference to use a collection type of List, instead of the default Array type.
When I compile and update my service reference, my interface type “ISpecimenTemplateDescriptor” and “IDrawerLayout” are converted to “System.Object” as shown below:
void GetTemplateList(ref System.Collections.Generic.List<object> templateDescriptors, object drawerLayout);
Why are my interface objects converted to System.Object in the service reference?
Here is my service contract:
[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(ICallback))]
public interface IWcfService
{
.....
}
Here are my service behaviors:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Reentrant, UseSynchronizationContext = false)]
public class WcfService : IWcfService
{
......
}
Thanks for your help in advance!
Well, I have searched high and low. In the end I have reverted back to using serializable concrete classes instead of trying to use interfaces in my service reference.