Skip to main content

CICS Web Service Compatibility


IBM has done significant work to allow mainframe based applications to expose and consume web services.  They’ve particularly targeted CICS and languages COBOL, PL/I and C++. 

While many vendors (including IBM) offer a variety of tools to provide easy web service bridging, IBM’s CICS efforts offer a direct path without loading and managing additional utilities.  There was concern in the past of the CPU load this added to CICS, but IBM handled those problems over the years with the current edition having good performance with reasonable overhead.

While IBM recommends using modern development tools such as their Rational Application Developer for Z/Os (RD for Z) to automatically generate and build the binding and WSDL’s necessary for a service, their CICS command line based utility is probably used by most that do so (this being DFHLS2WS).  With a short series of configuration sessions (and limited options), it will take program information and data areas and generate appropriate WSDL and binding files.

Which is where it gets interesting.

IBM’s mainframe folks have worked hard to generate a very exacting and 100% compliant WSDL while dealing with the difficult aspects of fixed length fields, fixed array quantities, EBCIDIC to UTF-8 translations, and unique language storage models (such as COBOL’s COMP-3 packed decimal field).  For the most part they’ve done a good job of mapping 2nd generation languages’ internal storage models to XML and the latest schema/XSD capabilities.  But in a few areas they’ve seriously fallen down.

1. Arrays.  Empty arrays are sent through in XML as…repetitive empty copies of the field/tag.  So if in COBOL you have a 05 PHONE-NUMBERS PIC X(9) OCCURS 50 (that’s an array of fields called phone-numbers of 9 characters), in XML you get <PHONE-NUMBERS> repeated 50 times, with no values if empty but still there.

2. There’s sophisticated namespace usage by IBM in the resulting WSDL, with the WSDL having one namespace, the request tags having another and the response tags having a third.  At the start of each section the DFHLS2WS utility names an XSD complex type “ProgramInterface”.  Before doing that they change the namespace, but to NOT tag the names in the section with the namespace.  The strict rules of XSD’s say this is acceptable.  BUT when .Net programmers import the CICS generated WSDL into Visual Studio or Java programmers import it into Eclipse (including IBM’s Rational Application Developer for Websphere), these tools reject the WSDL due to a duplicate name (the repeating of ProgramInterface without the namespace pre-pended but after the namespace change).

Technically, that’s a bug in Visual Studio, Eclipse and Rational Application Developer, as those tools aren’t handling the namespace change and implicitly placing the names in that section in the namespace.

Practically it means IBM’s CICS team outsmarted themselves with the XSD sophistication of the output of DFHLS2WS, using a feature that’s not well supported by the developers of the development tools that will be importing the resulting WSDL.

Interoperability standards are critical.  But vendor interoperability isn’t perfect.  While we shouldn’t have to go to the lowest common denominator, going to the highest isn’t wise.

[ There is no solution for this particular DFHLS2WS problem beyond writing a utility to automatically modify the output WSDL, or manually modifying it.  Maddeningly the IBM documentation even says it is likely to need to be modified rather than offering options or flexibility! ]

Popular posts from this blog

Integration Spaghetti™

  I’ve been using the term Integration Spaghetti™ for the past 9 years or so to describe what happens as systems connectivity increases and increases to the point of … unmanageability, indeterminate impact, or just generally a big mess.  A standard line of mine is “moving from spaghetti code to spaghetti connections is not an improvement”. (A standard “point to point connection mess” slide, by enterprise architect Jerry Foster from 2001.) In the past few days I’ve been meeting with a series of IT managers at a large customer and have come up with a revised definition for Integration Spaghetti™ : Integration Spaghetti™ is when the connectivity to/from an application is so complex that everyone is afraid of touching it.  An application with such spaghetti becomes nearly impossible to replace.  Estimates of change impact to the application are frequently wrong by orders of magnitude.  Interruption in the integration functioning are always a major disaster – both in terms of th

Solving Integration Chaos - Past Approaches

A U.S. Fortune 50's systems interconnect map for 1 division, "core systems only". Integration patterns began changing 15 years ago. Several early attempts were made to solve the increasing problem of the widening need for integration… Enterprise Java Beans (J2EE / EJB's) attempted to make independent callable codelets. Coupling was too tight, the technology too platform specific. Remote Method Invocation (Java / RMI) attempted to make anything independently callable, but again was too platform specific and a very tightly coupled protocol. Similarly on the Microsoft side, DCOM & COM+ attempted to make anything independently and remotely callable. However, as with RMI the approach was extremely platform and vendor specific, and very tightly coupled. MQ created a reliable independent messaging paradigm, but the cost and complexity of operation made it prohibitive for most projects and all but the largest of Enterprise IT shops which could devote a focused technology

From Spaghetti Code to Spaghetti Connections

Twenty five years ago my boss handed me the primary billing program and described a series of new features needed. The program was about 4 years old and had been worked on by 5 different programmers. It had an original design model, but between all the modifications, bug fixes, patches and quick new features thrown in, the original design pattern was impossible to discern. Any pattern was impossible to discern. It had become, to quote what’s titled the most common architecture pattern of today, ‘a big ball of mud’. After studying the program for several days, I informed my boss the program was untouchable. The effort to make anything more than a minor adjustment carried such a risk, as the impact could only be guessed at, that it was easier and less risky to rewrite it from scratch. If they had considered the future impact, they never would have let a key program degenerate that way. They would have invested the extra effort to maintain it’s design, document it property, and consider