Using the OPC Foundation sample server

The OPC Foundation provides sample implementations of OPC Unified Architecture (UA) applications, both servers and clients. You can use a sample OPC Foundation sample server application with the probe for evaluation and testing purposes.

To use a sample OPC UA server, configure the probe's properties as follows:

  1. Set the values of the following properties as shown in Connecting to the OPC UA server:
    • EndpointHttpHost
    • EndpointHttpPort
    • EndpointSessionServiceName
    • OPCSessionName
    • RequestedSessionTimeout
    • MaxResponseMessageSize

    The documentation for the OPC Foundation sample server may contain guidance on how to configure these properties. For example, there may be information on the range of values that RequestedSessionTimeout and MaxResponseMessageSize can have.

  2. In addition, set the following properties to the shown values:
    EndpointHttpService="SessionEndpoint"
    EndpointHttpTns="http://opcfoundation.org/UA/2008/02/Services.wsdl"
  3. Download all of the WSDL and XSD sets that the OPC Foundation sample server application uses.
    1. Download the Services.wsdl set and save it to a file name of your choice, for example, Services.wsdl:
      http://localhost:10000/Quickstarts/DataAccessServer/None?wsdl
    2. Download the Services0.wsdl set and save it to a file name of your choice, for example, Services0.wsdl:
      http://localhost:10000/Quickstarts/DataAccessServer/None?wsdl=wsdl0
    3. Download the Type.xsd set and save it to a file name of your choice, for example, Type.xsd:
      http://localhost:10000/Quickstarts/DataAccessServer/None?xsd=xsd1
    4. Download the Serialization.xsd set and save it to a file name of your choice, for example, Serialization.xsd:
      http://localhost:10000/Quickstarts/DataAccessServer/None?xsd=xsd0

  4. Save the files that contain the downloaded WSDL and XSD sets in a local directory. For example:
    C:/temp
  5. Modify the location and schemaLocation fields in the URLs associated with the files for these WSDL and XSD sets.
    Note: These URLs are located in the sets you downloaded and saved to files in step 3 (for example, Services.wsdl, Services0.wsdl, Type.xsd, and Serialization.xsd).
    1. The following example shows the original values specified for the location and schemaLocation fields for one of these sets. The fields that need to be modified appear in this typeface:
      <wsdl:import namespace="http://tempuri.org/"
      location="http://localhost:10000/
      Quickstarts/DataAccessServer/None?wsdl=wsdl0"/>
      
      <xsd:import schemaLocation="http://localhost:10000/Quickstarts/
      DataAccessServer/None?xsd=xsd1" 
      namespace="http://opcfoundation.org/UA/2008/02/Types.xsd"/>
      
      <xsd:import schemaLocation="http://localhost:10000/Quickstarts/
      DataAccessServer/None?xsd=xsd0"
      namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
    2. The following example shows the URLs after modifying the values for the location and schemaLocation fields. Replace these values with the file path that you specified. The fields that were modified appear in this typeface:

      <wsdl:import namespace="http://tempuri.org/" 
      location="file:/C:/temp/Services0.wsdl"/>
      
      <xsd:import schemaLocation="file:/C:/temp/Types.xsd"
      namespace="http://opcfoundation.org/UA/2008/02/Types.xsd"/>
      
      <xsd:import schemaLocation="file:/C:/temp/Serialization.xsd"
      namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
      

      Do this for all of the sets that you downloaded.

  6. Configure the following properties to values associated with where the OPC Foundation sample server is actually running. Replace the following values with values appropriate for your environment:
    EndpointHttpHost: "localhost"
    EndpointHttpPort: 10000
    EndpointSessionServiceName: "Quickstarts/DataAccessServer/None"
    EndpointWsdlLocation	: 'file:/C:/temp/Services.wsdl'
  7. Start the probe and it connects to the sample server.

    The documentation for the sample server shows how to create and send events to the probe.

  8. When you have finished testing or evaluating the probe, reconfigure it to communicate with the product environment. In particular return the EndpointHttpService and EndpointHttpTns properties to their original values:
    EndpointHttpService="UAService"
    EndpointHttpTns="http://opcfoundation.ord/UA/2008/02/Endpoints.wsdl"