SOAP messages and the application data structure
In many cases, the CICS® web services assistant can
generate the code to transform the data between a high-level data
structure used in an application program, and the contents of the <Body>
element
of a SOAP message. In these cases, when you write your application
program, you do not need to parse or construct the SOAP body; CICS will
do this for you.
- The web service binding file
This file is generated by the CICS web services assistant from an application language data structure, using utility program DFHLS2WS, or from a web service description, using utility program DFHWS2LS. CICS uses the binding file to generate the resources used by the web service application, and to perform the mapping between the application's data structure and the SOAP messages.
- The web service description
This may be an existing web service description, or it may be generated from an application language data structure, using utility program DFHLS2WS. CICS uses the web service description to perform full validation of SOAP messages.
In both cases, the execution environment that allows a particular CICS application program to operate in a web services setting is defined by three objects. These are the pipeline, the web service binding file, and the web service description. The three objects are defined to CICS as attributes of the WEBSERVICE resource definition.
- When the same data cannot be represented in the SOAP message and
in the high-level language.All the high-level languages that CICS supports, and XML Schema, support a variety of different data types. However, there is not a one-to-one correspondence between the data types used in the high-level languages, and those used in XML Schema, and there are cases where data can be represented in one, but not in the other. In this situations, you should consider one of the following:
- Change your application data structure. This may not be feasible, as it might entail changes to the application program itself.
- Construct a wrapper program, which transforms the application data into a form that CICS can then transform into a SOAP message body. If you do this, you can leave your application program unchanged. In this case CICS web service support interacts directly with the wrapper program, and only indirectly with the application program.
- When your application program is in a language which is not supported
by the CICS web services assistant.In this situation, you should consider one of the following:
- Construct a wrapper program that is written in one of the languages that the CICS web services assistant does support (COBOL, PL/I, C or C++).
- Instead of using the CICS web services assistant, write your own program to perform the mapping between the SOAP messages and the application program's data structure.