

IMS SOAP Gateway – An SOA solution for IMS transactions from CCR2, Issue 11 - 2006
 |
Srividhya Srinivasan
IMS Developer for On Demand solutions
|
 |
Leilei Li
IMS Developer for On Demand solutions
|
 |
Bill Huynh
IMS Connect Developer
|



IMS SOAP Gateway is a Web service solution for IMS. It integrates IMS assets into the Service Oriented Architecture (SOA) by exposing an IMS transaction as a Web service in an On Demand environment.
Why do we need Web services and SOA? SOA is an architectural framework that takes everyday business applications and breaks them down into individual business functions such as Web services. A Web service uses a standard interface for publishing and discovering services, and communicating between service provider and service consumer, independent of platform and language.
Together, SOA and Web services provide an architecture and programmatic interface based on open standards to allow distributed components to interoperate. Web services typically use the SOAP (Simple Object Access Protocol) over HTTP protocol to communicate with one another, with XML as the mechanism for information exchange.
IMS SOAP Gateway provides an HTTP/SOAP endpoint or an HTTPs/SOAP endpoint to accept and process SOAP requests that follow the industry standards (SOAP 1.1, WSDL 1.1, WS-I BP 1.0). It supports IMS as a SOAP server that allows different types of client applications, such as Microsoft .NET, Java, and third-party applications, to submit SOAP requests to IMS to drive the business logic of the IMS applications.
IMS SOAP Gateway V9.2 can enable an IMS COBOL application to become a Web service without modifying the COBOL application. To do this, it uses the IMS Connect XML message conversion support and XML converters.
Message flow Figure 1 shows the flow of messages from the end client to IMS and back.
 Figure 1: Flow of messages from end client to IMS and back
The IMS SOAP Gateway processes a SOAP request by stripping off the SOAP headers and passing the XML payload to IMS Connect. This can be sent in plain format or over an SSL connection to protect the message.
When IMS Connect receives the XML request, the IMS Connect XML message conversion function can transform the XML request message into the application data format that the IMS COBOL application expects. IMS Connect performs the data transformation by calling the XML Adapter, and in turn, the XML Adapter calls the XML converter to convert the XML to the specific application data format. IMS Connect then sends the converted application data message to IMS.
The IMS COBOL application processes the application data message as if it were a normal transactional message. The response application data message returned from the IMS COBOL application is converted into XML when it is received by IMS Connect, and then sent out to the IMS SOAP Gateway in plain format or encrypted using SSL. The IMS SOAP Gateway adds SOAP headers to the XML response and sends the SOAP message back to its client.
The XML converters called by the XML Adapter are specific to each COBOL application. They can be generated by WebSphere Developer for zSeries using the COBOL copybook of the COBOL application. The IMS SOAP Gateway specifies to IMS Connect which XML converter to use for data transformation for the intended IMS COBOL application.
The IMS Connect XML message conversion support is available from IMS V9 APARs PK24912 and PK29938.
Tools and usage scenario To ease development and deployment of Web services, we provide two features in the IMS SOAP Gateway:
 |
A Deployment utility that provides an interactive user interface with tasks to enable and maintain your IMS applications as a Web Service. This is a one-stop-shop to setup and maintain all the IMS SOAP Gateway properties. |
 |
 |
The IMS SOAP Gateway Administrative Console that lists the deployed Web services and provides a view of the Web service's WSDL (Web service description language) file. This can be used to easily keep track of all the available Web services. |
In addition to the above, we recommend using the WebSphere Developer for zSeries (WDz) for generating the Web services artifacts. The following steps outline what needs to be done in order to convert an IMS transaction to a Web service in the IMS SOAP Gateway using these tools.
Step 1. Generate the Web service artifacts To convert an IMS application into a Web service, you need a WSDL file. The WSDL file is the Web service interface for the IMS application. It describes where the Web Service is located, and what the input and output messages look like for invoking your IMS application. In addition, you need a converter program that can be used by the IMS Connect XML Adapter function to help you to handle the XML data from the client such that you do not need to modify your IMS application.
IBM's WDz is an application development tool designed for developing and modernizing traditional mainframe applications. Using just the COBOL copybook, WDz guides you through a simple and user-friendly wizard that generates the following Web services artifacts in just a couple of clicks:
 |
WSDL file, which provides a Web service interface of the IMS application so that the client can communicate with the Web service. |
 |
 |
COBOL converters and driver file, which help you to transform the XML message from the client into COBOL bytes for the IMS application and vice versa. |
 |
 |
Correlator file, which contains information that enables IMS SOAP Gateway to set IMS properties and call the IMS application. |
The wizard in WDz will parse your COBOL copy book and show you all the data structures. You can select the input and output data structures of your IMS application that you want to expose in the Web service. You will then be prompted for a few converter and WSDL options with default values you can keep or modify. After that, with the click of the 'Finish' button, all the Web services artifacts are generated for you.
Step 2: Deploying to IMS Connect Next, you have to take the generated converter driver programs and deploy them to IMS Connect. The IMS Connect XML Adapter function will invoke the converter programs at run time to transform the XML data from the client into COBOL bytes such that you do not need to modify your IMS application.
Step 3: Deploying to IMS SOAP Gateway In the final step, you have to use Task 1 of the IMS SOAP Gateway deployment utility to take the WSDL file, set up properties and create runtime code for IMS SOAP Gateway. You can use the deployment utility in its batch mode or an interactive mode that can walk you through the whole deployment process from end-to-end. Once the deployment step is completed, you can view your IMS application presented to you as a WSDL file through the IMS SOAP Gateway Administrative Console.
The Web service is now ready to be invoked.



|