Web Services and the Mainframe - of course they go together
timhahn 100000F0AC Comment (1) Visits (23656)
I spoke with a customer the other day who is looking for a way to call a web service from a COBOL program running in batch, running on a z/OS system. After thinking about it, I realized that more people than just this one customer might be interested in this topic, so I've made a blog entry about it.
I typically refer to this type of thing as an "outbound" web service call. The web service implementation happens to be written in Java, runs on a Windows Server, and front-ends a SQL Server database. The COBOL batch application needs to retrieve some information from the SQL Server database as part of its batch processing.
I talked about 3 high level approaches:
There were also some questions about whether or not there would be issues in calling a web services within a long running batch program loop. I indicated that no matter what, there's going to be some added latency in contacting another system and retrieving data from that system. What we typically recommend is that if the number of individual items to process in a given time is very high, then consider creating another web service which allows for making a batch of requests through a single web services call. Then use the information returned within the batch program "inner loop", alleviating the need to call the web service on every iteration.
Note that there do exist all sorts of tools to make the job of connecting the different data formats involved above together. There are WSDL files describing the web services, COBOL data structures (COPYBOOKs), Java classes, MQ message queue data formats, and so on. Some of these tools generate source code (Java, COBOL, and even PL/I), others generate configuration settings for various environments, and some do both. Which tool is best for you depends on which of the paths you choose to take from those listed above.