An Introduction to Web Services

An Introduction to Web Services

This article series will show you how to create applications like Bridging Two Worlds, where a web service provides data to a client program. We should understand how a web service works.

When you click a link like https://www.jazzsoftware.co.nz/ your browser obtains an IP address from a “Domain Name Server” (DNS), then sends a request to the IP address, where a particular page from a folder is located and returned. The text returned to the browser will be a stream of characters mixing HTML codes like <b>… </b> with data. HTML means “HyperText Markup Language”, and is a standard way of describing the data’s format (for example <b>... </b> means “Bold”).? However, it doesn’t describe the meaning of the data, so it would be very difficult for a program to interpret the data: for example, that the string of characters just after the text “Account Number” could be used to look up a value of CustID in file CustF.

A web service is like a web page, but one designed to return information to another program rather than to a human reader. A web service returns html, but instead of formatting information it describes the data in a standard way. The original web service standard was SOAP/WSDL, but this has been supplanted by REST/JSON. Bridging Two Worlds, which combines programs on different computers using different technologies, is an example of "Service Oriented Architecture"

We develop service and client programs in the languages that are suitable for the task and our experience.? CICS Web Services are often developed in COBOL, and client programs that request these services are often developed with Java.? The point of web services is that these two programs can communicate, even though the COBOL program doesn’t know anything about Java, and the Java program doesn’t know anything about COBOL.? To enable this to happen, the Java request is turned into a JSON input message which is sent to the REST server where a pipeline (a sequence of programs) converts the JSON to COBOL and passes this to our COBOL web service.? This COBOL program does its thing and returns its output as a COBOL data structure which goes back through the pipeline with the reverse conversion so that JSON is sent back to the requestor.? The process is shown in the diagram above, Redbook SG247126 gives more detail.

If you're using a z/OS mainframe, it needs to be set up so that it can handle web services, both as provider and requestor, and we need to configure Jazz so that it can create these web services.? You’ll only need to do this once for your project, then you and other project team members can simply use this set-up. For more detail, Z/OS users, click here. Micro Focus users, click here.

An important takeaway: each programmer deals only with their own language - COBOL, Java, etc. But even if the developer of the COBOL web service isn't concerned with JSON or the Java client, developing a web service is not easy with COBOL. In the next article we'll get started with MANASYS Jazz, making it much easier.

See our web page if you want more information about MANASYS Jazz and to see what it can do. Contact us if you have any questions, or connect with us on LinkedIn. Download a free evaluation copy to try out MANASYS Jazz yourself.


要查看或添加评论,请登录

社区洞察

其他会员也浏览了