IBM Software Group
Al Grega
IBM Rational Software
®
© 2008 IBM Corporation
IBM Software Group | Rational Software
Web Services Overview
Technical Overview
Development and Deployment
IBM i Web Services Server
Rational Web Services Wizard
Host Access Transformation Services
Summary
© 2008 IBM Corporation 2
IBM Software Group | Rational Software
Model
Create
•RPG Modules
•HTML Forms
•Java beans
RPG
COBOL
C/C++
Assemble
4GL
PHP
•Business
Processes/
Services
Deploy
•Services
Available
Consumer Provider
Tools
Monitor
•Application
Created
© 2008 IBM Corporation 3
IBM Software Group | Rational Software
Evolution of the Web
Document-centric =>
Application-centric =>
– Service-centric
Static Web Applications
Dynamic Web Applications
Web Services Portlet Applications
© 2008 IBM Corporation 4
IBM Software Group | Rational Software
© 2008 IBM Corporation 5
IBM Software Group | Rational Software
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
Other Applications
Web Application
Internet
© 2008 IBM Corporation
Web Service
6
IBM Software Group | Rational Software
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
© 2008 IBM Corporation 7
IBM Software Group | Rational Software
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
© 2008 IBM Corporation 8
IBM Software Group | Rational Software
Provider: implements a Web service
Requestor: has a business need
Broker: lists all available services
2 find
Requestor
Broker
1 publish
3 bind/invoke
Provider
© 2008 IBM Corporation 9
IBM Software Group | Rational Software
Web Services Overview
Technical Overview
Development and Deployment
IBM i Web Services Server
Rational Web Services Wizard
Host Access Transformation Services
Summary
© 2008 IBM Corporation 10
IBM Software Group | Rational Software
Discovery UDDI, WSIL
Description WSDL
XML Messaging SOAP
Transport HTTP, JMS, FTP, SMTP
© 2008 IBM Corporation 11
IBM Software Group | Rational Software
HTTP
Simple, stable, widely deployed
Travels through firewalls
Currently the most popular option for SOAP transport
HTTP is synchronous
If asynchronous transactions are required, consider using
JMS
Other choices: FTP, SMTP
Broker
SOAP over
HTTP
SOAP over
HTTP
SOAP over
HTTP
Requestor Provider
© 2008 IBM Corporation 12
IBM Software Group | Rational Software
1.
WSDL: Web Services Definition Language
XML schema (vocabulary) describing a Web service interface
Methods
Parameters
How to invoke the service
2.
Client applications use WSDL to generate Web service client proxy
Broker
3.
Web service client proxy contains code that invokes a Web service
2
Look up
WSDL
1
Publish
WSDL
Requestor Provider
3
Use WSDL to bind/invoke
© 2008 IBM Corporation 13
IBM Software Group | Rational Software
SOAP is a flavor of XML
SOAP message contains a Remote Procedure Call (RPC) or any XML document
1 2 3
Web service
Client
Internet SOAP
Server
Web service
6 5 4
1.
The Web service client creates and sends a SOAP message
2.
The SOAP server listens for SOAP messages. SOAP server is an application running in an Application Server (for example, WebSphere Application Server)
3.
The SOAP server processes the SOAP messages and passes the request to a
Web service
4.
The Web service runs the specified method and returns the result to the SOAP server
5.
The SOAP server forwards the result back to the Web service client
6.
The Web service client parses SOAP response.
© 2008 IBM Corporation 14
IBM Software Group | Rational Software
UDDI: Universal Description, Discovery and
Integration
Registry of Web Services (the White, Yellow and Green pages)
Information categorized by company and by service type
Can be private or public
Several public UDDI registries exist
UDDI Server
Ships with IBM i
Included with WAS Express 6.0 and above
WebSphere Service Registry and Repository
Promotes reuse and eliminates redundancies
Enable SOA governance of your services
Optimizes the use of services in SOA by exchanging rich service information
© 2008 IBM Corporation www.strikeiron.com
www.xmethods.com
15
IBM Software Group | Rational Software
Web Services Overview
Technical Overview
Development and Deployment
IBM i Web Services Server
Rational Web Services Wizard
Host Access Transformation Services
Summary
© 2008 IBM Corporation 16
IBM Software Group | Rational Software
IBM i Web Services Server
Bundled with the IBM i Operating System
Creates web services from ILE *SRVPGM’s or *PGM’s
Rational Web Services Wizard
Bundled with Rational Developer for System i for SOA Construction
(RDI SOA)
Creates web services from RPG and COBOL ILE source code
Host Access Transformation Services
HATS Toolkit available as a free download and is bundled with RDi
SOA
Creates web services from any 5250 screen
© 2008 IBM Corporation 17
IBM Software Group | Rational Software
Where do you get the tool
Source *SRVPGM and *PGM ILE
Batch Modules
How it’s deployed IBM Integrated Web
Application Server for i (part of the O/S)
Where it’s deployed On the same IBM i system as the source ILE programs
Web Service
Standards
Tied to IBM i Operating System
(fewer updates)
Scalability
Web Services Server
Part of the IBM i Operating
System
Vertical
Tied to IBM i Hardware
Rational
Web Services Wizard
Bundled with RDi SOA* and other Rational IDE’s
RPG and COBOL ILE Batch
Source Code
WebSphere Application
Server Express (bundled with the IBM i O/S)
Anywhere that WAS runs
Tied to WebSphere
Application Server (frequent updates)
Horizontal
Can be clustered with WAS
Network Deployment
Host Access
Transformation
Services
Free Download and
Bundled with RDi SOA* and
HATS for 5250**
Any 5250 screen (no code required)
WebSphere Application
Server Express (bundled with the IBM i O/S
Anywhere that WAS runs
Tied to WebSphere
Application Server (frequent updates)
Horizontal
Can be clustered with WAS
Network Deployment
* RDi SOA is a separate chargeable product. Customers with WDSC AE licenses under maintenance may have entitlements to RDi SOA.
** HATS 5250 is a chargeable runtime product for deploying HATS projects and can be purchased via Passport Advantage. The free download HATS toolkit provides two connections for testing purposes.
© 2008 IBM Corporation 18
IBM Software Group | Rational Software
Web Services Overview
Technical Overview
Development and Deployment
IBM i Web Services Server
Rational Web Services Wizard
Host Access Transformation Services
Summary
© 2008 IBM Corporation 19
IBM Software Group | Rational Software
IBM i Integrated Web service enhancements make it easy to get started with SOA on IBM i
OS functional enhancement
Included in IBM i 6.1 (a.k.a. i5/OS V6R1)
PTF’s for i5/OS V5R4 (get SF99114)
Designed for ILE programmers
Makes Web services easier
Two parts
The ‘Web Services server’, or service provider
The ‘Web Services client’, or service requestor
© 2008 IBM Corporation 20
IBM Software Group | Rational Software
Provide the SOA ‘Web Services’ runtime for
Service provider
Service consumer
Provide options that do not require new skills / tools to ILE programmers
Provide a Web service development environment independent of Rational development tools for IBM i (RDi
SOA)
Provide a Web service deployment environment independent of WebSphere Application Server
© 2008 IBM Corporation 21
IBM Software Group | Rational Software
Programs or service programs must be directly callable
Distinct input & output parameters
No requirements for user interface or interactive 5250 session
Program call markup language (PCML) document defining the object location, parameters, entry points, etc.
Created by CRTRPGMOD, CRTBNDRPG, CRTCBLMOD,
CRTBNDCBL commands
Options PGMINFO (*YES), INFOSTMF (IFS location)
5250 or WDSC RSE interface
Can also embed PCML data within the program object, for instance
CRTRPGMOD PGMINFO(*PCML *MODULE) {V6R1}
H PGMINFO(*PCML:*MODULE) {V5R4}
PROCESS OPTIONS PGMINFO(PCML MODULE)
© 2008 IBM Corporation 22
IBM Software Group | Rational Software
http://hostname:2001/ or go directly http://hostname:2001/HTTPAdmin
© 2008 IBM Corporation 23
IBM Software Group | Rational Software
Click on the Create New Web Services Server link
The Web Services
Server is part of the
IBM i Operating
System
© 2008 IBM Corporation 24
IBM Software Group | Rational Software
© 2008 IBM Corporation 25
IBM Software Group | Rational Software
© 2008 IBM Corporation
Identify the ILE batch module (*SRVPGM or PGM) that you want to create a web service from
26
IBM Software Group | Rational Software
© 2008 IBM Corporation
Give your service name. Remember this is the name that will be used by service requestors.
27
IBM Software Group | Rational Software
What ILE procedure's should be externalized as a Web service?
Choose the ILE procedures to use and identify what you want to be input or output parameters
(or both).
© 2008 IBM Corporation 28
IBM Software Group | Rational Software
Define what user
(authority & access) will be identified with this web service.
© 2008 IBM Corporation 29
IBM Software Group | Rational Software
Make sure to specify the libraries with all the objects that your web service will need to access.
© 2008 IBM Corporation 30
IBM Software Group | Rational Software
Double check your work and click Finish.
The Web Service will be created automatically and a web service server instance will be started.
© 2008 IBM Corporation 31
IBM Software Group | Rational Software
You can test your web service with the web delivered web services test client.
© 2008 IBM Corporation 32
IBM Software Group | Rational Software
View your WDSL
Web Service Output and XML
© 2008 IBM Corporation 33
IBM Software Group | Rational Software
Web Services Overview
Technical Overview
Development and Deployment
IBM i Web Services Server
Rational Web Services Wizard
Host Access Transformation Services
Summary
© 2008 IBM Corporation 34
IBM Software Group | Rational Software
Web Services wizard in RDi SOA generates a Web Services wrapper for a program or service program procedure
Program or procedure must be able to run as batch
Generated Web Service wrapper is deployed onto WebSphere Application
Server or the Integrated Web Application Server for IBM i Operating System
Does not have to be deployed onto the same server as the program or service program
Example program to be called
Start the wizard by right-clicking on member in the RSE and selecting Web
Services > Create Web
Service
© 2008 IBM Corporation 35
IBM Software Group | Rational Software
Select the blue hyperlinks to change the Web Application
Server, Web service runtime,
J2EE version, or Web project
The Service project and
Service EAR projects are the location where wizard generates files related to the
Web Service
If a Service project or EAR project does not exist, it will be created for you!
© 2008 IBM Corporation 36
IBM Software Group | Rational Software
-File name shows the Program source file the wizard was launched from (ILE
RPG, COBOL, and PCML are valid)
-Browse files to select a different file
-The default Runtime configuration is taken from the i5/OS RSE connection
- Click Browse to choose an existing configuration (.config file)
Selecting the Program (CUSTINFO), you can change the library, program type and program name
Make sure you check the program type: *PGM or *SRVPGM!
Expand the program to see program parameters
Selecting a parameter to change its usage (input, output, both), data type, length, and CCSID
© 2008 IBM Corporation 37
IBM Software Group | Rational Software
Default sign-on information is taken from the i5/OS RSE connection
Alternatively, can specify use of program call Java Connection
Architecture connector for sign-on and connection management.
Additional libraries can be specified that are added to the library list at runtime
Library list from the job description is still used
Additionally a current library and initial command can be set.
They add additional time to each call to setup the environment, Use job description settings instead, where possible
© 2008 IBM Corporation 38
IBM Software Group | Rational Software
After the Web Service is generated you can:
Test the Web Service
Deploy the Web Service
Generate a client
1. Select
WSDL operation
2. Enter a Customer ID
3. Go!
© 2008 IBM Corporation 39
IBM Software Group | Rational Software
Tips on Handling data structure arrays
Many RPG Web Services need to return data structure arrays
– Return all parts within specified price range
However, RPG does not have varying dimensional arrays
–
–
You have to prototype the maximum expected
But you don’t want to return empty elements from the
Web service
Add parameter to prototype
–
–
Input value is number of elements in array
Output value is number of elements returned
Use Program Call Bean + Web services wizard to generate code
Paper to be published shortly
4. Results are shown in Status Pane
5. Click on Source to view the SOAP request and response messages
© 2008 IBM Corporation 40
IBM Software Group | Rational Software
Web Services Overview
Technical Overview
Development and Deployment
IBM i Web Services Server
Rational Web Services Wizard
Host Access Transformation Services
Summary
© 2008 IBM Corporation 41
IBM Software Group | Rational Software
Create a HATS project
Setup Development environment
Define host connections
Create Macros
Navigate host screens
Define input parameters & output data
Connect, data, disconnect macros
Optionally Set up session pooling
© 2008 IBM Corporation 42
IBM Software Group | Rational Software
Create an Integration Object
Defines the programming interface to the macro
Create Web Service
Web Service files
Web Service Definition Language (WSDL) file
Test the Web Service with the Web
Services Explorer
© 2008 IBM Corporation 43
IBM Software Group | Rational Software
Create a new
HATS
Project
Give the project a name
A HATS Project must be created even though you will not be transforming
5250 screens.
Click Next
© 2008 IBM Corporation 44
IBM Software Group | Rational Software
Click
To Start
Macro
Name the
Macro
HATS includes a Host Terminal that allows you to see before and after shots of screen transformations. It also includes a Macro recording tool.
A macro is a script that drives through and interacts with the green screen applications.
•Developer define “screens” within the macros by identifying screen recognition criteria and actions to perform when the screen is reached.
•Developer links screens together to define the flow of the macro.
© 2008 IBM Corporation
Click Finish to
Start recording
45
IBM Software Group | Rational Software
2nd: Press
Add Extract
Action button
1 st : Rope off
Customer
Name Info
Prompt and
Extract Actions allow you to grab
5250 screen data and use them as input and output parameters for your web services later.
Last
Click
Finish
3rd: Give the extract action a name screen
© 2008 IBM Corporation 46
IBM Software Group | Rational Software
The new Visual Macro Editor (VME) simplifies macro creation, debug and execution activities:
Allows for easier handling of alternate / error flows.
Helps decrease the number of logic and flow problems (since the flow can be clearly analyzed by both developers, expert users, and business analysts).
© 2008 IBM Corporation 47
IBM Software Group | Rational Software
An Integration Object (IO) is a
Java class that encapsulates a macro.
Integration Objects can be called directly from Java
Server Faces (JSF), Struts, or standard JSP Web pages.
Integration Objects can also be used in Enterprise Java
Beans (EJBs) or Web
Services .
© 2008 IBM Corporation 48
IBM Software Group | Rational Software
HATS uses the same web services wizard as RDi SOA in out last example. This provides a consistent interface for creating web services for Interactive or batch RPG applications.
© 2008 IBM Corporation
Last
Click
Finish
49
IBM Software Group | Rational Software
The Web Service Explorer is the same as RDi SOA too.
© 2008 IBM Corporation
Click Go to call the web service
Double-Click
Status Line to see the results from the web service
50
IBM Software Group | Rational Software
Web Services Overview
Technical Overview
Development and Deployment
IBM i Web Services Server
Rational Web Services Wizard
Host Access Transformation Services
Summary
© 2008 IBM Corporation 51
IBM Software Group | Rational Software
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
V6R1
– i5/OS SS1 Option 3
Supports
C, C++, RPG, COBOL
Web Services Description Language (WSDL) - document literal only
Web Services Invocation (WSI) 1.1 basic profile compliance
StockQuote.wsdl
<wsdl:message name=" getQuoteRequest ">
<wsdl:part element=" impl:getQuote" name="parameters "/>
</wsdl:message>
<wsdl:message name=" getQuoteResponse ">
<wsdl:part element=" impl:getQuoteResponse " name="parameters"/>
</wsdl:message>
<wsdl:portType name="StockQuote">
<wsdl:operation name="getQuote">
<wsdl:input message="impl:getQuoteRequest" name="getQuoteRequest"/>
<wsdl:output message="impl:getQuoteResponse" name="getQuoteResponse"/>
</wsdl:operation>
</wsdl:portType>
Sample client
– requester code view
Secure Sockets Layer (SSL)
© 2008 IBM Corporation 52
IBM Software Group | Rational Software
Developer generates stubs using Qshell script:
/QIBM/Proddata/OS/WebServices/V1/client/bin/wsdl2ws.sh
GetQuote.wsdl -lc –ogetQuote.Stubs
WSDL
WSDL passed into tool that generates
C/C++ stubs
1.
Stub Generation – Creating a Web Services Proxy
(“intermediary” for ILE RPG, COBOL )
2.
Compile and Bind
3.
Run the application
Generated StockQuote.h (C stub header file) extern void* get_StockQuote_stub(const char* pchEndPointUri);
C/C++ stubs extern void destroy_StockQuote_stub(void* p); extern int get_StockQuote_Status(void* pStub); extern xsdc__float getQuote(void* pStub, xsdc__string Value0);
© 2008 IBM Corporation
Your RPG program calls this
C/C++ Stub passing parameters which in turn gets passed to the web service via the AXIS C++
Client
53
IBM Software Group | Rational Software
Pre-requisites
An EGL project or EGL Web project
An EGL deployment descriptor
A Web Services Description Language (WSDL) file that describes the service you want to use, located somewhere in your workspace
Steps
Import or copy the service WSDL to your EGL project
Add the WebSphere 6.x ServerType Option to the Build File
Generate the services descriptor file
In the client process - code a variable based on the
<serviceName> type
Add a Bindservice property with the appropriate bindkey
Code the call to the ServiceVar.function
– passing parameters
More Information at the EGL Cafe
http://ibm.com/rational/eglcafe
© 2008 IBM Corporation 54
IBM Software Group | Rational Software
Easy and fun way to quickly try practical scenarios guided by self-paced exercises
System z Sandbox
Launched 2/26
Examples and best practices provide low-risk, practical, hands-on path to understanding. Includes:
Rational Developer for System z
Rational Business Developer
System i Sandbox
Launched May 2008
Examples and best practices provide low-risk, practical, hands-on path to understanding. Includes:
Rational Application Developer
Rational Developer for System i
Rational Transformation Workbench
Host Access Transformation Services
Rational Business Developer
Rational Host Access Transformation Services
Databorough xAnalysis
Full version software trials
‘Try online’ hosted environments
Tutorials
Online Resources
Full version software trials
‘Try online’ hosted environments
Tutorials
Online Resources http://www.ibm.com/developerworks/downloads/emsandbox/
© 2008 IBM Corporation 55
IBM Software Group | Rational Software
1.
Web services are applications that are invoked over the Web
2.
Web services do not have a user interface and return information in form of XML
3.
Web services are the lowest common denominator in heterogeneous application to application connectivity
4.
When building Web services, focus on designing an interface for maximum interoperability and implementing business logic
5.
Use Rational and WebSphere Tools to generate and test Web services
6.
IBM i has everything you need to deploy web services from RPG applications
Internal IBM Integrated Web Application Server for i and WAS Express
7.
RDi SOA provides the tools you need to build web services from
RPG Applications
Remote System Explorer, HATS toolkit and the Web Services Wizard
© 2008 IBM Corporation 56
IBM Software Group | Rational Software
Demonstrations
http://rational.dfw.ibm.com/whidemo/
Integrated Web Services for i5/OS
http://www.ibm.com/systems/i/software/iws/
Web Services Wizard
http://www.ibm.com/developerworks/edu/ws-dw-ws-wsat1.html
HATS Web Services
http://www.ibm.com/developerworks/websphere/library/techarticles/
0504_hardison/0504_hardison.html
EGL Cafe
http://ibm.com/rational/eglcafe
IBM Technical Information and Examples
http://www.ibm.com/developerworks/
© 2008 IBM Corporation 57
IBM Software Group | Rational Software
© 2008 IBM Corporation 58
IBM Software Group | Rational Software
8 IBM Corporation 1994-2008. 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 accu racy 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.
© 2008 IBM Corporation 59