XML-based services are web service provider or requester
applications that use XML to interface with other applications and
use a binding to transform the data. XML-based services are available
to
CICS®
applications that use
the
INVOKE SERVICE
API command or to business services
that are on an external network.
About this task
You can either create web services using the web services
support in
CICS
or you can
use
IBM® Developer for z/OS.
If you use
IBM Developer for z/OS
,
you can also create an SCA component from your web service. The
advantages
to creating a component from a web service are as follows:
-
You can more easily reuse existing components to rapidly develop
new composite applications using
IBM Developer for z/OS.
- You can use SCDL to describe the web service, moving the
configuration
information out of the application and into metadata that is easier
to change without having to change the application. For example, if
you want to run a web service under different transaction and user
IDs, you can change the SCDL without having to regenerate the Web
service binding file.
In
SCA, the application program that you want to expose as a
web service is the implementation of the business logic. The application
program is defined in the <Implementation> element of a component.
The component service describes the interface to the application
program
in WSDL. A component has one interface, which can contain a number
of operations and bindings.
Procedure
-
Create a composite using
IBM Developer for z/OS.
-
Specify the application program name as the component
implementation.
-
If you want the service to be available externally to
CICS
, add the web service binding
to the appropriate service or reference. If you want the service to
be available to
CICS
applications
only, add the
CICS
binding
to the appropriate service or reference and select the
mapped
mapping
mode in the tooling.
The tooling describes the binding
in the SCDL. The SCDL also includes the data mappings that
transform
the XML to the appropriate high-level language.
-
Define imports on the composite reference.
Imports
define the dependencies of the composite that must be satisfied in
the
CICS
region.
-
Deploy the composite to
CICS
as
a bundle.
IBM Developer for z/OS
generates
the bundle manifest and packages the SCDL and other artifacts for
you. The manifest describes all the resources and metadata that
CICS
requires to successfully install
a BUNDLE resource; the BUNDLE resource represents the composite in
the
CICS
region. The manifest
defines the composite as an SCACOMPOSITE resource type and references
the location of the SCDL using a relative path.
-
Create and install the BUNDLE resource.
You can optionally set an SCA domain on the BUNDLE resource
definition. An SCA domain
typically represents a set of services that provide an area of business
function. You can install
the same bundle using different SCA domains, because
CICS
identifies the service by combining the SCA domain and the name of
the service. For details and
examples of how to add an SCA domain, see
Scoping of bundles.
You must
ensure that all prerequisites of the bundle are available in the
CICS
region for the BUNDLE resource to install successfully.
When the BUNDLE
resource installs successfully,
CICS
creates
the WEBSERVICE and URIMAP resources for you using the information
from the manifest and SCDL.
CICS
also
checks that the resources defined in the Imports section of the Reference
are present in the
CICS
region.
The Imports define the prerequisites for the application.
Results
Your web service is successfully installed in
CICS.
What to do next
You can test and validate that the web service works as expected.
You can view the BUNDLE resource and its contents using the
IBM CICS Explorer®.
You can also enable and disable the BUNDLE resource to manage all
the resources together.