Depending on the chosen application architecture for your RPG Web Services, you may prefer to use separate programs or modules to do the XML parsing, composing and other tasks. With RXS_handOff(), the programmer can dynamically invoke a subprocedure in a service program defined outside of the mainline program. RXS_handOff will take care of activating the specified service program and subprocedure and specify where the program should find the incoming XML file and where it should put the outgoing XML file.

The example program called DOORWAY demonstrates how to implement this architecture. This subprocedure works best when offering an RPG Web Service instead of when using a remote web service.

The subprocedure & service program containing it must be defined in a data structure like RXS_Subproc.

Subprocedure Prototype

D RXS_handOff...
D                 pr                  like(RXS_Error)

Used to hand control over to a non-RXS handler.

D  pHandOff                           likeds(RXS_SubProc)


Information describing the external service program and subprocedure to which the process will be handed off.

D  pInXml                             value like(RXS_FilePath)


The qualified IFS file path of the request XML document.

D  pOutXml                            like(RXS_FilePath)


The qualified IFS file path in which the service program should place the response XML.