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

Understanding and Using E-Stops

E-stops, or emergency stop switches, are used to ensure machine as well as personnel safety. They are used to provide a consistent and predictable failsafe response on a wide ...

Demystifying motor disconnect switches: What are they and how are they used?

From conveyor belts to drum mixers, motors are used in virtually every industrial application to drive machinery. Equipment downtime is the main motivation behind monitoring and...

Full Line of DIN Rail Terminal Blocks Video

Altech offers an extensive line of DIN Rail Terminal Blocks including all major Connection Technologies available in the industry to meet requirements for a vast variety of applications...

The Value of Integrating DIN Rail Cylindrical Fuse Holders Into Your Designs

What short circuit currents do I have to consider when purchasing a DIN rail cylindrical fuse holder? That data is available from the manufacturer. For example, Altech cylindrical...