We do not have an out-of-box example for the combination you described.
As a proof of feasibility, in the examples solution for C# and VB.NET, we have a very simple WCF service project (called Web\WcfService1), and a client to it (called Console\WcfClient1).
The service contract:
using System.ServiceModel;
namespace WcfService1
{
// NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in Web.config.
[ServiceContract]
public interface IService1
{
[OperationContract]
string GetData();
}
}
The service implementation:
// WcfService1: A simple Web service using WCF technology. Provides a GetData method to read a value of an OPC item.
// Use WcfClient1 project (under Console folder) to test this Web service.
using OpcLabs.EasyOpc.DataAccess;
namespace WcfService1
{
// NOTE: If you change the class name "Service1" here, you must also update the reference to "Service1" in Web.config and in the associated .svc file.
public class Service1 : IService1
{
public string GetData()
{
var easyDAClient = new EasyDAClient();
object value = easyDAClient.ReadItemValue("", "OPCLabs.KitServer.2", "Demo.Ramp");
return (value == null) ? "" : value.ToString();
}
}
}
The client:
// WcfClient1: Using a Web service provided by the WcfService1 project (under Web folder), gets and displays a value of
// an OPC item.
using System;
namespace WcfClient1
{
class Program
{
static void Main()
{
var client = new Service1Client();
// Use the 'client' variable to call operations on the service.
Console.WriteLine(client.GetData());
Console.ReadLine();
// Always close the client.
client.Close();
}
}
}
What you described should be doable. If you run into any specific issues, let me know and we will try to help.
Best regards