Mainframe Proxy runtime (C2wsrt) overview

The LegStar C2wsrt project provides a servlet-based runtime for proxies. A proxy is a service that acts as an intermediary when mainframe programs need to consume Web Services or pure Java objects (POJO).

For each target Web Service or POJO that needs to be exposed to Mainframe programs, there needs to be a a proxy servlet that uses the C2wsrt runtime. Such proxy servlets are typically generated using the Service Generator.

Mainframe requests arrive as HTTP POST requests on a servlet engine such as Tomcat. The content of the HTTP POST request is binary and contains the EBCDIC request data sent from the mainframe. This means the mainframe does not deal with XML or code page conversions.

C2wsrt extracts the raw EBCDIC data from the HTTP POST payload and uses the COBOL Binding Runtime to marshal/unmarshal mainframe data into Java or XML.

In the case of a target Web Service, once the request is expressed in XML, C2wsrt uses the standard JAX-WS API to actually call the target Web Service. Once an XML reply is received from the target web service, c2wsrt marshals the XML into a mainframe buffer and sends it back to the mainframe program.

For target POJOs, C2wsrt converts the mainframe payload to Java and calls the target method passing the Java object as argument. The method returns another Java object that C2wsrt converts back to mainframe format and sends back in the HTTP reply body.

Mainframe programs need an HTTP API to call the servlet. You can use the standard CICS APIs for instance (DFHWBCLI or EXEC CICS WEB). C2wsrt also comes with its own HTTP API if you need one. The C library for the LegStar HTTP API (LSHTTAPI) is located in the zos/C370 folder.

For instructions on how to install and configure this transport follow this link.