To create a web service from a WSDL document that uses
Web Services Addressing (WS-Addressing), use parameters on the web
services assistant to handle the conversion from XML to language structures.
About this task
You can use the web services assistant job, DFHWS2LS, to
control how an end point reference (EPR) is handled in the WSDL document
and determine whether CICS constructs default input, output, and fault
actions.
Procedure
- Set the MINIMUM-RUNTIME parameter
on the web services assistant, DFHWS2LS, to 3.0 or
higher.
A runtime level of at least 3.0 ensures that any
generated web service binding fully supports WS-Addressing and can
interoperate with other web services platforms.
- Set the MAPPING-LEVEL parameter on
the web services assistant, DFHWS2LS, to 3.0 or higher.
- Set the WSADDR-EPR-ANY parameter to TRUE if
you want to use
wsa:EndpointReferenceType type elements
in the request or response messages. End point references
can be included in application data and you have the option of using
the EPR in API commands such as WSACONTEXT BUILD.
Setting the WSADDR-EPR-ANY parameter to TRUE indicates
that CICS® must not transform
the EPR into a language structure at run time; instead, CICS treats the EPR data as an <xsd:any>
element and stores it in a named container.
This
example WSDL fragment shows a <wsa:To> MAP being passed as an element
of type
wsa:EndpointReferenceType:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="exampleEPR" targetNamespace="http://example.ibm.com/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:s0="http://example.ibm.com/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
<types>
<xs:schema targetNamespace="http://test.org/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://example.ibm.com/"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
...
<xs:element name="exampleResponse" type="s0:typeResponse"/>
<xs:complexType name="typeResponse">
<xs:sequence>
<xs:element name="myEpr" type="wsa:EndpointReferenceType"/> 1
</xs:sequence>
</xs:complexType>
...
</xs:schema>
</types>
...
<message name="msgResponse">
<part element="s0:exampleResponse" name="response"/>
</message>
...
</definitions>
When the element, <xs:element
name="myEpr" type="wsa:EndpointReferenceType"/> 1 ,
is processed by DFHWS2LS with the WSADDR-EPR-ANY parameter
set to TRUE, the myEpr element data
is stored in a named container as an <xsd:any> element and a pointer
to the container added to the generated language structure.
For
example, the COBOL language structure generated by DFHWS2LS for the
myEpr element
is shown here:
09 myEpr.
12 myEpr-xml-cont PIC X(16).
12 myEpr-xmlns-cont PIC X(16).
The
myEpr-xml-cont container
stores the name of the container that contains the
myEpr data.
The
myEpr-xmlns-cont is an optional container that
is populated with any XML namespace declarations that are in scope.
- Save and submit the DFHWS2LS job.
Results
CICS creates a web service binding to handle the data transformation
and language structures that you can use to create the service requester
or provider application.
What to do next
To enable the web service, perform a pipeline scan to create
the required CICS resources.