Web service support for the example application
The Web service support extends the example application, providing a Web client front end and two versions of a Web service endpoint for the order dispatcher component.
- WebSphere® Application Server Version 5 Release 1 or later
- WebSphere Studio Application Developer Version 5 Release 1 or later with a WebSphere unit test environment
- WebSphere Studio Enterprise Developer Version 5 Release 1 or later with a WebSphere unit test environment
The second version of the Web service endpoint is supplied as a CICS® service provider application program (DFH0XODE).
Configuring code page support
As supplied, the example application uses two coded character sets. You must configure your system to enable data conversion between the two character sets.
About this task
- CCSID
- Description
- 037
- EBCDIC Group 1: USA, Canada (z/OS®), Netherlands, Portugal, Brazil, Australia, New Zealand)
- 1208
- UTF-8 Level 3
Procedure
CONVERSION 1208,037;
Installing Web service support
Before you can run the Web service support for the example application, you must create two HFS directories, and create and install a number of CICS resource definitions.
Example
Creating the HFS directories
Web service support for the example application requires a shelf directory and a pickup directory in the Hierarchical File System (HFS).
About this task
The shelf directory is used to store the Web service binding files that are associated with WEBSERVICE resources. Each WEBSERVICE resource is, in turn, associated with a PIPELINE. The shelf directory is managed by the PIPELINE resource and you should not modify its contents directly. Several PIPELINES can use the same shelf directory, as CICS ensures a unique directory structure beneath the shelf directory for each PIPELINE.
The pickup directory is the directory that contains the Web service binding files associated with a PIPELINE. When a PIPELINE is installed, or in response to a PERFORM PIPELINE SCAN command, information in the binding files is used to dynamically create the WEBSERVICE and URIMAP definitions associated with the PIPELINE.
The example application uses /var/cicsts for
the shelf directory.
A pipeline will read in an XML pipeline configuration file at install time. It is therefore also useful to define a directory in which to store these.
Creating the PIPELINE definition
The complete definition of a pipeline consists of a PIPELINE resource and a pipeline configuration file. The file contains the details of the message handlers that will act on Web service requests and responses as they pass through the pipeline.
About this task
The example application uses the CICS-supplied SOAP 1.1 handler to deal with the SOAP envelopes of inbound and outbound requests. CICS provides sample pipeline configuration files which you can use in your service provider and service requester.
More than one WEBSERVICE can share a single PIPELINE, therefore you need define only one pipeline for the inbound requests of the example application. You must, however, define a second PIPELINE for the outbound requests as a single PIPELINE cannot be configured to be both a provider and requester pipeline at the same time.
Procedure
Creating a TCPIPSERVICE
As the client connects to your Web services over an HTTP transport you must define a TCPIPSERVICE to receive the inbound HTTP traffic.
Procedure
Dynamically installing the WEBSERVICE and URIMAP resources
Each function exposed as a Web service requires a WEBSERVICE resource to map between the incoming XML of the SOAP BODY and the COMMAREA interface of the program, and a URIMAP resource that routes incoming requests to the correct PIPELINE and WEBSERVICE. Although you can use RDO to define and install your WEBSERVICE and URIMAP resources, you can also have CICS create them dynamically when you install a PIPELINE resource.
Procedure
- CEDA INSTALL PIPELINE(EXPIPE01) G(EXAMPLE)
- CEDA INSTALL PIPELINE(EXPIPE02) G(EXAMPLE)
.wsbind suffix, CICS installs
a WEBSERVICE and a URIMAP if one does not already exist. Existing
resources are replaced if the information in the binding file is newer
than the existing resources.When the PIPELINE is later disabled and discarded all associated WEBSERVICE and URIMAP resources will also be discarded.
If you have already installed the PIPELINE, use the PERFORM PIPELINE SCAN command to initiate the scan of the PIPELINE's pickup directory.
dispatchOrderdispatchOrderEndpointinquireCataloginquireSingleplaceOrder
I WEBS
STATUS: RESULTS - OVERTYPE TO MODIFY
Webs(dispatchOrder ) Pip(EXPIPE02)
Ins Dat(20041203)
Webs(dispatchOrderEndpoint ) Pip(EXPIPE01)
Ins Uri(£539140 ) Pro(DFH0XODE) Com Dat(20041203)
Webs(inquireCatalog ) Pip(EXPIPE01)
Ins Uri(£539141 ) Pro(DFH0XCMN) Com Dat(20041203)
Webs(inquireSingle ) Pip(EXPIPE01)
Ins Uri(£539142 ) Pro(DFH0XCMN) Com Dat(20041203)
Webs(placeOrder ) Pip(EXPIPE01)
Ins Uri(£539150 ) Pro(DFH0XCMN) Com Dat(20041203)
WEBSERVICE(dispatchOrderEndpoint) represents the local CICS implementation of the dispatch order service.
Creating the WEBSERVICE resources with RDO
As an alternative to using the PIPELINE scanning mechanism to install WEBSERVICE resources, you can create and install them using Resource Definition Online (RDO).
Before you begin
Procedure
Creating the URIMAP resources with RDO
As an alternative to using the PIPELINE scanning mechanism to install URIMAP resources, you can create and install them using Resource Definition Online (RDO).
Before you begin
Procedure
Completing the installation
To complete the installation, install the RDO group that contains your resource definitions.