Simple OPC UA Web Service Samples

July 25, 2008
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.

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.

Sponsored Recommendations

Rock Quarry Implements Ignition to Improve Visibility, Safety & Decision-Making

George Reed, with the help of Factory Technologies, was looking to further automate the processes at its quarries and make Ignition an organization-wide standard.

Water Infrastructure Company Replaces Point-To-Point VPN With MQTT

Goodnight Midstream chose Ignition because it could fulfill several requirements: data mining and business intelligence work on the system backend; powerful Linux-based edge deployments...

The Purdue Model And Ignition

In the automation world, the Purdue Model (also known as the Purdue reference model, Purdue network model, ISA 95, or the Automation Pyramid) is a well-known architectural framework...

Creating A Digital Transformation Roadmap Using A Unified Namespace

Digital Transformation has become one of the most popular buzzwords in the automation industry, often used to describe any digital improvements to industrial technology. But what...