Developing a RESTful Web application for Liberty in CICS - - PowerPoint PPT Presentation

developing a restful web application for liberty in cics
SMART_READER_LITE
LIVE PREVIEW

Developing a RESTful Web application for Liberty in CICS - - PowerPoint PPT Presentation

Developing a RESTful Web application for Liberty in CICS Introduction Course introduction What youll see in this course Eclipse development environment RESTful web application CICS region Liberty JVM server HTTP Call JCICS RESTful


slide-1
SLIDE 1

Developing a RESTful Web application for Liberty in CICS

slide-2
SLIDE 2

Introduction

Course introduction

slide-3
SLIDE 3

Eclipse development environment CICS region Liberty JVM server HTTP Call RESTful web application JCICS COBOL program RESTful web application RESTful client

What you’ll see in this course

slide-4
SLIDE 4

Development workstation Ability to install IBM Explorer for z/OS Access to sample code CICS TS for z/OS V5.1 or later

What you’ll need for this course

slide-5
SLIDE 5

What you’ll learn by the end of this course

Developing a RESTful Java web service Using the CICS Java API Deployment of web applications 1. 2. 3.

slide-6
SLIDE 6

Creating the development environment

Installing IBM Explorer for z/OS

slide-7
SLIDE 7

developer .ibm.com/mainframe/products/downloads

Downloading Eclipse

slide-8
SLIDE 8

Launching IBM Installation Manager

slide-9
SLIDE 9

Installing packages

slide-10
SLIDE 10

Creating the development environment

Configuring CICS Explorer

slide-11
SLIDE 11

Configure connectivity to CICS Configure FTP connection

Configuring connectivity

slide-12
SLIDE 12

Enabling FTP connection

slide-13
SLIDE 13

Connecting to a CICS region

Create a CMCI connection to CICS On your CICS system

  • 1. Add load libraries SEYUAUTH and SEYULOAD to the CICS JCL
  • 2. Create a URIMAP
  • 3. Create a TCPIPSERVICE
  • 4. Or setup CICSPlex SM WUI server

See Knowledge Center topic Setting up access for CICS Explorer

slide-14
SLIDE 14

Installed CICS Explorer Created FTP and CMCI connections Next section - Using CICS Explorer to manage a Liberty JVM

Summary

slide-15
SLIDE 15

Configuring a CICS Liberty JVM server

Introduction to the Liberty JVM server

slide-16
SLIDE 16

Introduction to the Liberty JVM server

WebSphere Liberty Java EE application server Tightly integrated with CICS Liberty JVM server Basic steps of how to configure

slide-17
SLIDE 17

CICS Region Liberty JVM server

Liberty and CICS: A 10,000 feet view

Liberty Server JVM server resource .jvmprofile server.xml JVM

slide-18
SLIDE 18

Configuring a CICS Liberty JVM server

Configuring a Liberty JVM server

slide-19
SLIDE 19

CICS region started SDFJAUTH in STEPLIB LE support added

Configuring Java in CICS

slide-20
SLIDE 20

USSHOME=/usr/lpp/cicsts/cics700

System initialization parameters

slide-21
SLIDE 21

JVMPROFILEDIR=/u/cics1

JVM profile directory

slide-22
SLIDE 22

/usr /lpp /cicsts /cics700 /docs /IBM /JVMProfiles /DFHJVMAX.jvmprofile /DFHJVMST.jvmprofile /DFHOSGI.jvmprofile /DFHWLP.jvmprofile

USSHOME Sample Liberty JVM profile

JVM sample profile

slide-23
SLIDE 23

${USSHOME}/JVMProfiles /usr/lpp/cicsts/cics700/JVMProfiles DFHWLP.jvmprofile DFHWLP.jvmprofile ${JVMPROFILEDIR} /u/cics1

Copying the sample profile

slide-24
SLIDE 24

Reviewing and updating the JVM profile

slide-25
SLIDE 25

Reviewing and updating the JVM profile

slide-26
SLIDE 26

Enabling auto configure

slide-27
SLIDE 27

Setting the TCP/IP host values

slide-28
SLIDE 28

Selecting the JVM server resource definition

slide-29
SLIDE 29

Created JVM profile using supplied template DFHWLP.jvmprofile Created CICS JVMSERVER resource definition Next lecture - Install and enable the JVM server

Summary

slide-30
SLIDE 30

Configuring a CICS Liberty JVM server

Starting and validating the Liberty JVM server

slide-31
SLIDE 31

Starting the Liberty JVM server

slide-32
SLIDE 32

Verifying the Liberty JVM server is running

slide-33
SLIDE 33

Accessing the Liberty server default welcome page

slide-34
SLIDE 34

Viewing the Liberty message log

slide-35
SLIDE 35

Verifying the logs

slide-36
SLIDE 36

Verifying the logs

slide-37
SLIDE 37

Editing the server.xml file

slide-38
SLIDE 38

Adding the JAX-RS feature

slide-39
SLIDE 39

Enabling dropins

slide-40
SLIDE 40

Editing the server.xml file

slide-41
SLIDE 41

Verifying the changes

slide-42
SLIDE 42

Creating a RESTful service for Liberty in CICS

Introduction to our RESTful web application

slide-43
SLIDE 43

RESTful web applications

REST JAX-RS Java EE 6 JSON

slide-44
SLIDE 44

CICS Region

Sample application architecture

RESTful Client Liberty JVM Server JAX-RS Runtime Web Application JAX-RS HTTP GET request {json} method invoke method return Response Data

slide-45
SLIDE 45

Creating a RESTful service for Liberty in CICS

Developing the application

slide-46
SLIDE 46

github.com/cicsdev/cics-java-liberty-restapp

Sample application

slide-47
SLIDE 47

New project dialog

slide-48
SLIDE 48

New dynamic web project wizard

slide-49
SLIDE 49

New dynamic web project wizard

slide-50
SLIDE 50

CICS region

Sample application architecture

RESTful client Liberty JVM server JAX-RS runtime Web application JAX-RS HTTP GET request {json} method invoke method return Response data

slide-51
SLIDE 51

Java bean classes

CICSInformation APPLID JVM server Current time CICS environment CICSEnvironment Product name Product version

slide-52
SLIDE 52

getCICSInformation method

slide-53
SLIDE 53

Importing the code

slide-54
SLIDE 54

Importing the code

slide-55
SLIDE 55

Verifying packages

slide-56
SLIDE 56

Configuring the build path

slide-57
SLIDE 57

Adding libraries to the build path

slide-58
SLIDE 58

Selecting libraries to add

slide-59
SLIDE 59

Selecting the target CICS version for deployment

slide-60
SLIDE 60

JAXB annotations

slide-61
SLIDE 61

CICS Region

Sample application architecture

RESTful Client Liberty JVM Server JAX-RS Runtime Web Application JAX-RS HTTP GET request {json} method invoke method return Response Data

slide-62
SLIDE 62

JAX-RS annotations

slide-63
SLIDE 63

JAX-RS annotations

slide-64
SLIDE 64

getCICSInformation method

slide-65
SLIDE 65

CICSInformation class

slide-66
SLIDE 66

Completed coding of our application Ready to deploy into our Liberty JVM server We will extend our application in the next lecture

Summary

slide-67
SLIDE 67

Creating a RESTful service for Liberty in CICS

Deploying the application to the dropins directory

slide-68
SLIDE 68

Deploying via the dropins directory

slide-69
SLIDE 69

Exporting a WAR file

slide-70
SLIDE 70

Copying WAR file to z/OS

slide-71
SLIDE 71

Messages.log file

slide-72
SLIDE 72

Messages.log file

slide-73
SLIDE 73

Testing the application

http://winmvs2c.hursley.ibm.com:9080/com.ibm.cicsdev.restapp/

slide-74
SLIDE 74

The URL

http://winmvs2c.hursley.ibm.com:9080/com.ibm.cicsdev .restapp/rest/cicsinfo

slide-75
SLIDE 75

CICS Region

Sample application architecture

RESTful Client Liberty JVM Server JAX-RS Runtime Web Application JAX-RS HTTP GET request {json} method invoke method return Response Data

slide-76
SLIDE 76

JSON response

slide-77
SLIDE 77

Coded Deployed Tested

Summary

slide-78
SLIDE 78

Creating a RESTful service for Liberty in CICS

Deploying the application in a CICS bundle

slide-79
SLIDE 79

RESTful web application with dropins Useful for rapid application development Deploy the WAR file using a CICS bundle First delete any existing restapp WAR files from dropins

Deploying the application in a CICS bundle

slide-80
SLIDE 80

Web Archive (WAR) Enterprise Archive (EAR) Enterprise Bundle Archive (EBA) resource_1 resource_2 resource_3 resource_4 resource_5 cics.xml

What is a CICS bundle?

slide-81
SLIDE 81

CICS bundle project

slide-82
SLIDE 82

CICS bundle project

slide-83
SLIDE 83

CICS bundle project

slide-84
SLIDE 84

Adding a web project to a CICS bundle

slide-85
SLIDE 85

Adding a web project to a CICS bundle

slide-86
SLIDE 86

Adding a web project to a CICS bundle

slide-87
SLIDE 87

Exporting a CICS bundle project

slide-88
SLIDE 88

Exporting a CICS bundle project

slide-89
SLIDE 89

Exporting a CICS bundle project

slide-90
SLIDE 90

Exporting a CICS bundle project

slide-91
SLIDE 91

Creating a CICS bundle definition

slide-92
SLIDE 92

Creating a CICS bundle definition

slide-93
SLIDE 93

Creating a CICS bundle definition

slide-94
SLIDE 94

Installing a CICS bundle definition

slide-95
SLIDE 95

Installing a CICS bundle definition

slide-96
SLIDE 96

Installing a CICS bundle definition

slide-97
SLIDE 97

Installing a CICS bundle definition

slide-98
SLIDE 98

Liberty messages.log file

slide-99
SLIDE 99

Testing the application

slide-100
SLIDE 100

Summary

Created sample application Deployed into CICS Dropins directory CICS bundles

slide-101
SLIDE 101

Linking to a CICS COBOL program

Introduction to linking to a CICS program

slide-102
SLIDE 102

Introduction to linking to a CICS program

CICS concepts JCICS Calling an existing COBOL program EDUCHAN sample

github.com/cicsdev/cics-java-liberty-restapp

slide-103
SLIDE 103

CICS TASK0001 (Transaction: TRAN) PROGRAM PROGRAM

What is a task?

slide-104
SLIDE 104

Linking to a CICS COBOL program

Using JCICS to link to a CICS program

slide-105
SLIDE 105

CICS region

Application diagram

Liberty JVM server Web application JAX-RS JCICS HTTP request {json} method invoke method return Response data JAX-RS runtime COBOL program RESTful client Return LINK data

slide-106
SLIDE 106

Reviewing and updating the sample application

slide-107
SLIDE 107

Reviewing and updating the sample application

slide-108
SLIDE 108

Reviewing and updating the sample application

slide-109
SLIDE 109

Reviewing and updating the sample application

slide-110
SLIDE 110

Reviewing and updating the sample application

slide-111
SLIDE 111

Deploying the application

slide-112
SLIDE 112

Testing the reverse application

slide-113
SLIDE 113

Test the application

slide-114
SLIDE 114

Expose an existing COBOL program as a RESTful web application

Using JCICS to link to a CICS program

slide-115
SLIDE 115

JCICS API to access CICS tasks and programs Passing data using channels and containers Next section - Summary and highlights

Summary

slide-116
SLIDE 116

Summary

Review of what we have learned

slide-117
SLIDE 117

What we learned in this course

Creation of a development environment Configuration of a Liberty JVM server Development using JAX-RS Use of the JCICS API Application deployment 1. 2. 3. 4. 5.

slide-118
SLIDE 118

Download and install the sample applications

Install sample RESTful web application Install EDUCHAN COBOL program