A SOAP example

A CICS® TS SOAP application:
  1. Retrieves a UTF8 or UTF16 message from a socket or MQ message queue.
  2. Puts the message into a container, in UTF8 format.
  3. Puts EBCDIC data structures into other containers on the same channel.
  4. Makes a distributed program link (DPL) call to a handler program on a back-end AOR, passing the channel.

The back-end handler program, also running on CICS TS, can use EXEC CICS GET CONTAINER commands to retrieve the EBCDIC data structures or the messages. It can get the messages in UTF8 or UTF16, or in its own or the region's EBCDIC code page. Similarly, it can use EXEC CICS PUT CONTAINER commands to place data into the containers, in UTF8, UTF16, or EBCDIC.

To retrieve one of the messages in the region's EBCDIC code page, the handler can issue the command:
EXEC CICS GET CONTAINER(input_msg) INTO(msg) 
Because the INTOCCSID option is not specified, the message data is automatically converted to the region's EBCDIC code page. (This assumes that the PUT CONTAINER command used to store the message data in the channel specified a DATATYPE of CHAR; if it specified a DATATYPE of BIT, the default, no conversion is possible.)
To return some output in the region's EBCDIC code page, the handler can issue the command:
EXEC CICS PUT CONTAINER(output) FROM(output_msg) 
Because CHAR is not specified, no data conversion will be permitted. Because the FROMCCSID option is not specified, the message data is taken to be in the region's EBCDIC code page.
To retrieve one of the messages in UTF8, the handler can issue the command:
EXEC CICS GET CONTAINER(input_msg) INTO(msg) INTOCCSID(utf8)
The INTOCCSID option is necessary to prevent automatic conversion of the data to the region's EBCDIC code page.
To return some output in UTF8, the server program can issue the command:
EXEC CICS PUT CONTAINER(output) FROM(output_msg) FROMCCSID(utf8)
The FROMCCSID option specifies that the message data is currently in UTF8 format. Because CHAR is not specified, no data conversion will be permitted.