Simple OPC UA Web Service Samples

The OPC Foundation has posted on its web site sample code that implements an OPC UA Client and Server without the use of any UA SDKs or communications stacks.

Aw 3173 Opc Logoweb

Much of the recent focus of the OPC Unified Architecture team has been the completion and testing of the OPC UA communication stacks and SDKs in portable C/C++, .NET and Java. While these code deliverables provide the simplest path for development of OPC UA applications that require the speed of binary communications, OPC also supports a pure Web Services binding that allows modern development tools like Microsoft’s Visual Studio to auto-generate the necessary classes to support OPC UA application programming.

The OPC Foundation recently posted on the web site such a sample that implements an OPC UA Client and Server without the use of any UA SDKs or communications stacks. In these samples Microsoft Visual Studio 2008 with WCF 3.5 projects were created that consumed the standard published OPC UA WSDL (Web Services Description Language) file. The Microsoft auto-generated Web Services glue code and a little more implementation code (about 2,000 lines total) yielded a simple client and server that not only interoperate with each other, but also with the existing samples that use the UA SDK and stack. The samples are kept simple on purpose but they do implement enough to be useful.

The sample client implements the following:

  • Create/Activate Session (Including application verification but no user authentication)
  • Browse
  • Read (scalars, arrays and complex data)
  • Create Subscription
  • Create Monitored Items

 

The sample server implements the following:

  • Default address space (including all OPC UA defined types and the Server object)
  • Discovery Endpoint
  • Create/Activate Session (Including application verification but no user authentication)
  • Read (scalars, arrays and complex data)
  • Browse (no Browse Next)
  • Translate Browse Paths
  • Create Subscription
  • Create Monitored Items

 

While these samples use the Microsoft development tools, other modern software development environments that support code generators compliant with the latest Web Services standards like WS-Secure Conversation on which OPC UA relies could be used with similar success.

For various support and licensing reasons, we believe some potential OPC UA implementers would prefer not to use our SDKs and stacks. The standard Web Service bindings to OPC UA provide this option nicely.

For more information, please visit www.opcfoundation.org.

More in Home