Exposing COBOL as Web Services

Describes how Visual COBOL and Enterprise Server support native and JVM COBOL applications as Web services.

Using Visual COBOL, you can choose from several methods provided to expose COBOL as Web services, and in some cases, deploy and run your Web services on Enterprise Server. In addition, you can also generate client applications to access your Web services.

JVM COBOL
COBOL deployed under a Java Virtual Machine (JVM) can take advantage of Java SDKs and frameworks such as the Web Tooling Platform (WTP). This enables Web services integration with Tomcat and other application servers.

Because Eclipse tools are configured to generate Java Web services and not COBOL Web services, you must use Java on the front end. A Java class receives the request and then calls COBOL to perform the back-end processing.

JVM COBOL supports all Web service protocols provided by the Java Web services framework, including REST, but does not support the generation of COBOL clients from WSDL or JSON.

Calling COBOL from Another Language
You can call COBOL using any of a wide variety of other programming languages. Some of these languages have direct Web services support through tooling and Application Server deployment.
CAUTION:
When developing a Web service using this method, be sure to include a failsafe to address the scenario in which the COBOL program crashes or issues a STOP RUN when executed in the same process of an Application Server. Failure to address this scenario introduces the risk of bringing down the Application Server.