Since the January 2014 introduction of the new RXS3 API and its improvements, our RPG API Express customers have continued to make suggestions for even more features and new functionality. At Kato Integrations we embrace these suggestions to allow developers to leverage their existing RPG skills and couple them with newer, advanced technologies.
With the introduction of version 3.2 for RPG API Express we have added support for the following:
Below are some simple code examples of the enhanced features highlighted above.
TransmitDS.HTTPMethod = RXS_HTTP_METHOD_DELETE;
gXmlResponse = RXS_Transmit( gXmlRequest : TransmitDS );
gMethod = RXS_GetEnvVar( ‘REQUEST_METHOD’ );
if gMethod = ‘DELETE’;
…
endif;
gCustomer = RXS_GetUrlVar( ‘customer/’ );
ComposeDS.Stmf = ‘/www/rxs/templates/geturi2.tpl’;
ComposeDS.LargeTemplate = RXS_YES;
ComposeDS.TrimTemplateLines = RXS_YES;
ComposeDS.OmitLineControls = RXS_YES;
RXS_ResetDS( GetStmfDS : RXS_DS_TYPE_GETSTMF );
ComposeDS.OmitUncomposedLines = RXS_YES;
RXS_ResetDS( GetStmfDS : RXS_DS_TYPE_GETSTMF );
GetStmfDS.Stmf = ‘/tmp/bigfile.txt;
GetStmfDS.ChunkedLength = 65535;
dou %len(Data) = 0;
Data = RXS_GetStmf( GetStmfDS );
…
enddo;
RXS_ResetDS( PutStdOutDS : RXS_DS_TYPE_PUTSTDOUT );
PutStdOutDS.HeaderStatusCode = 500;
PutStdOutDS.HeaderStatusText = ‘SOAP Fault’; PutStdOutDS.HeaderContentType = ‘text/xml’;
RXS_PutStdOut( gXml : PutStdOutDS );
RXS_ResetDS( GetStdInDS : RXS_DS_TYPE_GETSTDIN );
GetStdInDS.Stmf = ‘/tmp/over16mb.xml’;
RXS_GetStdIn( GetStdinDS );
RXS_ResetDS( gPutStdOutDS : RXS_DS_TYPE_PUTSTDOUT );
gPutStdOutDS.HeaderContentType = ‘text/xml’;
gPutStdOutDS.Stmf = ‘/tmp/over16mb.xml’;
RXS_PutStdOut( *Omit : gPutStdOutDS );
# Timestamp: 2015-09-22-14.16.05.604000
# Product: RPG-XML Suite
# Version: 3.20
# JobCcsid: 37
# URI: http://www.w3schools.com/webservices/tempconvert.asmx
# RequestStmf:
# ResponseStmf:
# RequestCcsid: 1208
# ResponseCcsid: 65535
# ResponseStmfCcsid: 1208
# Timeout: 60
Interested in installing or upgrading to the newest version of RPG API Express?
Contact our support team here.
Coming next to RPG API Express? JSON composition and parsing!