SOA Gateway Version 2010-05-31
 —  Administration  —

Using the SOA Gateway with Natural

Natural subprograms can be exposed as "web services" thru the SOA Gateway, a DataView (XRD) maps the parameters passed to the called subprogram.

The following steps are required:


Natural WebService generation

The preferred way for creating DataView(s), the mapping from a Natural Paramaeter Data Area (PDA) to the SOA Gateway structures exposing the WebService via a WSDL, is through an automatic "discovery" process as described here.

Top of page

Other ways of defining a WebService

In addition to the automatic generation process outlined above, Webservices can be created / defined as follows.

Define a Natural WebService manually

  1. Add a new SOA Gateway WebService, specifying the following:

    graphics/conNat01.png

Create WebService(s) and DataView(s) from Natural sources or a SYSOBJH unload file

In addition to the manual approach described in detail in the Data Views section, WebServices and DataView(s) for the SOA Gateway can be generated/imported from SYSOBJH extracts or directly from Natural sources.

For a detailed description of the process refer to the Webservice Creation section

Top of page

Preparing the Natural environment

Certain steps are required to enable the SOA Gateway server to call Natural subprograms, this section describes them.

Prepare the Natural environment on Linux / UNIX

Using the SOA Gateway in an environment protected by Natural Security (NSC)

Defining the driver

Important:
The SOA Gateway interface to Natural requires the interface library libnatural.so in the LD_LIBRARY_PATH (LIBPATH on AIX). However, this shared library is contained in $NATDIR/$NATVERS/bin, and not in the Natural /lib directory. Due to this, either the Natural /bin directory must be added to search path variable, or libnatural.so copied / moved to a directory contained in the search path variable.

In the SOA Gateway Servers View, select the server you want to define a Natural driver for, in the Properties View select the Drivers tab, click the Add... button.

From the Driver Configuration Dialog select "Natural_Driver"

graphics/natsuo01a.png

Important:
When defining a Natural driver for the first time, make sure to check the "Show (post-setup) Driver Information" box because only this will allow you to extract the INPL file containing the SOA Gateway Natural interface- and example programs.

The following values are preset, change as required:

graphics/natsuo01.png

Only the Driver DLL parameter is to be entered asis, you are free to choose any Driver Name you wish, set the SBCS codepage and MBCS codepage parameters according to your local or internationalization requirements.

Click the Save button, you will now be asked to (optionally) enter Natural initialization parameters, for example PARM=MYPARM to use a Natural parameter module other than NATPARM.

graphics/natsuo01b.png

Click the Save button again, the newly defined driver will appear in the Driver Properties section:

graphics/natsuo02.png

When "Show (post-setup) Driver Information" has been selected, the following information box will be shown, and allow the extraction of the SYSOBJH file containing the SOA Gateway Natural interface- and example programs.

graphics/natsuo03.png

Loading the SOA Gateway Natural system- and demo programs on Linux / UNIX

The following steps are required to load the SOA Gateway WebService creation and demo programs in a Linux / Unix environment

Prepare the Natural environment on Windows

The SOA Gateway interface to Natural requires the interface library natni.dll.

Important:
Make sure the %NATDIR%/%NATVERS/bin directory, which contains natni.dll, is in the path.

Using the SOA Gateway in an environment protected by Natural Security (NSC)

Defining the driver

In the SOA Gateway Servers View, select the server you want to define a Natural driver for, in the Properties View select the Drivers tab, click the Add... button.

From the Driver Configuration Dialog select "Natural_Driver"

graphics/natsuo01a.png

Important:
When defining a Natural driver for the first time, make sure to check the "Show (post-setup) Driver Information" box because only this will allow you to extract the INPL file containing the SOA Gateway Natural interface- and example programs.

The following values are preset, change as required:

graphics/natsuo01.png

Only the Driver DLL parameter is to be entered asis, you are free to choose any Driver Name you wish, set the SBCS codepage and MBCS codepage parameters according to your local or internationalization requirements.

Click the Save button, you will now be asked to (optionally) enter Natural initialization parameters, for example PARM=MYPARM to use a Natural parameter module other than NATPARM.

graphics/natsuo01b.png

Click the Save button again, the newly defined driver will appear in the Driver Properties section:

graphics/natsuo02.png

When "Show (post-setup) Driver Information" has been selected, the following information box will be shown, and allow the extraction of the SYSOBJH file containing the SOA Gateway Natural interface- and example programs.

graphics/natsuo03.png

Loading the SOA Gateway Natural system- and demo programs on Windows

The following steps are required to load the SOA Gateway WebService creation and demo programs in a Windows environment

Prepare the Natural environment on the Mainframe

Defining the driver

In the SOA Gateway Servers View, select the server you want to define a Natural driver for, in the Properties View click the Driver Definition Wizard button.

graphics/natsum01.png

Select the Natural Driver, click the Configure button

graphics/natsum01b.png

Important:
When defining a Natural driver for the first time, make sure to check the "Show (post-setup) Driver Information" box because only this will allow you to extract the INPL file containing the SOA Gateway Natural interface- and example programs.

The Driver Defintion Dialog will be pre-set with the following values, change according to your needs and preferences, click the Save button

graphics/natsum01c.png

As the Natural driver requires a number of additional parameters, the dialog will expand and prompt for more input. Again, fill these parameters as required, you are free to choose any Driver Name you wish, set the SBCS codepage and MBCS codepage parameters according to your local or internationalization requirements. Click Save again.

graphics/natsum02.png

The parameters are as follows

Parameter Value
NaturalBatchPgm The name of the Natural Batch nucleus load module. A standard Batch-Natural is used, no modifications or additions to the Natural nucleus are required.

Important:
This MUST refer to a Natural batch nucleus with NATOS compiled with LE370=NO.

InitParms Natural initialization parameters. Specify any required parameters overriding the Natural parameter module settings, all Natural profile parameters are allowed here.
PreInitSessions The number of sessions in the session pool to be pre-initialized.
MaxSessions The overall size of the session pool, this parameter should be set to a value high enough to accomodate the peak number of parallel sessions expected.
NaturalLibrary The Natural Library to log on.
NaturalSteplibs Specify up to 7 Natural library names, in a comma-separated list, to be set as STEPLIB(s). When the NaturalLibrary parameter is not specified as "SYSSOA", include it in the list of Steplibs if you intend to use the "WebService creation" feature to import PDA structures and expose them as SOA Gateway WebService(s).

Note:
When running with Natural Security, the Steplib(s) specified here are ignored, they are set by Natural Security based on the logon library and logon user id.

NaturalSecurity Specify Yes or No, depending on if your environment is protected by Natural Security or not.

Important:
A logon will be made to the specified NaturalLibrary, with the specified naturalUserId and naturalPassword. It is essential that library SYSEXT as well as any required application libraries are defined as STEPLIBs to that library in Natural Security

naturalUserId Specify a Natural userid defined to Natural Security
naturalPassword Specify the password valid for the user defined on the naturalUserid parameter

Once saved, the newly defined driver will appear in the Driver Properties section:

graphics/natsum03.png

When "Show (post-setup) Driver Information" has been selected, the following information box will be shown, and allow the extraction of the INPL file containing the SOA Gateway Natural interface- and example programs.

graphics/natsum04.png

The SOA Gateway server Job / STC

  1. Add the Natural load library, or more specifically the load library containing the Natural batch nucleus specified in the driver's NaturalBatchPgm parameter and the modules NATXCAL and NATXCAL4 (contained in the Natural distribution load library), to the SOA Gateway server Job's / STC's STEPLIB.

  2. You may want to add a CMPRINT DD statement to your server JCL, in case of an error during Natural session initialization or execution Natural will write its error messages to this dataset.

  3. Ensure the SOA Gateway server region is sufficiently sized to cope for Natural's storage requirements, including the local bufferpool(s) if it is used.

Loading the SOA Gateway Natural system- and demo programs on the Mainframe

Any standard Natural INPL job can be used to load the SOA Gateway system- and demo-programs from the supplied dataset ASGvrm.INPL, for example (as usual, replace the library names, database parameters etc. to match your environment):

//SMAI061 JOB SAG,MSGLEVEL=1,
//          CLASS=O,MSGCLASS=X,REGION=8M
//*JOBPARM LINES=9999
//*
//* LOAD NATURAL PROGRAMS INTO ADABAS SYSTEMFILE
//* INPL SOA Gateway 411 SYSTEM FILE
//*      FROM FILE ASGvrm.INPL
//*
//NATB0100 EXEC PGM=NAT423BA,
//     TIME=1400,COND=(0,LT)
//STEPLIB   DD DSN=SAGLIB.SMALOAD,DISP=SHR
//          DD DSN=SAGLIB.ADA813.LOAD,DISP=SHR
//*
//CMPRMIN   DD *
STACK=INPL
IM=D,INTENS=1,XML=OFF,CFICU=OFF
NAFSIZE=0,DLISIZE=0,DB2SIZE=0,MADIO=0,MAXCL=0,MT=0
AUTO=ON
FUSER=(,8)
//*
//DDPRINT   DD SYSOUT=*
//DDDRUCK   DD SYSOUT=*
//MPMDUMP   DD DUMMY
//SYSUDUMP  DD DUMMY
//DDKARTE   DD DUMMY
//DDCARD    DD *
ADARUN DB=001,DE=3390,SVC=249,MODE=MULTI
//CMPRINT   DD SYSOUT=*
//CMWKF01   DD DSN=ASGvrm.INPL,DISP=OLD
B  
FIN
/* 
//

Top of page

Type mapping

The WebService Creation ("Discovery") process generates a DataView (XRD) and optionally a XML Schema (XSD) from either a Natural PDA (Parameter Data Area) or a parameter data definition (either an inline DEFINE DATA PARAMETER and/or referenced external PDA(s)) within a Natural subprogram.

These bits of mapping information are assembled into a WSDL in real time by the SOA Gateway server when a WSDL is requested through the

http://<server>:<port>/<webservice>?WSDL URI for a specific WebService.

When the signature (parameters) of a subprogram change, only the DataView needs to be recreated (via "discovery") and the WebService "refreshed" (the DataView cleared out of the cache), with the next access to the WSDL it will automatically reflect the changed parameters.

NATURAL to WSDL XML Schema Data Type mapping

Natural Type DataView WSDL / XML Schema Notes
A sbcs (space padded) xs:string Dynamic variables allowed
W mbcs (space padded) xs:string  
B hex.Binary xs:hexBinary Dynamic variables allowed
F4 float xs:float  
F8 double xs:double  
I1 byte xs:byte  
I2 short xs:short  
I4 int xs:int  
L Natural logical xs:boolean 0, false / 1, true
N zoned decimal xs:decimal  
P packed decimal xs:decimal  
D date xs:date YYYY-MM-DD
T date + time xs:dateTime YYYY-MM-DDTHH:MM:SS(.s)

Top of page