PackageDescription: OPCXMLDA


OPCXMLDA

Last published: May 9, 2009 by 'xp'

Defines 42 Classes
Extends 57 Classes


This package contains a not-very-well-documented, but mostly-complete implementation of the OPC XML-DA specification v1.01 (see www.opcfoundation.org). It needs to be run in VW 7.4 or later; earlier versions of the WebServices code have bugs that cause problems with this package.

See the ExampleServer class for an example of how to set it up and run it. To run the ExampleServer, do the following in a workspace:

server := OPCXMLDA.ExampleServer start.
"Use an XMLDA client to interact with your server"
server inspect. "watch the instance variables as you interact with the server"
server stopServers. "when you are done"

To implement your own XMLDA server, the basic steps are:

- Create a subclass of OPCXMLDA.Server

- Implement the class-side #wsdlSchema method to point at a URI that references your WSDL file. The contents of this file will be similar to that specified in ExampleServer>>wsdlContents (basically, it is necessary to import the OPC Foundation's WSDL file and define a service).

- Implement the class-side #portDescription method. It is probably best to copy and paste the one from ExampleServer and replace the address: with the appropriate address, and the wsdlServiceImplementation with the service name you used in your WSDL file.

- Implement #initialize to set up your XMLDA server. See ExampleServer>>initializeService for what needs to be done there.

Things not done:
- Sampling rate is hard-coded to 500ms. No variation is supported at present.
- Numeric types are not supported the way the spec would like. I'm not sure how to make VW's XML marshalling do the right thing in all cases.
- Multiple language support.
- Performance testing.
- Possibly some issues with timezones.

NOTE: When the server starts, it changes some global settings. Notably, it changes the marshaling for SmallInteger to xsd:int instead of xsd:short. Without this, it is impossible to return OPC item values between 32768 and SmallInteger maxVal. This change may or may not cause problems with other Web Services apps See Server>>initialize for details.

Use at your own risk.

Contact rcoulman _at_ gmail dot com with questions.