39
Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation

Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

  • Upload
    others

  • View
    16

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

Consuming Web Services using CA Plex

12A

Juan Rios

Rollins Corporation

Page 2: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

Web Service strategy

Page 3: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI Pattern

> Supports interfacing with the Web

> Provides the classes to call Web services (REST)

> Supports displaying web content in client functions

> Supports tracing and logging errors and information

Page 4: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI Pattern Structure

> Components Abstract

Data

Messages

Scripts

Services

UI

Page 5: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI.Data Structure

> Contains the entities that handle the information about the web services and pages:

> WebPage

> WebServer

> WebService

> WebService.Log

> WebService.ReturnedStatus

> WebService.Scope

> WebService.System

Page 6: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI.Samples Structure

> Contains the sample code for easier understanding of the pattern

Page 7: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI.Data Structure

> WebService is known by WebServiceId

> WebService Refers to WebPage for WebPageId

> WebService Refers to WebServer for WebServerId

Page 8: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI.Data.Webservice Structure

> WebService Refers to WebService.System

> WebService Refers to WebService.Scope

> WebService.Log Owned by WebService.System

> WebService.Log Refers to WebService

> WebService.Log Refers to WebService.Scope

> WebService.ReturnedStatus Owned by WebServerId

Page 9: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI.Abstract Structure

> This area is where all the abstract classes reside

> These classes contain the actual functionality for which the pattern is designed

Page 10: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

Web S

ervices ClassesW

eb C

onte

nt C

lass

es

ROLLINS FOUNDATION CLASSES

rWebAPI FOUNDATION CLASSES

rWebAPI IMPLEMENTABLE CLASSES

rWebAPI IMPLEMENTED CLASSES

rWebAPI SCRIPTS

rWebAPI.Abstract Class

Page 11: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI.Abstract Class Structure

Page 12: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI.Abstract Class Structure

Page 13: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

Web

Con

tent

Cla

sses

Web S

ervices Classes

rWebAPI.Abstract Class Structure

ROLLINS FOUNDATION CLASSES

rWebAPI FOUNDATION CLASSES

rWebAPI IMPLEMENTABLE CLASSES

rWebAPI IMPLEMENTED CLASSES

rWebAPI SCRIPTS

Page 14: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

ROLLINS Foundation Classes

> Rollins’ specialization of the Plex Classes

RUIBasicShell

RFrameChild

RFunctionShell

> They do not belong to the rWebAPI pattern

Page 15: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI Foundation Classes

> Classes that provide the foundation for rWebAPI patterns for web services and web content display: Browser

WebWrapper

Page 16: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

Browser Class

> Provide foundation for web content support

> Displays a Web Browser withbasic functionaliy:

Load

Refresh

Stop

Close

Page 17: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

WebWrapper Class

> Provides foundation structure to call web services

> Defines the input parameters for web services

> Obtains Web service information

> Builds complete URL

Page 18: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI Implementable Classes

> WindowBrowser

> FrameBrowser

> FrameBrowser.FramWebPage

> WebPageFrame

> WebPageStandard

> WebPageCustom

> Classes that provide the necessary functionality to display web content and call web services. These are the classes that the developers will inherit from

> WebPageCustom.BrowserWindow

> WebService

> WinCWebService

> RPGWebService

> WebInvoke

Page 19: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

WindowBrowser Class

> Adds WebPageURL field as Input parameter to support calls from other functions

> Uses provided subroutine to load web content.

> Do not inherit from this object directly since there are other classes that provide more specialized behavior

Page 20: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

WebPageFrame Class

> Adds WebPageURL as an output parameter

> Returns WebPageURL after URL has been constructed

> Do not inherit from this object directly since there are other classes that provide more specialized behavior

Page 21: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

WebPageStandard Class

> Adds Call to Implemented Class DisplayWindowBrowser

> Inherit from this function when web page to display will not be combined with other controls (i.e. grids, fields, etc)

Page 22: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

RWebAPI.Samples.WebContent.WCStandard

Page 23: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

WebPageCustom Class

> Supports web content display along side other controls

> Inherit from this class when customization is needed in the panel where web content is displayed in a separate window

Page 24: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

RWebAPI.Samples.WebContent.WebCCustom.WCCustom

Page 25: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

.BrowserWindow Class

> Class scoped by WebPageCustom Class

> Display the web content in a customizable panel by the implementer

> Will be inherited implicitly when scoping class is inherited

Page 26: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

RWebAPI.Samples.WebContent.WebCCustom.WCCustom.BrowserWindow

Page 27: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

FrameBrowser Class

> Supports web content displayed along side other controls within a frame panel

> This Class will call FrameWebPage to construct URL before loading web content

> Inherit from this class when customization is needed in the panel where web content is displayed in a separate window.

Page 28: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

.FrameWebPage Class

> Class scoped by FrameBrowser Class

> Adds WebPageURL as an output parameter

> Returns WebPageURL after URL has been constructed

Page 29: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

WebService Class

> Foundation class for Web Services wrapping

> Adds Dual Field WSRowsFetched in the Control input variable for determining how many records have been populated in the FetchedData variable

> Adds returning message and status as output as well as defines FetchedData

> Adds parsing of resulting data into the FetchedData variable

> Calls WebInvoke for actual calling of web service

> Do not inherit from this class since there are specialized subclasses bases upon implementation language

Page 30: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

WebInvoke Class

> Foundation class for Web Services invocation

> Calls source code/api to do actual call to the web service

> Returns raw resulting data back to calling class

> Do not inherit from this class since there are specialized subclasses bases upon implementation language

Page 31: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

WinCWebService RPGWebService

> Implementable class for Web Services wrapping

> Implementation language added

> Replaces Calls to WebInvoke for actual implementable subclasses for calling of web service

> Inherit from this class when implementing web services.

> To implement this class:

> Add fields to the Input variable for the input parameters for the web service

> Add the output fields to the FetchedData variable. These fields are the output of the web service. They should be in the same order as in the WS Signature

> Change occurrences for FetchedData variable if MOV

> Add line to determine WebServiceId to call in the AD

> Change Implement SYS triplet to YES

Page 32: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

RWebAPI.Samples.WebService.SOV.WinC.AddressVerificationWS

Page 33: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI Implemented Classes

> Objects that are implemented

> They perform the actual work of the rWebAPI pattern

Page 34: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

DisplayWindowBrowser

> This function display the web content in a dialog window

> This function is called by other functions when displaying web content is the only functionality needed in the panel

> This function is implemented; therefore, the only work the developer needs to do is to call it using the implementable classes provided in the pattern

Page 35: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

WinCWebServiceInvokeRPGWebServiceInvoke

> These functions invoke the webservice

> These functions are called by other functions when calling web services

> These functions are implemented; therefore, the only work the developer needs to do is to call them using the implementable classes provided in the pattern

Page 36: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

rWebAPI Scripts

> Low level objects that are used by the pattern to call web services

> Do not inherit from these objects

Page 37: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

Logging

Page 38: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

Error Handling

Web Service Interface(RWebAPI.Abstract.WebService)

HTTP CALL

Web Service Provider

5

4

3

FUNCTION CALL

Web Service Consumer(RWebAPI.Abstract.WebServiceConsumer)

1

2

Step Description Error Variable on (1)

Field on (1)

2 Function Call Failure to find Function

Environment <*Call Status>

3 Web Service Interface

Failure to find Web Service information

Environment

<*Returned Status>

Failure to Invoke Web Service

Environment

<*Returned Status>

Failure to insert Logging information

Environment

<*Returned Status>

4 HTTP Call HTTP Related Failures

WebServiceL WSHTTPReturnedStatus WebServiceL WSHTTPStatusType

5 Web Service Provider

Web Service Related Failures

WebServiceL WSReturnedStatus WebServiceL WSStatusType WebServiceL WSReturnedMessage

Page 39: Demo: Consuming Web Services from Plexplex2e.com/downloads/12A - Consuming web services using...Consuming Web Services using CA Plex 12A Juan Rios Rollins Corporation Web Service strategy

Demo and Q&A