XML-RPC Web Services in WinCC OA An Application: online PARA JCOP FWWG Meeting 15-12-2015 Lorenzo Masetti.

Slides:



Advertisements
Similar presentations
WEB SERVICES. FIRST AND FOREMOST - LINKS Tomcat AXIS2 -
Advertisements

Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
1 CGICGI Common Gateway Interface Server-side Programming Lecture.
RPC Robert Grimm New York University Remote Procedure Calls.
.NET Remoting. .Net Remoting Replaces DCOM (Distributed Component Object Model – a proprietary Microsoft technology for communication among software components.
Cloud Computing Lecture #7 Introduction to Ajax Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under a.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
Integration case study Week 8 – Lecture 1. Enrolment request (Workstation) Application server Database server Database New University Student Record System.
Ajax (Asynchronous JavaScript and XML). AJAX  Enable asynchronous communication between a web client and a server.  A client is not blocked when an.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
DICOM / HL7 Verfication / Java Basis Random user with no account justs wants to validate an HL7 message or DICOM object The next diagram shows a number.
Writing various AJAX forms in Drupal 7 1. Overview of Form API 2. Ctools 2.1 Ctools features 3. Ajax 3.1 Ajax Forms in Drupal 4. Putting it all together.
CSCI 6962: Server-side Design and Programming Web Services.
Google Web Toolkit An Overview By Shauvik Roy Choudhary.
Peter Laird. | 1 Building Dynamic Google Gadgets in Java Peter Laird Managing Architect WebLogic Portal BEA Systems.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Client Call Back Client Call Back is useful for multiple clients to keep up to date about changes on the server Example: One auction server and several.
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
Remote Method Invocation by James Hunt, Joel Dominic, and Adam Mcculloch.
CHAPTER 8 AJAX & JSON WHAT IS AJAX? Ajax lets you…
.NET Mobile Application Development XML Web Services.
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
AJAX Use Cases for WSRP Subbu Allamaraju BEA Systems Inc WSRP F2F Meeting, May 2006.
Lecture VI: SOAP-based Web Service CS 4593 Cloud-Oriented Big Data and Software Engineering.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Web Services Essentials. What is a web service? web service: software functionality that can be invoked through the internet using common protocols like.
Ext JS - Direct Bridging The Gap A DMSBT Presentation By Timothy Chandler.
Thomas Burleson. Using MVC with Flex & Coldfusion Projects June 27, 2007 See how Coldfusion MVC is similar to Flex MVC…
The Mechanics of HTTP Requests and Responses and network connections.
The Holmes Platform and Applications
Java Web Services Orca Knowledge Center – Web Service key concepts.
Jim Fawcett CSE686 – Internet Programming Spring 2014
Windows Communication Foundation and Web Services
CMS DCS: WinCC OA Installation Strategy
Jim Fawcett CSE686 – Internet Programming Spring 2012
WEB SERVICES.
Data Virtualization Tutorial… CORS and CIS
Outline SOAP and Web Services in relation to Distributed Objects
AJAX and REST.
Subbu Allamaraju BEA Systems Inc
Web Software Model CS 4640 Programming Languages for Web Applications
WinCC OA Ultra Thin Client
Processes The most important processes used in Web-based systems and their internal organization.
Outline SOAP and Web Services in relation to Distributed Objects
Windows Communication Foundation and Web Services
#01 Client/Server Computing
Chapter 3: Windows7 Part 4.
Design and Maintenance of Web Applications in J2EE
WEB API.
Inventory of Distributed Computing Concepts and Web services
DWR: Direct Web Remoting
Web Browser server client 3-Tier Architecture Apache web server PHP
AJAX Robin Burke ECT 360.
Interpreter Style Examples
Chapter 9 Web Services: JAX-RPC, WSDL, XML Schema, and SOAP
Asynchronous Javascript And XML
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
Middleware, Services, etc.
Remote Procedure Call Hank Levy 1.
Student: Popa Andrei-Sebastian
Chapter 42 Web Services.
Remote Procedure Call Hank Levy 1.
Remote Procedure Call Hank Levy 1.
Message Passing Systems Version 2
.NET Framework V3.5+ & RESTful web services
Chengyu Sun California State University, Los Angeles
#01 Client/Server Computing
Message Passing Systems
Presentation transcript:

XML-RPC Web Services in WinCC OA An Application: online PARA JCOP FWWG Meeting 15-12-2015 Lorenzo Masetti

Let’s start from the result: Para Online

Live Demo

Another Example: Log Access

Service Architecture

http server also serves the required HTML and javascript Two-layers setup Client (Javascript) Request (XML-RPC) Response (JSON-RPC) Server (WinCC OA) http server WinCC OA http server also serves the required HTML and javascript Service

Four-layers setup using Oracle WebCenter Client (Javascript) Request (XML-RPC) Response (JSON-RPC) J2EE Web Server ( JAVA ) DPAccess Portlet Public Network CMS Network DpAccess EJB Request (XML-RPC) Response (XML-RPC) Server (WinCC OA) http server Service

Services in WinCC OA

General Services in WinCC OA Using CMSfwClass (OO-framework for WinCC OA) we implemented a general framework for exposing and consuming services Request and response through data points Interface of the service defined in a CMSfwClass interface

Exposing the service to the Web To expose the service as a Web Service: we use the httpServer provided with WinCC OA. To handle the request we instantiate a ServiceClient Forwards the request to data point Forwards the response via http

Communication Format The format can be changed by implementing an interface Currently we have implemented: XML-RPC Mixed format (request in XML-RPC, response in JSON-RPC) Request  decoded to methodName, list of parameters (dyn_mixed) Response  decoded to anytype (depending on the return type of the method) Client Encode request Decode response Note: decodeResponse not implemented here: can only be used on the server side Decode request Encode response Server

Service Router A specialized class implements a service router Used to dispatch commands to different services depending on the prefix in the command, e.g. dpAccess.dpGet  dispatched to DpAccess service logAccess.getLog  dispatched to LogAccess service All XML-RPC services implement a “system” interface that allows the client to discover which procedures are available

Generic Client in Javascript

Generic XML+JSON-RPC client in Javascript Mixed communication format: XML for the request, JSON for the response. JSON is easier to handle in Javascript Using the reflection features, we can create a JS object having the same functions defined in the service Passing the URL of the Web Service and the prefix we get an object The implementation of the functions forwards the request to the server and gets the response via AJAX The functions are asynchronous (the result is returned in a callback function passed as last parameter)

Interface to access WinCC OA functions

Service interface to access DPs This is the interface used to get read-only access to the datapoints Can access remote data points Some convenient functions to group requests (e.g. dpGetStruct) Some fw functions are also exposed getDeviceChildren  fwDevice_getChildren getPeriphAddress  fwPeriphAddress_get

The Javascript client to access DPs Using the generic XML-RPC JS Client, a library (SCADA.js) exposes the methods of the DPAccess interface in javascript SCADA.js xmlrpc.js On top of SCADA.JS, a library para.js is used to create the online version of the para module para.js SCADA.js

Java EJB Implementation It is convenient to have an EJB with the same interface of the XML-RPC service The implementation of the EJB is straightforward using an XML-RPC Proxy (this feature is implemented for example in redstone.xmlrpc library)

Custom Panels The para library allows defining custom “panels” for certain data point types / data point name patterns “Panels” are rendered using EJS (Embedded JavaScript)

Serialization of Asynchronous calls SCADA.js library exposes asynchronous functions It is much easier to write code with synchronous calls Solution: WCCOA object offering the same functions but synchronous The first time the function is called it adds the request to the queue and returns a default value At the end of the execution (of the panel/function) the requests are sent to the service (multicall) The code is executed again and the functions will return the correct value from the response If there are dependencies, the code will be called again until the queue is empty

Example: WCCOA.dpGet returns “” the first time WCCOA.wait returns true if all the prior requests were resolved All the requests that are not dependent are grouped automatically returnVal calls again the function until done and calls the callback at the end