Presentation for October 2011 "RPG – WSDL 2 RPG better than - Status

watermelonroachdaleInternet και Εφαρμογές Web

30 Ιουλ 2012 (πριν από 4 χρόνια και 8 μήνες)

505 εμφανίσεις


better than IBM’s utility

Ed Waldschmidt


September 30, 2011

Quick Poll

How many have worked with web

How many have attempted
programming the interface for WSDL’s
and have been successful?

How many have done this in RPG?

WSDL programming made

Tools 400 has an utility which generates both
the service program and the module

The utility is called WSDL2RPG

Command interface for I
Series developers

Generated code does compile

Best part, it is free. Free software for the I

IBM and the tool

IBM liked the tool, however, IBM dropped the
command interface.

Developers need to know how to navigate Q

With IBM’s version, need to have

installed on the system.

V5R1 is the oldest release supported, however
V6R1 is recommended.

IBM and the tool cont.

JAVA also needs to be installed on the I

Defaults to C#.

One must manually setup the RPG source
file before migration. Library and source file
with member needs to be created first

Good luck


Tools/400 shareware version resides in a
library on the I Series.

Provides a command that can be prompted
for the native I
Series developer which makes
code generation easier.

Tool evokes the WSDL for the developer
through HTTPAPPI to select correct module

WSDL2RPG tool (cont)

Generated code will compile

Can generate both the module and program

Markers are created in the program to indicate what
to pass for the WSDL

With minor changes the code (to add the parms the
WSDL needs) does run and return values

The tool will poll the WSDL and show you the
different WSDL’s that are available

Requires Scott Klements HTTP software

Wave of the future

More and more companies and government entities
are setting up WSDL’s for people to tap into
information. Such as : UPS for rates and delivery

This tool makes the code generation easy

Good support from Tom Radditz on his code

Try it. You will like it.

Downside to tool

Code generated is not pretty and is very
complex. Most generated code is this way

Module compile is very big and has every
procedure that could possibly be used. Most are
not needed

Sample code

Code tells you where to put your parameters for

// Set the paramater values of the request message

// of the web service.

// assign values here

parameters.ZipCode = Pzipcode;

Substitute a value for the zipcode. Pzipcode was
added to the module as a parameter

Sample code cont.

You wrapper program is just reading your data
and passing values to the module call.

The module will return values if needed

including HTTP errors returned

After control is passed back to your calling
program, the rest is native ILE that you
developed in RPG.

Real Example

Weather WSDL

// If the Web service finished successfully ...

B01 if (not WeatherForecastSoap_isError());

// ... get response data from response
data structure

Real Example

Weather WSDL

text = 'Retrieved ' +



+ ' zip codes for ' +

parameters.ZipCode ;

Real Example

Aplicor WSDL

X01 else;

// ... else show error messages ordered by

// 1. HTTP error information

text = %char(

) + ': ' +

Real example

WSDL cont.

The only modification is adding the parms to

The other modification that would be needed
is to write the wrapper program so that it can
handle return information.

Otherwise, native ILE code