From YiPs Wiki (i powered)

XMLSERVICE: XMLSERVICEDEMO

Goto Main Page
Goto Documents

XMLSERVICE



There are many ways to run XMLSERVICE from 1-tier/2-tier applications, this page is intended to demonstrate some of the ways using this IBM i machine (YiPs IBM i machine you are on it right now). These demos are for educational purposes, so please be nice and no hacking and we can continue offer easy examples without major restrictions.

0) PHP help RPG

This demo shows PHP bringing RPG to web multiple ways.

PHPhelpRPG.html

←Click the image on the left to run the demo. Look for “Run me” to run examples.

{Download DVD_demo 1.0.1} — 5250/PHP/RPG DVD movie shop
{Download code viewer 1.0.1} — pretty code foil viewer

Notes:

1) New PHP Toolkit

This demo shows PHP Toolkit using XMLSERVICE included with download of Zend Server 5.1.1.

Toolkit.html

←Click the image on the left to run the demo.

{Download Demo 1.6.8} — active samples use pooled private connections ($maxpool)


Notes:

2) XMLSERVICE PHP XML

This demo shows PHP XML interface using XMLSERVICE (also known as “raw XML” interface).

XML.html

←Click the image on the left to run the demo.

{Download Demo 1.6.8} — active samples use pooled private connections ($maxpool)


Notes:

3) XMLSERVICE HTML/XML Only

This demo shows XMLSERVICE running HTML/XML with no scripting language at all (no PHP).

index.html

←Click the image on the left to run the demo.

{Download Demo}


Notes

<form name="input" action="http://MYIBMIMACHINE/cgi-bin/xmlcgi.pgm" method="post">
<input type="hidden" name="db2" value="*LOCAL">
<input type="text" name="uid" value="MYUSERID">
<input type="password" name="pwd" value="MYPASSWORD">
<input type="hidden" name="ipc" value="/tmp/MYUSERID0001">
<input type="hidden" name="ctl" value="*sbmjob">
<input type="hidden" name="xmlin" 
value="<?xml version='1.0'?>
<script>
<comment>your XML script here, cmd, sh, sql, pgm (below)</comment>
</script>">
<input type="hidden" name="xmlout" value="500000">
<input type="submit" value="MYBUTTON" />
</form>
action="/cgi-bin/xmlcgi.pgm"
-- becomes --
action="http://174.79.32.155/cgi-bin/xmlcgi.pgm"

--- cut/paste below ---
<!-- XMLSERVICE DB2 query (select/fetch) -->
<form name="input" action="http://174.79.32.155/cgi-bin/xmlcgi.pgm" method="post">
<input type="hidden" name="db2" value="*LOCAL">
<input type="hidden" name="uid" value="*NONE">
<input type="hidden" name="pwd" value="*NONE">
<input type="hidden" name="ipc" value="/tmp/rangerhtmlonly">
<input type="hidden" name="ctl" value="*sbmjob">
<input type="hidden" name="xmlin" 
value="<?xml version='1.0'?>
<?xml-stylesheet type='text/xsl' href='/Samples/Toolkit_HTML/DemoXslt.xsl'?>
<script>
<sql>
<options options='noauto' autocommit='off'/>
</sql>
<sql>
<connect conn='myconn' options='noauto'/>
</sql>
<sql>
<query conn='myconn'>select * from xmlservtst/animal</query>
</sql>
<sql>
<describe desc='col'/>
</sql>
<sql>
<fetch block='all' desc='on'/>
</sql>
<sql>
<free/>
</sql>
</script>">
<input type="hidden" name="xmlout" value="500000">
<input type="submit" value="DB2 query (select * animals)" />
</form>

4) Call XMLSERVICE using RPG DB2

This demo shows RPG calling XMLSERVICE.

RPG.html

←Click the image on the left to run the demo (or links below).

Notes:


Author(s)

Tony “Ranger” Cairns - IBM i PHP / PASE

Retrieved from http://youngiprofessionals.com/wiki/index.php/XMLSERVICE/XMLSERVICEDEMO
Page last modified on March 25, 2014, at 11:59 AM EST