www.krengeltech.com

RXS Readme

From Wiki

User Guide

Contents

Installation

Note

Read the license agreement titled Media:RXS_License_Agreement.pdf before installing this software. By installing you declare that you agree to abide by the license agreement.

Upgrading

If you are upgrading from a previous release please contact isupport@krengeltech.com for directions on how to accomplish that task safely.

Installation Steps

  1. Unzip the downloaded file to C:\temp (or the directory of your choice).
  2. Issue the IBM i command:
    CRTSAVF FILE(QGPL/RXS) AUT(*ALL)
  3. FTP the file RXS from your PC to the IBMi in BINARY mode into the save file RXS in library QGPL.
    1. Open a DOS prompt (Start -> Run -> enter 'cmd' and hit enter)
    2. Type the following into the DOS prompt, replacing the IP address with that of your iSeries:
      ftp 172.29.134.41
    3. When prompted enter profile and password
    4. binary
    5. lcd c:\temp
      (where c:\temp is the location of the rxs.savf)
    6. quote site namefmt 0
    7. cd QGPL
    8. put rxs.savf rxs.savf
    9. quit
  4. Issue the IBM i commands. The value 'RXS' is used to denote where the base install of RPG-XML Suite should reside. If you are upgrading, it would be good to put 'RXS14' for this value where 14 is the corresponding version. Note that 8181 is the default port your RXS runs under in Apache. Change it to meet your needs. The default of 8181 should be fine 99% of the time. The value 'MYRXS' will be the name of your Apache web server instance and will also create a library named MYRXS for your development environment. Note that if you are upgrading, this value should be MYRXS14 where 14 is the version being upgraded to.
    RSTLIB SAVLIB(RXS) DEV(*SAVF) SAVF(QGPL/RXS) RSTLIB(RXS)
    CALL RXS/INSTALL PARM('RXS' '8181' 'MYRXS')
    ADDLIBLE MYRXS
  5. Registration - When you went to www.rpg-xml.com to download RXS you should have been prompted to enter in a valid email address. An email should have been sent to that address specifying a call similar to the one below. Issue the below call.
    CALL RXS/REGRXSBASE PARM('<<insert key that was emailed to you>>')
  6. Start the HTTP server using the below command:
         STRTCPSVR SERVER(*HTTP) HTTPSVR(MYRXS)
  7. Open your internet browser and enter the following. Substitute your IBMi ip address:
    http://yourIBMiIP:8181/MYRXS/rxs1
    You should get the following result:
<output myAttr="static value">I love home improvement plumbing. Especially when it leaks after you turn on the water!</output>

Requirements

  • RXS was created on an iSeries running V5R3 of OS/400 but is compiled back to V5R2.
  • If you need SSL functionality then cryptographic support needs to be installed on your IBMi. If you are on V5R4 or subsequent release then the SSL functionality already exists in the OS and doesn't need to be installed separately. The SSL license program for V5R3 and previous releases is 5722AC3.
  • RXS requires Apache which is installed on 99% of all machines we come in contact with. Note that Apache only needs to be started if you are offering web services from your IBMi. If you are only acting as the client role and making a request to another server *from* the IBM i, then you don't need to start the Apache server.
  • We use QShell during the install so that is also required and is already existent on most machines. It is 5722SS1 opt 30.

Registration

To obtain the information necessary to register the installation of RPG-XML Suite (RXS) on your machine please run the following commands and copy/paste the info into an email and send to sales@krengeltech.com.


     ADDLIBLE RXS
     RXS/DSPMCHINF

Updates & Changelog

v2.40

  • Fixed bug in DOM parser to intialize storage used in previous parses
  • Improved limits in DOM parser allowing increased element count in parsed XML
  • Enhanced RXSRTR to allow mixed case for RXSRTRCTL option switches
  • Fixed bug in RXS_getUrlVar() to allow encoded ampersand's to be decoded correctly (%26)
  • Enhancement to RXS_getUrlVar() to decode percent encoded characters correctly when CGIConvMode is set to MIXED
  • Fixed parser bug to allow UTF-8 double-byte characters in attribute data

v2.30

  • Fixed bug in RXS_getUrlVar when the last variable's value in QUERY_STRING was a single character. Also fixed bug if that was returning the & char in the event of an empty QUERY_STRING variable.

v2.20

  • Enhancement: Options used when calling RXS_DOMSetOpt or RXS_DOMBuild have been simplified. Information regarding these changes can be found on our documentation wiki at http://iwiki.krengeltech.com/wiki/RXS_DOMSetOpt
  • Fixed bug: Modified the template engine to ignore other forms of whitespace at the end of sections names. Previously, if invisible characters existed due to copying template code from Word or PDF documents, the section name would not be detected properly and would require the template to be modified.
  • Modified RPG-XML Suite Router added in v2.10 to exist in base RXS library, rather than a separate library.
  • Modified RPG-XML Suite Router command INZRXSRTR to be executable by users with authority to RXSRTRCTL and INZRXSRTR.
  • Modified RPG-XML Suite Router httpd.conf to allow multiple types of CGI invocations. This allows you to configure URLs which bypass the router if needed.
  • Fixed bug where DOM Parser functions RXS_DOMGetData and RXS_DOMGetDataCount would return incorrect values when using repeating elements.
  • Fixed bug where sometimes during install, data area RXSBASE was not being given appropriate authority, and would falsely report that an RPG-XML Suite license key was invalid immediately after installation.

v2.10

  • NEW FEATURE: Added new "RPG-XML Suite Router" functionality. This will ease the offering of web services as it takes care of altering the library list and user profile before your web service is invoked.
  • NEW FEATURE: RXS HTTP Command to make it easier, and safer, to end, start, and configure your Apache server instances.
  • Enhancement: When processing template files (i.e. IFS .tpl files), the section names will have *blanks trimmed from the end of their name. Previously, if blanks existed, the template engine wouldn't consider the name and the .tpl would have to be modified.
  • Enhancement: Allow RXS_getEnvVar to be called multiple times. Normally in the case of GET based web services there has been a single URL parameter named "xml" that would contain the inbound XML. With RESTFul web services making a mark in the web services world we have expanded the RXS_getEnvVar API to facilitate multiple calls for differently named variables.
  • Enhancement: Traditionally when there were unmatched delimiters in a template file (i.e. IFS .tpl files) it would throw a MCH0603 error. Now a more informative message will be relayed to the job log.
  • Enhancement: Speed improvements have been made in the RXS_DOM* based parsing API's.

v2.00

v1.42

  • Fixed bug where RXSCFG was being read for each call to RXS_getUri or RXS_initTplEng and now it is just called the first time in each job and then the data is cached to better performance.
  • Fixed bug that was causing issues when RXS was used in conjunction with DDM files or RPG being front ended by stored procedures. This was a bug that affected few customers in very specific usage scenarios.

v1.41

  • Modified RXS_getUri to use 65535 VARYING vs. 65535 without VARYING. This addresses issues when trying to pass by reference and not having the exact same string type. RXSCP fields RXS_getUriOut, RXS_getUriHead, and RXS_getUriData have been deprecated and commented out. They will be physically removed from RXSCP in v1.5. If you had version 1.4 installed you will need to recompile your programs to use this latest version.
  • Modified RXS_getUri to default to port 443 if port is 0 and SSL=RXS_YES was specified.

v1.40

  • NEW FEATURE: RXS_setParseEnc
  • NEW FEATURE: RXS_ignElemNamSpc
  • Modified commands BLDPRS and BLDTPL to better handle long XPaths
  • Modified default delimiters to be :: for section names and .:var:. for variable names. In previous versions they were /$ for section names and /%var%/ for variable names. This was changed for variety of reasons with the biggest being usage in foreign countries. By using colons and periods the code can be typed faster for manual modification of templates. If you are upgrading you should do an UPDDTA RXSCFG and change the defaults to /% for section begin delimiter, /% for var begin delimiter and %/ for var end delimiter.

v1.30

  • NEW FEATURE: Added RXS_addLibLE
  • NEW FEATURE: Added RXS_libLEExists
  • NEW FEATURE: Added RXS_rmvLibLE
  • NEW FEATURE: Added RXS_getBuffLen to get a count of bytes in the Template Engine buffer to know if it is over 65535 and thus to big to retrive with RXS_getBuffData.
  • NEW FEATURE: Added RXS_getBuffData to get the Template Engine data that is currently buffered so it can be put into a 65535 VARYING field and used on RXS_getUri.
  • Changed HTTPD.txt to not use $ signs (also changed NEWENV command)
  • Fixed bugs in BLDPRS that were making it not work right with long xPaths.
  • Added delim fields to RXSCFG
  • Changed RXS_initTplEng to operate off of default delimiters in RXSCFG and change default delimiters in program to not be constants.
  • Changed RXS_updVar to be able to do 65535 varying, was set at 1024 at an inner level of code.
  • Enhancing RXS_soapDecode for speed and accuracy.
  • Adding code to BLDPRSR and BLDTPLR to not delete user index unless it exists. It was putting messages in job log uncessarily
  • Added DftTransDir to RXS_readToFile if no path was specified.
  • Added DftTransDir to RXS_outFromFile if no path was specified.
  • Added DftTransDir to RXS_deleteFile if no path was specified.
  • When using RXS_readToFile extra spaces were sometimes added to the end of the files contents. This has been addressed to not have additional spaces.
  • Change error text in RXS_cmpTransFile to be RXSCFG instead of CONFIG.
  • Added defaults for RXS_getUri: ds.ReqType=RXS_POST, ds.SprHead=RXS_YES, ds.Debug=RXS_NO, ds.RspType=RXS_VAR, ds.ReqType=RXS_VAR, ds.ContType='text/xml'. This will save typing when using RXS_getUri as not as many data structure fields will need to be filled.
  • When a POST with zero content is sent and RXS_readToFile is used an error was inappropriately thrown. Now no error is thrown.
  • Changed RXS_readToFile to truncate content on IFS open.
  • Changed RXS_getUriOut and RXS_getUriHead from 32767 to 65535 in RXSCP (main RXS copybook)
  • Added field RXS_getUriData to RXSCP in relation to new RXS_getUri functionality
  • Changed RXS_getUri to be able to send and receive 65535 bytes of data if not using IFS files. Previous limitation was 2048.
  • Added new OutType of RXS_VAR to RXS_initTplEng. This should be used in conjunction with RXS_getBuffData.
  • !!RECOMPILE!! Changed RXS_getUri to have the second, third and newly added forth parms as OPTIONS(*OMIT) for ease of use (so you don't have to specify them if you aren't using them)
  • Added example TPLENG3 to show how to use RXS_getBuffData.
  • The field RXS_GetUriHead (i.e. response HTTP Headers) will always be returned when a variable is specified vs. only being returned when SprHead (Seperate Headers) is specified. This pertains to RXS_getUri.
  • Modified client app Web Service Tester to save responses to a stream file and retain URLs that have been accessed.

v1.20

v1.10

  • Changed RXS_loadTpl to allow overriding abilities for section and variable delimiters. For internationalization purposes.
  • Changed RXS_parse to allow the passing of handler event type value overrides (i.e. ELEMBEGIN, ELEMCONTENT, ELEMEND, ATTR). For internationalization purposes.
  • Added example RXS6 to show Template Engine overriding of sections/variables and also ability to override event handler type values.
  • Modified install *SAVF to be V5R1 instead of V5R3

v1.00

  • Original