Partner400 Logo
    Does Your Web Service Need a REST?
On this page you can find the source programs for the article "Does Your Web Service Need a REST?" which appeared in the IBM Systems Magazine's Extra newsletter
[an error occurred while processing this directive]

The source and XML skeleton files described in the article are included in the zip file that you can download here.

Just unzip the file and upload the sources. The two .xml files should be placed in a suitable location in the IFS. Don't foget to modify the .rpgle source programs to reference the correct location in your IFS.

To test out restsrv1 click on this link here.  See the article for more details on ways to test the service.

To test restsrv2 you can use this one to test the Quantity query or this one to test the Price lookup.

An example of the Apache configuration directives required can be found at the beginning of each RPG program source so that you don't have to keep coming back to this page to find them. These are the minimum directives required to run the examples. As you can see they are very straightforward and can easily be integrated into your existing configuation.

Don't forget to change the library name xxxxxx to match the location where you placed the compiled program and change the yyyyyy entry to match the name of the program as you created it. You can either use one set of directives for each web service , or change the directive to use ScriptAliasMatch if you want to use just one directive to allow access to both of the web services., you  

ScriptAlias /restsrv1 /qsys.lib/xxxxxx.lib/yyyyyy.pgm
<directory qsys.lib/xxxxxx.lib>
Order Allow,Deny
Allow From All
Return to Home Page  

Want more information?
Got a question or comment about the site?
Please feel free to Contact Us at any time.}