SOAP

The SOAP Web Service Workflow Examples

Web services are a strategic component in modern industrial automation systems, enabling disparate applications and platforms to communicate and exchange data seamlessly. Simple Object Access Protocol (SOAP) is a standardized protocol for structuring these messages. In Ignition, SOAP interactions are based on a fundamental provider-consumer model, where one component exposes functionality (the Provider) and another component consumes it (the Consumer). This manual will guide you through the creation and implementation of this model.
The end-to-end data flow for a SOAP web service in Ignition follows a clear and logical sequence, as demonstrated in the practical exercises ahead:
  • SOAP Provider is created to expose specific data or functionality. This is achieved by defining scripted operations that perform tasks like querying tag history or performing calculations.
  • SOAP Consumer is configured to connect to the Provider. This is done by pointing the Consumer to the Provider's WSDL (Web Services Description Language) URL, which acts as a contract defining the available operations.
  • A client, such as a button in a Perspective View or the Ignition Script Console, executes a call to the configured Consumer.
  • The Consumer forwards the request to the Provider, which triggers the corresponding script for the requested operation.
  • The Provider's script runs, processes the request, and generates a response. This data is returned through the Consumer back to the original client for display or further processing.

This section establishes the foundational workflow. The following exercises provide a practical, hands-on demonstration of building a complete SOAP provider from the ground up.

Exercise 1: Building a Custom SOAP Provider

This first exercise demonstrates how to create a fully functional SOAP endpoint from scratch, which involves manually defining all its components. This method provides maximum control over the web service's structure, behavior, and the data it exposes, making it ideal for custom integration projects.

A button in a Perspective View calls SOAP Consumer TagHistoryAverage, which then calls the SOAP Provider TagHistoryAverage. The returned data is displayed on an Ignition Table component.

Exercise 2: Building a SOAP Provider from an Existing WSDL

This exercise creates a SOAP Provider by importing an existing WSDL. The imported WSDL defines the structure of the response for the endpoint. The data returned still needs to be configured.