slide 1 - gateway/400 group - st. louis, mo

82
8 CopyrightIBM Corporation, 2008. A llRightsReserved. Thispublication m ay referto productsthatare notcurrently available in yourcountry. IBM m akesno com m itm entto m ake available any productsreferred to herein. IBM Power Systems Agenda Key: Session Number: Web Services and SOA for the RPG Developer on IBM i IBM Integrated Web services for i Dan Hiebert IBM [email protected]

Upload: zubin67

Post on 25-Jun-2015

421 views

Category:

Documents


9 download

TRANSCRIPT

Page 1: Slide 1 - Gateway/400 Group - St. Louis, MO

8 Copyright IBM Corporation, 2008. All Rights Reserved.

This publication may refer to products that are not currently available in your country. IBM makes no commitment to make available any products referred to herein.

IBM Power Systems™

Agenda Key:Session Number:

Web Services and SOA for the RPG Developer on IBM i IBM Integrated Web services for i

Dan Hiebert IBM [email protected]

Page 2: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Agenda

• Introduction to SOA & Web Services

• Creating RPG Web Service Business Logic.

• Deploying/Testing RPG Web Services.

• Consumption of Web Services.

• Presentation Layer of Web Services.

Page 3: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Introduction SOA & Web Serviceson IBM i

Introduction to SOA & Web Services

• IBM i Project for Web services

• Introduction Web Services and SOA technology's

Page 4: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Services Made Easy An IBM i Project

Page 5: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Services Made Easy – An IBM i Project

• IBM Integrated Web Services for i– “An Easy Step to starting with SOA on System i”

• Simplify the process of externalizing RPG/COBOL business logic as a service.• Externalize various RPG/COBOL business tasks as services. • Abstracts the hidden complexities of Web services for IBM i.• Provide RPG/COBOL Developer easy to use Web interface, not requiring

additional tools or skills

http://www.ibm.com/systems/i/software/iws/

Page 6: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

IBM Integrated Web services server for i

• Merged the Development Process and Deployment Server• 2 Steps to Create a Web services server on IBM i• 7 Steps to Deploy an RPG/COBOL Service• Built on IBM Integrated Web Application Server for I

– Note: 2 Methods returned for every procedure or program• XML - Automated Data (Including Data Structures)• Standard Serialized objects.

• Embedded Axis 2 Engine into IBM i (5722SS1)

Page 7: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Introduction to Web services and SOA

Page 8: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

What is …..?

… a service?

A repeatable business task – e.g.,

check customer credit; open new

account

… service oriented architecture (SOA)?

An IT architectural style that supports

integrating your business as linked

services

"SOA impacts every aspect of IT and business.”

Page 9: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

(from the Wikipedia.com)

“A 'Web service' (also Web Service) is defined by the W3C as "a software system designed to support interoperable machine-to-machine interaction over a network"[1]. Web services are frequently just Web APIs that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services.”

Web Service Definition

Page 10: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

What Are They?

• Web services– Applications that are invoked over the Web

– An implementation of Service Oriented Architecture (SOA)

– Contain only business logic, do not have a user interface

– Self-contained

– Self-describing

Page 11: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Requirements Addressed By Web Services

• Interoperability – need a common communication protocol– Between systems– Between languages

• Interface Description Language– Describe the service’s interface– Clear and unambiguous– Platform independent

• Retrieval of Service– Search and retrieve available services– Conventient integration at design time and runtime

• Security– Protection of services– Protection of data sent to/from services

Page 12: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Types of Web Services

• Business Information: access to a database or rapidly changing contents– Stock quotes

– Currency conversion rates

– Address book

– Geographical data

• Business Integration: implementing a function or outsourcing a business process– Reservations system

– Credit check

– Payment system

– Loan service

– Product catalog

Page 13: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Services Overview

Definition: Self-Contained with well-defined interfaces that provide functionality that is accessible over the Internet/Intranet

Key Technologies: XML, WSDL, SOAP, UDDI

Page 14: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Broker

Provider

find

2

bind/invoke

3

publish

1

Requestor

Web Service Participants

• Provider: implements a Web service• Requestor: has a business need• Broker: lists all available services

Page 15: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Services Technology Stack

Discovery UDDI, WSILDiscovery UDDI, WSIL

Description WSDLDescription WSDL

XML Messaging SOAPXML Messaging SOAP

Transport HTTP, JMS, FTP, SMTPTransport HTTP, JMS, FTP, SMTP

Page 16: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

What is …..?

… a service?

A repeatable business task – e.g.,

check customer credit; open new

account

… service oriented architecture (SOA)?

An IT architectural style that supports

integrating your business as linked

services

"SOA impacts every aspect of IT and business.”

Page 17: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

SOA Is Like Musical Notes…

Each musical notes represents a business

service

SOA allows for flexible composition

of music

Checking Credit Opening

Account

Tracking Shipment

Checking Inventory

Placing an Order

Page 18: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web services are a good start…

Business applications and their interfaces become reusable

Decouples the interfaces from the business applications

The number and complexity of the interfaces is reduced

Rich business abstractions describe the application interface

Turn this … …into this (web services).

= Interface

Service

= Application

Service Service Service

Service Service Service

= Interface = Service

Page 19: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Resources

• Integrated Web Services for IBM i – http://www.ibm.com/systems/i/software/iws/

• IBM Technical Information and Example– http://www.ibm.com/developerworks/

• WebSphere Enterprise Service Bus – http://www-306.ibm.com/software/integration/wsesb/

• WebSphere Process Server– http://www-306.ibm.com/software/integration/wps/

Page 20: Slide 1 - Gateway/400 Group - St. Louis, MO

8 Copyright IBM Corporation, 2008. All Rights Reserved.

This publication may refer to products that are not currently available in your country. IBM makes no commitment to make available any products referred to herein.

IBM Power Systems™

Agenda Key:Session Number:

Creating RPG Web Service Business Logic

Dan Hiebert IBM [email protected]

Web Services and SOA for the RPG Developer on IBM i

Page 21: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Agenda

• Introduction to SOA & Web Services• Creating RPG Web Service Business Logic.

– Lab Time

• Consumption of Web Services.– Lab Time

• Deploying/Testing RPG Web Services.– Lab Time

• Presentation Layer of Web Services.– Lab Time

Page 22: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Creating RPG Web Service Business Logic

• ILE RPG Best Programming Practices

• RPG Style Web Service– Encapsulated– Reusable– Stateless– Event driven– Loosely coupled

• RPG Traditional vs Modular - Example

Page 23: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

RPG Developer – Misconceptions

• The RPG language is outdated and does not work with the Web Services paradigm.

• I need to modernize my “Monolithic” application.

• I have to re-write my entire application to code for RPG Web Services.

Page 24: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

RPG Best Practices – Quick Reference

• Use Free Form• Utilize ILE Techniques

– Procedures

– Binding Directories

– Service Programs

– Exports – Hints & Tips

• Centralize Declarations• Expand Naming Conventions• Write Indicatorless Code• Use Structured Programming Techniques• Use Comments• Avoid Obsolescence

Page 25: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

What is a Service?

• Function– Get information– Perform action

• Properties– Encapsulated– Reusable– Stateless– Event driven– Loosely coupled

• Modular

Page 26: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Implementing Encapsulation

Procedure

• Typed parameters– Input only

• Value

• Const

– Both input and output– Return value

• Local variables– Only accessible in procedure– No side effects

Subroutine

• Global variables– All can be modified

• Global variables– Accessible outside procedure– Side effects

Page 27: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Reusability

• Design from business perspective– What is the business function provided

– Not based on implementation

• Design for future enhancements– Based on what business function should do

– Not based on current limits

• Input checking– Do not trust interface user

– Provide meaningful error messages

Page 28: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Stateless

• State is kept by service user– Data necessary for request is provided

– Response must contain appropriate data for follow-on requests

• Service may be called by many different users– Ensure no data carryover

• Pragmatism– If service will be heavily used with persistent connection:

• Caching of state my improve performance• Request data overrules use of cached data

• Caution: On RPG Record access to DB – Do not necessarily expect maintained, especially with “1 to M” users.

Page 29: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Event Driven

• Service does not assume any particular order– Requests drive service

– Allows new uses for service

– Problems if data is locked between requests

• Service processes request– Validity checks

– Perform operations

– Sends response

– Frees resources

Page 30: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Loosely Coupled

• Positive– Increased flexibility

– More responsive to business changes

– More responsive to technology changes

– Code maintenance

• Negative– More computationally expensive

– Higher latency

– More parts

Page 31: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Properties Comparison Review – Service

Service• Encapsulated

– Access through interface

• Reusable– Write once – use everywhere

• Stateless– Information not retained

• Event driven– No required order

• Loosely coupled– Callable from anywhere

Traditional• Global data

– Access directly

• Reuse by copy– Maintain everywhere

• Stateful– Information retained in job

• Application driven– Fixed order

• Tightly coupled– Tied to application

Page 32: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

RPG – Traditional vs. Modular Example

A Simple Rewrite example for RPG Procedures

Page 33: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Traditional RPG Program.

Page 34: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

RPG Modular

Business Logic

Page 35: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Page 36: Slide 1 - Gateway/400 Group - St. Louis, MO

8 Copyright IBM Corporation, 2008. All Rights Reserved.

This publication may refer to products that are not currently available in your country. IBM makes no commitment to make available any products referred to herein.

IBM Power Systems™

Agenda Key:Session Number:

Web Services and SOA for the RPG Developer on IBM i

Dan Hiebert IBM [email protected]

Deploy RPG Web Service Business Logic

Page 37: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Agenda

• Introduction to SOA & Web Services• Creating RPG Web Service Business Logic.

– Lab Time

• Deploying/Testing RPG Web Services.– Lab Time

• Consumption of Web Services.– Lab Time

• Presentation Layer of Web Services.– Lab Time

Page 38: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Deploy RPG Web ServiceBusiness Logic

• Introducing – IBM Web Services Server on i

• Recent Enhancements

• Embedding WS information in Program/Service Program

• Demo – WS-Server (that easy)

• Deep Dive & Scripts

Page 39: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Introducing - IBM Integrated Web Services Server on i

Key Features of IBM I Web Services server

• Integrated into IBM i

• WS-Basic Profile – Compliant

• Developed for RPG/COBOL

• Open Source Technology

• Removes Complexities of Web Services for IBM i Developer

• Easy to Use - Web Admin Interface

• IBM i Web Services Test Client

• Externalizes IBM i Program Objects

• Tracing – WS-Message & Program Objects

• Scripting Support

Page 40: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

NEW Improvements for YOU! – October/08

Page 41: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Embedding Web services information with RPG on IBM i

Page 42: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

RPG Find Customer

Example: RPG Find Customer

Page 43: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

V5R4 - Enablement

Page 44: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Binding RPG Business Logic to Program/Service Program• Service Info embedded with RPG or COBOL program objects (PCML)

– For V6R1 need to recompile specifying:CRTRPGMOD PGMINFO(*PCML *MODULE) CRTCBLMOD PGMINFO(*PCML *MODULE)

– For V5R4 – recompile specifying following option in the source:• For RPG

H PGMINFO(*PCML:*MODULE)

• For COBOLPROCESS OPTIONS PGMINFO(PCML MODULE)

• Service Information can alternatively be generated in IFS

• Restrictions:– Program objects must be ‘Stateless’

– Further Information - http://www.ibm.com/systems/i/software/iws/

Page 45: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Externalizing Web services with RPG on IBM i (Demo) - Simplification and Ease of Use

Page 46: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Admin: Install Web Service

Access Web Admin http://hostname:2001/HTTPAdmin

Click on the Create New Web Services Server link

Page 47: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

IWS – Deep Dive

Page 48: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Deep Dive - IBM i integrated Web services server

• IBM i integrated Web services server– Based on Apache AXIS2 version 1.3 - runtime– A set of native service programs and java tools that enable you to build Web

service applications from existing ILE RPG/COOBL Programs dynamically generating WSDL and Java Artifacts.

– Supported on V5R4, V6R1

• IBM i integrated Web services server has the following capabilities: – Support for Web Services Description Language (WSDL 1.1, supports WSDL

1.2 but right now we are not advertising the fact ) - document literal only – SOAP 1.1 (Enabled) SOAP 1.2 (Disabled) REST (Disabled) - – Supports Web Services Invocation (WSI) 1.0 basic profile compliance – Support for Secure Sockets Layer (SSL) – Java API for XML-based remote procedure call (JAX-RPC) style

implementation – Support IBM i non-Java languages; RPG, COBOL, [C,C++]

Page 49: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

IBM i Web Services Script Support

IBM Integrated Web Services Server – Scripts

• GUI avoidance – • QSHELL environment• Automate create/deploy• Deployable applications (ISV’s)• Example:

– Create 20 servers – use scripts

– Automate RPG/COBOL deployments

• Create/Delete Servers

Page 50: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Server Packaging• IBM i integrated Web services server - Server Image

– /QIBM/ProdData/OS/WebServices/V1/server• Scripts reside in the ../bin directory

– installWebService.sh– listWebServices.sh– startWebServices.sh– stopWebServices.sh– uninstallWebServices.sh– createWebServicesServer.sh – deleteWebServicesServer.sh – startWebServicesServer.sh – stopWebServicesServer.sh

– Axis2 1.3 – Engine Runtime• /QIBM/ProdData/OS/OSGi/LWI71/runtime/webservicesmax/eclipse/plugins/org.apache.axis2

• User Web services server– /www/wservice[*] unless user used script

• 4 Jobs Run in QHTTPSVR subsystem– 1 HTTP and 3 Web Service jobs

WS Server

Page 51: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Services Instance Packaging• /www/WSERVICE/lwi/runtime/webservicesmax/eclipse/plugins/

WebServicesEngine/WEB-INF/conf/axis2.xml– <parameter name="disableREST" locked="true">true</parameter>– <parameter name="disableSOAP12" locked="true">true</parameter>

Examples – Above ws.apache.org for more values.

• Directory - /www/WSERVICE– /conf – httpd.conf, i5OSStartup.properties– /htdocs– /logs - **Important ** Error information– /lwi/logs - – /webservices

• Directory - /www/WSERVICE/webservices– /temp– /services ** Important ** all customer service artifacts here– /archive

Page 52: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Service Deployment Location

• Sample - /www/WSERVICE/webservices/services/ConvertTemp– ** Tracing ** ConvertTemp.config – info parms for services

– ./META-INF/services.xml - customize

• Generated Java• ../iseries/wsbeans/converttemp• ../iseries/programcall/base

Page 53: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

IWS Server Restrictions• SOAP 1.1 • WSDL 1.1 • PCML (deployment of ILE-based Web services)

– The deploying of ILE programs as Web services is dependent on a Program Call Markup Language (PCML)

– The following data types are not supported by PCML: • Date • Time • Timestamp • Pointer • Procedure Pointer • 1-Byte Integer • 8-byte Unsigned Integer

– Return values and parameters passed by value can only be 4 byte integers. – Varying-length arrays, and data structures containing varying-length subfields are not supported. – More details regarding RPG and PCML can be found in the ILE RPG Reference. More details

regarding COBOL and PCML can be found in the ILE COBOL reference.

• Parameters– A procedure in an ILE service program (*SRVPGM) that is to be externalized as a Web service

operation can have a maximum of 7 parameters. An ILE program (*PGM) can have a maximum of 32 parameters.

– Note: The work around is to create a Data Structure as a parameter which is a single parameter.

Page 54: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Security DiscussionSecurity ConcernsMessages are being sent over the intranet/internet – Are they Secure?

Web Services – Security• HTTP• WS-Security

Three Available Security Mechanism’s • HTTP - SSL encryption and authorization (Certificates) (Basic authorization)• WS-Security (No support on IBM Integrated Web services server for i)• IBM Datapower Appliances – (Pretty cool utility)

Page 55: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

What is Coming Next – Future Directions?

• Client Improvements– WSDL2RPG

• Presentation Layer? (WS-Explorer Client only Customizable)– JSF or PHP or AJAX?

• Enhance RESTful SOA on the Web services server?– Enable REST style services for Web Services server

• Performance Improvements?– Impressive improvements

• Serviceability– Utility to capture “SOAP/XML” communication for support?

• Migration tool IBM i WS server to WAS Web Service?– Or to IBM i ;)

• WS-Security specification?

Page 56: Slide 1 - Gateway/400 Group - St. Louis, MO

8 Copyright IBM Corporation, 2008. All Rights Reserved.

This publication may refer to products that are not currently available in your country. IBM makes no commitment to make available any products referred to herein.

IBM Power Systems™

Agenda Key:Session Number:

Web Services and SOA for the RPG Developer on IBM i

Dan Hiebert IBM [email protected]

Consuming RPG Web Service Business Logic

Page 57: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

• Introduction to SOA & Web Services• Creating RPG Web Service Business Logic.

– Lab Time

• Deploying/Testing RPG Web Services.– Lab Time

• Consumption of Web Services.– Lab Time

• Presentation Layer of Web Services.– Lab Time

Agenda

Page 58: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

RPG Consuming Web ServiceBusiness Logic

IBM Integrated Web Services client

• IWS Client / Process

• WSDL

• Stub Generation and Header Files

• Building / Compiling RPG and C code

• Review Process

• Deep Dive

Page 59: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Consuming Web services with RPG on IBM i The Unlimited Potential

Page 60: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Services – a client view

Definition: Self-Contained with well-defined interfaces that provide functionality that is accessible over the Internet/Intranet

Key Technologies: XML, WSDL, SOAP, UDDI

RPG web service client RPG FindCustomers

Page 61: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

• Natural for ILE RPG/COBOL Developer • 4 Step Static Development Process

1. Use WSDL to generate Web service proxy code in C

2. Build RPG stub code from C proxy code

3. Compile/Bind RPG & Web service stub code

4. Invoke RPG/COBOL Web service client

http://www.ibm.com/systems/i/software/iws/

Integrated Web services client for IBM i

Page 62: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Services Client for ILE

• Overview– Based on Apache AXIS C++ Version 1.5+– Consists

• Tools– Convert service’s WSDL to C/C++ APIs

• SOAP client– ILE Service Program

– Supported today• Packaged with 5733-XT1• V5R1, V5R2, V5R3, V5R4

– Availability• 4Q/07 – IBM i SS1 Option 3• V5R4 and later

• Supports – C, C++, RPG, COBOL– Web Services Description Language (WSDL) - document literal only – Web Services Invocation (WSI) 1.1 basic profile compliance – Secure Sockets Layer (SSL)

Page 63: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Service Deployment Review

Page 64: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Where to find my WSDL

Page 65: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

FindCustomers.WSDL

Page 66: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Page 67: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

FindCustomers.wsdl

FindCustomers.WSDL

Page 68: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Services Client for ILEStep 1: Stub Generation – Creating a Web Services Proxy

•Developer generates stubs using:–Java tools (wsdl2ws.jar)–Qshell script - wsdl2ws.sh -lc STOCKQ.wsdl

WSDL passed into tool that generates C/C++ stubs

C/C++ stubs

Web Service Provider WSDL

Page 69: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

FindCustomersPortType.h

Page 70: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

FINDCUSTOMERSInput.h

Page 71: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

1

2

3

Page 72: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

4

5

Page 73: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

6

7

8

9

10

Page 74: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

http://www.ibm.com/systems/i/software/iws

Page 75: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

RPG Call Find Customers Program

Page 76: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Quick Review of Steps

Process to Run RPG Web Service:

1. Stub Generation – Creating a Web Services Proxy (“intermediary” for ILE RPG, COBOL )

2. Use Stubs to build RPG prototypes

3. Compile/Bind and Invocation

4. Run Program

• Prerequisites– C++ Compiler (Compiler - ILE C++, licensed program product ID 5722WDS, option 52)

– Java (IBM Developer Kit for Java, JDK 1.4, licensed program product ID 5722JV1, option 6)=

– C Compiler (Compiler - ILE C, licensed program product ID 5722WDS, option 51)

• Only needed if generating C stubs

Page 77: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Web Services Client for ILEStep 2: Compile/Bind and Invocation

• Create the application that uses the stubs to invoke the Web service

Client Application

C/C++ stubs (service, method)

Axis Client

Server

Call/Return

Call/Return

SOAP Request

SOAP Response

Page 78: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

IBM Web Services Client – Deep Dive - Configuration

Page 79: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

IBM i integrated Web services client

• IBM i integrated Web services client– Based on Apache AXIS C++ Version 1.5

– A set of native service programs and java tools that enable you to build Web service client applications from existing Web Service Description Language (WSDL) files by generating C/C++ stubs

– Supported on V5R4, V6R1

• IBM i integrated Web services client has the following capabilities: – Support for Web Services Description Language (WSDL) - document literal only

– Supports Web Services Invocation (WSI) 1.0 basic profile compliance

– Support for Secure Sockets Layer (SSL)

– Java API for XML-based remote procedure call (JAX-RPC) style implementation

– Support IBM i non-Java languages; C, C++, RPG, COBOL

Page 80: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

IWS – client - packaging

• Product install directory is /QIBM/ProdData/OS/WebServices/V1/client– bin/ contains wsdl2ws.sh tool to generate stubs (calls wsdl2ws.jar)– docs/ contain PDF document and API docs– etc/ contains empty configuration file axiscpp.conf– include/ contains header files– lib/ contains service program symbolic links– prereqs/ contains jar files needed by wsdl2ws tool– samples/ contains sample code– WSDL2Ws/ contains wsdl2ws.jar that generates stubs

• Product install library is QSYSDIR– QAXIS10C.SRVPGM => SOAP Engine– QAXIS10HC.SRVPGM => HTTP Channel– QAXIS10HCS.SRVPGM => HTTP Channel SSL– QAXIS10HT.SRVPGM => HTTP Transport– QAXIS10X.SRVPGM => XML Parser

Page 81: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

Questions?

Page 82: Slide 1 - Gateway/400 Group - St. Louis, MO

IBM Power Systems

© 2008 IBM Corporation

8 IBM Corporation 1994-2007. All rights reserved.References in this document to IBM products or services do not imply that IBM intends to make them available in every country.

Trademarks of International Business Machines Corporation in the United States, other countries, or both can be found on the World Wide Web at http://www.ibm.com/legal/copytrade.shtml.

Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications Agency which is now part of the Office of Government Commerce.ITIL is a registered trademark, and a registered community trademark of the Office of Government Commerce, and is registered in the U.S. Patent and Trademark Office.UNIX is a registered trademark of The Open Group in the United States and other countries.Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.Other company, product, or service names may be trademarks or service marks of others.

Information is provided "AS IS" without warranty of any kind.

The customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer.

Information concerning non-IBM products was obtained from a supplier of these products, published announcement material, or other publicly available sources and does not constitute an endorsement of such products by IBM. Sources for non-IBM list prices and performance numbers are taken from publicly available information, including vendor announcements and vendor worldwide homepages. IBM has not tested these products and cannot confirm the accuracy of performance, capability, or any other claims related to non-IBM products. Questions on the capability of non-IBM products should be addressed to the supplier of those products.

All statements regarding IBM future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only.

Some information addresses anticipated future capabilities. Such information is not intended as a definitive statement of a commitment to specific levels of performance, function or delivery schedules with respect to any future products. Such commitments are only made in IBM product announcements. The information is presented here to communicate IBM's current investment and development activities as a good faith effort to help with our customers' future planning.

Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve throughput or performance improvements equivalent to the ratios stated here.

Prices are suggested U.S. list prices and are subject to change without notice. Starting price may not include a hard drive, operating system or other features. Contact your IBM representative or Business Partner for the most current pricing in your geography.

Photographs shown may be engineering prototypes. Changes may be incorporated in production models.

Trademarks and Disclaimers