Re: WCF and Windows Service
It's not clear what you are trying to do. Can you be more specific? Can you describe the architecture in more detail - what clients are connecting to what wcf services, what the services are doing, what problems you are having, etc?
Re: WCF and Windows Service
Thanks.
I have two objects in my Windows Service project. One object is OPC client and database client. If i create this object in code - everything works good. Another object is WCF service library with net.pipe binding for external connection to this service. Ok. I define in my code:
// window service class
public partial class SyncSiemensService : ServiceBase
{
private OpcServiceClass opcServer = new OpcServiceClass();
public SyncSiemensService()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
// OPC client- database client object
opsServer.Strat();
// WCF interface for external communication
// with this windows service
using (ServiceHost host = new ServiceHost(typeof(DuplexPipeWcfService)))
{
host.Open();
eventLog.WriteEntry("Запуск WCF интерфейса синхронного сервиса Сименс выполнено успешно", EventLogEntryType.Information);
}
}
}
WCF service
[OperationContract(IsOneWay = true)]
void GetActValuesFromLine(string line);
string line - external data FOR opc object
and his callback
public interface IDuplexPipeWcfServiceCallback
{
[OperationContract(IsOneWay = true)]
void ActualValuesUpdate(WcfDuplexActualValues value);
}
but "WcfDuplexActualValues value" in mine occurrence - data from OPC object for external connection in WCF. And now i dont know, how retrieve data from opc object without usage client-service communication between OPC object and WCF service library.