rest api integration in die oracle e-business suite

42
© 2017 APPS ASSOCIATES LLC 1 appsassociates.com Rest API Integration in die Oracle E-Business Suite November 21, 2018

Upload: others

Post on 08-Jan-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

© 2017 APPS ASSOCIATES LLC1 appsassociates.com

Rest API Integration in die Oracle E-Business Suite

November 21, 2018

© 2017 APPS ASSOCIATES LLC2 © 2018 APPS ASSOCIATES LLC2

The content of this document is proprietary, confidential information pertaining to Apps Associates’ products, services, solutions and methods. Information herein is intended for use by the client or prospective client only and must not be shared with any third party without consent from Apps

Associates.

Confidentiality

© 2017 APPS ASSOCIATES LLC3 © 2018 APPS ASSOCIATES LLC3

About Presenters

Hasan Ali Yilmaz

Senior Consultant Oracle E-Business Suite und

Integration Developer

• >10 Jahre Erfahrung in Software-Entwicklung• Rolle: technischer IT Consultant, ERP &

Integration Developer• seit 2009 tätig für Apps Associates• Oracle Certified Expert

© 2017 APPS ASSOCIATES LLC4 © 2018 APPS ASSOCIATES LLC4

Performance. Growth. Excellence.

Global Reach – US, Europe, India• Founded in 2002 in Boston, MA• 900+ Associates

Mature Delivery Model• CMMI Level 3 Appraised & SOC 2 Audited• Certified AWS Managed Services Partner

Long Term Focus on Customers and Associates• 23 customers 5-10 year, 6 customers 10+ year

relationships• 120 associates 5-10 year, 40 associates 10+ year tenures• 4% of revenue invested in Learning & Development

Integrated Delivery Processes • Projects & Managed Services• Flexible Global Delivery Model

Our Strategic Partners

© 2017 APPS ASSOCIATES LLC5 © 2018 APPS ASSOCIATES LLC5

Portfolio of Services

AnalyticsProduct

Development

Custom Dev & Integration

Infrastructure & Cloud Services

ManageAdvise Implement Integrate GovernUpgrade Train Host

Business Applications

© 2017 APPS ASSOCIATES LLC6

Agenda

• Integrated SOA Gateway (ISG)

• Motivation + Business Case bei Carglass®

• Custom Development: MDM Synchronisation REST - Service

– PLSQL Objekte

– Oracle Nested Table

– Package Annotation

– Laden der Serviceobjekte in das Integration-Repository

– XSD + WADL

• Authentifizierung & Autorisierung

• Demo

• Fazit

© 2017 APPS ASSOCIATES LLC7

ISG - Service Enablement und Komponente

© 2017 APPS ASSOCIATES LLC8 © 2018 APPS ASSOCIATES LLC8

ISG - Service Enablement und Komponente

Quelle: https://docs.oracle.com/cd/E18727-01/doc.121/e12169/T511175T513043.htm#5001661 • Logging: SOA Monitor zur Überwachung der Serviceaufrufe

• Native & Custom Service Enablement: Custom Service =>

PLSQL Api als RestService (Annotationen)

• Service Loader: Artefakte (AOL) per FND LOAD in das

Repository laden

• Integration Repository (IREP): Webbasierte

Steuerung/Überwachung der Services (Aus der

Zuständigkeit Integrated SOA Gateway)

• Service Deployer: Mit einem Klick das Interface aus IREP als

Webservice bereitstellen

• Service Provider: Container welche Service Instanzen

beinhaltet und zur Konsumierung bereitstellt.

• Security: HTTP Basis Authentifizierung + SAML +

Autorisierung (EBS User, Zuständigkeit)

© 2017 APPS ASSOCIATES LLC9

Service Invocation Framework

© 2017 APPS ASSOCIATES LLC10 © 2018 APPS ASSOCIATES LLC10

ISG – Service Invocation Framework

Quelle: https://docs.oracle.com/cd/E18727-01/doc.121/e12169/T511175T513090.htm

• Möglichkeit dokumentbasierte (WSDL) Webservices aufzurufen

• Basiert auf Oracle Business Event System

• Kein synchroner (HTTP) Request, sondern Aufrufüber Messaging (AQ)

© 2017 APPS ASSOCIATES LLC11

ISG – Installation Setup

© 2017 APPS ASSOCIATES LLC12 © 2018 APPS ASSOCIATES LLC12

ISG – Installation + Setup

Installing Oracle E-Business Suite Integrated SOA Gateway, Release 12.1.3 (Doc ID 556540.1)

Configuring Oracle E-Business Suite Integrated SOA Gateway Release 12.1.2 and Release 12.1.3 in a Multinode Environment (Doc ID 1081100.1)

Notwendige Patche einspielen

ISG Setup: https://docs.oracle.com/cd/E18727-01/doc.121/e12169/T511175T517162.htm#5064090

© 2017 APPS ASSOCIATES LLC13

Motivation + Business Case bei Carglass®

API First Design

Master Data Management bei Carglass®

© 2017 APPS ASSOCIATES LLC14 © 2018 APPS ASSOCIATES LLC14

EBS Applikations-Integration bei Carglass®

API First

Vermeidung direkter Datenbankzugriffe

Nutzdaten möglichst über SOAP oder REST Services Bereitstellen

ISG

Oracle EBS

Consumers

SOAP REST

JDBC

DB-LINKXX

© 2017 APPS ASSOCIATES LLC15 © 2018 APPS ASSOCIATES LLC15

Master Data Management bei Carglass®

MDM

Oracle EBS

Webportal

CRM & diverse

Business Case:

• Service Center Daten zentral ablegen

(MDM Datenbank)

• Rechnungsadresse

• Standort

• Öffnungszeiten

• etc.

• Streuung der Daten aus MDM in

relevante Systeme

RestService

Bereitstellung eines Rest Services in der EBS zur

Synchronisation der SC Daten von MDM zur EBS

© 2017 APPS ASSOCIATES LLC16

Fragestellungen vor der Umsetzung des Rest Services

© 2017 APPS ASSOCIATES LLC17 © 2018 APPS ASSOCIATES LLC17

Fragestellungen vor der Umsetzung

Simple Data

Types

ComplexData

Types

CLOBs

Synchron

• Wie soll die Nachricht (Payload) aussehen?• Verschachtelung Ja/Nein?• Welche Datentypen Simple/Complex?

• Serviceverarbeitung • Rest / SOAP?• Synchron?• Asynchron?

• Rückgabewerte?

Asynchron Nach Definition der Request und Response Objekte/Datentypen kann die

Objektmodellierung gestartet werden (ObjectTypes in PL/SQL)

REST

SOAP

© 2017 APPS ASSOCIATES LLC18

START mit Custom Rest Service

© 2017 APPS ASSOCIATES LLC19 © 2018 APPS ASSOCIATES LLC19

Rest Service in EBS für MDM Sychronisation

ISGConsumer

(MDM)PLSQL

API

REST(POST)

JSONPayload

Security Check

Service Provider

StagingTabelle

© 2017 APPS ASSOCIATES LLC20 © 2018 APPS ASSOCIATES LLC20

Rest Service in EBS für MDM Sychronisation

Vorbereitungen• Objekt-Typ in PL/SQL erstellen• Nested Table erstellen

DEMOService aufrufen / testen !

Abläufe für Custom Integration

# Vorgang

1 PL/SQL Package mit Annotation erstellen

2 & 3ILDT Datei erstellen und in IREP hochladen

4 & 5 & 6 & 7 Service aus IREP bereitstellen

Quelle: Oracle

© 2017 APPS ASSOCIATES LLC21

Demo: Object Type in PL/SQL erstellen

© 2017 APPS ASSOCIATES LLC22 © 2018 APPS ASSOCIATES LLC22

Demo: Object Type - Ziel Bild

CREATE TYPE CG_DEMOA_SC_OPENING_HOURS_OBJ as object

(DAY_CODE VARCHAR2(100)

,OPEN_FROM VARCHAR2(100)

,OPEN_TO VARCHAR2(100));

CREATE TYPE CG_DEMOA_SC_OBJ as object

(ID VARCHAR2(20)

,NAME VARCHAR2(1000)

,TYPE_CODE VARCHAR2(100)

,PHONE_NUMBER_EXTERNAL VARCHAR2(100)

,BILL_TO_ADDRESS CG_DEMOA_SC_BILL_TO_ADDR_OBJ

,CG_DEMOA_OPENING_HOURS CG_DEMOA_SC_OPENING_HOURS_TBL);

CREATE TYPE CG_DEMOA_SC_BILL_TO_ADDR_OBJ as object

(CITY VARCHAR2(100)

,POSTAL_CODE VARCHAR2(100));

CREATE TYPE CG_DEMOA_SC_OPENING_HOURS_TBL

as table of CG_DEMOA_SC_OPENING_HOURS_OBJ;

CREATE TYPE CG_DEMOA_SC_TBL as table of CG_DEMOA_SC_OBJ;

© 2017 APPS ASSOCIATES LLC23

Nested Table erstellen

© 2017 APPS ASSOCIATES LLC24 © 2018 APPS ASSOCIATES LLC24

Nested Table erstellenCREATE TYPE CG_DEMOA_SC_STG_OBJ as object

(

SC_STG_ID NUMBER

,CREATION_DATE DATE

,CREATED_BY NUMBER

,LAST_UPDATE_DATE DATE

,LAST_UPDATED_BY NUMBER

,TRX_MODE VARCHAR2(100)

,CG_DEMOA_PAYLOAD_SC_OBJECTS CG_DEMOA_SC_TBL

,PROCESSING_STATUS VARCHAR2(100)

,PROCESSING_STATUS_MESSAGE VARCHAR2(4000)

,REQUEST_ID NUMBER

);

CREATE TABLE CG_DEMOA_SC_STG OF CG_DEMOA_SC_STG_OBJ

NESTED TABLE CG_DEMOA_PAYLOAD_SC_OBJECTS

STORE AS CG_DEMOA_SC_STG_PL_NS (

NESTED TABLE CG_DEMOA_OPENING_HOURS

STORE AS CG_DEMOA_SC_STG_OH_NS);

Unabhängig vom Serviceprotokoll (REST/SOAP – JSON/XML) werden die Nutzdaten als PL/SQL Objekte abgelegt.

© 2017 APPS ASSOCIATES LLC25

PL/SQL API mit Annotationen erstellen

© 2017 APPS ASSOCIATES LLC26 © 2018 APPS ASSOCIATES LLC26

PL/SQL API mit Annotationen erstellen

CREATE OR REPLACE PACKAGE CG_DEMOA_MDM_SC_PKG

AS

/* $Header: CG_DEMOA_MDM_SC_PKG.pls $ */

/*#

* CG_DEMOA MDM SC Synchronisation

*

* @rep:scope public

* @rep:product fnd

* @rep:lifecycle active

* @rep:displayname Custom CG_DEMOA MDM SC Synchronization Service

* @rep:category BUSINESS_ENTITY CG_DEMOA_MDM

*/

PROCEDURE proceed_sc_synch (p_trx_mode VARCHAR2,

p_sc_objects IN CG_DEMOA_SC_TBL,

x_ret_status OUT VARCHAR2,

x_ret_msg OUT VARCHAR2)

/*#

* Synchronize MDM Service Center Object CG_DEMOA

* @param p_trx_mode VARCHAR2

* @param p_sc_objects CG_DEMOA_SC_TBL

* @param x_ret_status VARCHAR2

* @param x_ret_msg VARCHAR2

* @rep:scope public

* @rep:lifecycle active

* @rep:displayname MDM CG_DEMOA SC Synchronisation Service

* @rep:category BUSINESS_ENTITY CG_DEMOA_MDM

*/

;

END CG_DEMOA_MDM_SC_PKG;

Class Level Annotation

Method Level Annotation

@rep:

Annotation ist nur im Package Spec. erforderlich!

@param:

Package Spec. als Textdatei mit der Endung .plsabspeichern

Eintrag in Lookup Type: BUSINESS_ENTITY

© 2017 APPS ASSOCIATES LLC27

Parsen + Generieren + Hochladen der iLDT Datei

© 2017 APPS ASSOCIATES LLC28 © 2018 APPS ASSOCIATES LLC28

Parsen + Generieren der iLDT Datei

• Annotierte pls Datei auf den Applikation Server ablegen

• Mit dem IREP Parser das Parsen anstoßen und die iLDT Datei erstellen lassen

=> iLDT: Integration Repository loader file

$IAS_ORACLE_HOME/perl/bin/perl $FND_TOP/bin/irep_parser.pl -g -v -username=SYSADMIN

CUSTOM:patch/115/sql:CG_DEMOA_MDM_SC_PKG.pls:12.0=CG_DEMOA_MDM_SC_PKG.pls

© 2017 APPS ASSOCIATES LLC29 © 2018 APPS ASSOCIATES LLC29

Hochladen der iLDT Datei in iREP

FNDLOAD apps/{DB_USER_PASSWORD} 0 Y UPLOAD

$FND_TOP/patch/115/import/wfirep.lct CG_DEMOA_MDM_SC_PKG_pls.ildt

© 2017 APPS ASSOCIATES LLC30

iREP Webinterface

© 2017 APPS ASSOCIATES LLC31 © 2018 APPS ASSOCIATES LLC31

iREP Webinterface

Zuständigkeit > Integrated SOA Gateway

© 2017 APPS ASSOCIATES LLC32 © 2018 APPS ASSOCIATES LLC32

iREP Webinteface

© 2017 APPS ASSOCIATES LLC33 © 2018 APPS ASSOCIATES LLC33

iREP Webinteface

© 2017 APPS ASSOCIATES LLC34 © 2018 APPS ASSOCIATES LLC34

iREP Webinteface

Service-Alias:proceed_sc_synch_demoa

© 2017 APPS ASSOCIATES LLC35 © 2018 APPS ASSOCIATES LLC35

iREP Webinteface

© 2017 APPS ASSOCIATES LLC36 © 2018 APPS ASSOCIATES LLC36

iREP Webinteface

© 2017 APPS ASSOCIATES LLC37 © 2018 APPS ASSOCIATES LLC37

iREP Webinteface

© 2017 APPS ASSOCIATES LLC38 © 2018 APPS ASSOCIATES LLC38

iREP Webinteface

© 2017 APPS ASSOCIATES LLC39

Demo

© 2017 APPS ASSOCIATES LLC40

Fazit

© 2017 APPS ASSOCIATES LLC41 © 2018 APPS ASSOCIATES LLC41

Fazit

• ISG deckt den erforderlichen Umfang ab, um Restservices für Konsumenten bereitzustellen

(Komplexe Datentypen, Authentifizierung, Autorisierung)

Service Invocation Framework ist WSDL getrieben (SOAP Service)

Alternativ HTTP Request über utl_http Package oder Request aus Java heraus

ISG ist in erster Linie für die Applikationsintegration konzipiert. Bei sehr großen JSON Payloads funktioniert die

Integration nicht wunschgemäß.

Integrationsplattformen, die den EBS Adapter nutzen, finden die „Custom Services“ ebenso im Servicekatalog

(iREP) wieder.

Vorschaltung eines Reverse-Proxys bei externer Bereitstellung der Rest Services wäre Empfehlenswert

JSON Parsing ist nicht notwendig, wenn PLSQL Objekte als Komplexe Parameter genutzt werden.

Restservice Payloads werden in R12.1.3 nicht geloggt (nur SOAP)