CICS Transaction Server V 3 1 Web Services
CICS Transaction Server V 3. 1 Web Services - Part 1 Takahiro Ishiwatari ishwtari@jp. ibm. com © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Acknowledgements § The following are trademarks of International Business Machines Corporation in the United States, other countries, or both: IBM, CICS/ESA, CICS TS, CICS Transaction Server, DB 2, MQSeries, OS/390, Web. Sphere, z/OS, z. Series, Parallel Sysplex. § Java, and all Java-based trademarks and logos, are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. § Microsoft, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. § Other company, product, and service names and logos may be trademarks or service marks of others. 3 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Agenda § Web Services introduction § SOAP for CICS feature § Web Services in CICS TS V 3. 1 § WSDL § Application development § New utility programs • Web services binding file • DFHLS 2 WS • DFHWS 2 LS 5 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Web Services introduction § An architecture for application to application interoperation • base on SOA (Service-Oriented Architecture) • enables open/dynamic B 2 B integration • Core technologies used in Web Services – – SOAP XML WSDL UDDI § SOAP (Simple Object Access Protocol) SOAP • Light-weight protocol for distributed environment – XML based – independent of transport protocol > HTTP, JMS, etc. • used for communication between requester/provider <SOAP-ENV: Envelope xmlns: SOAP-ENV="http: //・・・/" > <SOAPENV: Body> <symbol>ABC</symbol> <Quote>073</Quote> </SOAP-ENV: Body> </SOAP-ENV: Envelope> § CICS addresses the requester/provider elements in Web Services 7 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 SOAP for CICS feature § Feature for CICS TS V 2. 2 and V 2. 3 • Provides the ability to handle SOAP messages in CICS • Two types of transport supported – HTTP – WMQ • CICS can be a service provider or a service requester • User replaceable program for specialized processing – Header handling – Message formatting • XML processing – XML parser of Enterprise COBOL for z/OS and OS/390 can be used to help convert XML messages to language structures (i. e. COMMAREAs) > WSED provided XML enablement tool can be used to create converters 9 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 SOAP for CICS inbound § SOAP message will get processed through a pipeline • Pipeline executed as a BTS process • Create message adaptor to convert XML and language structure • Message handlers and application mapper are user replaceable CICS TS V 2 Pipeline SOAP message Service Requester CICS Web Support service provider transport message handler envelope parser or Web. Sphere MQ service provider transport 11 application mapper message handler envelope builder message adaptor Business Logic © 2005 IBM Corporation
CICS Transaction Server V 3. 1 SOAP for CICS outbound § Outbound messages will also go through a pipeline • Pipeline executed as a BTS process • Create message adaptor to convert XML and language structure • Message handlers are user replaceable CICS TS V 2 Pipeline envelope builder Business Logic message adaptor service provider transport outbound router Outbound HTTP Support or envelope parser 13 message handler service provider transport SOAP message Service Provider Web. Sphere MQ © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Web Services in CICS TS V 3. 1 § Evolution of SOAP for CICS feature • New infrastructure to act as a first class Web service end-point – Support for SOAP 1. 1 & 1. 2, WS-Atomic. Transaction, WS-Security • Fully integrated into CICS – RDO, system management, problem determination, monitoring & statistics, etc. • New tooling support for easier application development § New features • Resource definitions – URIMAP, PIPELINE, WEBSERVICE • Flexible configuration of the pipeline • Utility programs to – generate language structure from WSDL – generate WSDL from language structures • Data mapping support in runtime – Between SOAP messages and language structures • New EXEC CICS API to support outbound requests • no longer uses BTS 15 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Resources for CICS as a service provider § HTTP transport SOAP message Service Requester CICS TS V 3. 1 TCPIPSERVICE CSOL CWXN CPIH Pipeline URIMAP matching HFS pipeline config WSDL URIMAP handlers dynamic install WSBind handlers PIPELINE dynamic install CICS Web services assistant handlers WEBSERVICE data mapping Business Logic Language structure 17 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Resources for CICS as a service requester CICS TS V 3. 1 User Transaction § HTTP transport Business Logic HFS EXEC CICS INVOKE WEBSERVICE data mapping Pipeline WSBind CICS Web services assistant dynamic install PIPELINE Language structure WSDL handlers pipeline config handlers Service Provider SOAP message 19 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Web. Sphere MQ transports Web. Sphere MQ CICS TS V 3. 1 CKTI CPIQ CPIL SOAP message Service Requester Pipeline URIMAP matching URIMAP Business Logic PIPELINE WEBSERVICE CICS TS V 3. 1 User Transaction Business Logic EXEC CICS INVOKE WEBSERVICE Web. Sphere MQ PIPELINE WEBSERVICE Pipeline SOAP message 21 Service Provider © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Web Services - Notes This diagram illustrates the flow when Web. Sphere MQ transport is used. For a service provider, the arrival of the SOAP message will trigger CPIL transaction which will match the incoming URI with the URIMAP definition. The pipeline will run under a transaction which default is CPIQ. The pipeline processing will be the same as HTTP transports. 22 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 WSDL § Web Services Description Language • XML based language to describe an interface of a service • WSDL comprises of – – – – type message port. Type operation binding service port Web service description type Service interface definition message port. Type operation Input Output binding Service implementation definition 23 service port © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Sample WSDL <? xml version="1. 0" encoding="UTF-8"? > <wsdl: definitions target. Namespace="http: //soapheader. ibm. com" namespace definitions xmlns: wsdl="http: //schemas. xmlsoap. org/wsdl/" xmlns: xsd="http: //www. w 3. org/2001/XMLSchema" xmlns: wsdlsoap="http: //schemas. xmlsoap. org/wsdl/soap/" xmlns: intf="http: //soapheader. ibm. com" xmlns: impl="http: //soapheader. ibm. com" xmlns: apachesoap="http: //xml. apache. org/xml-soap" xmlns="http: //schemas. xmlsoap. org/wsdl/"> <wsdl: types> <schema target. Namespace="http: //soapheader. ibm. com" xmlns="http: //www. w 3. org/2001/XMLSchema"> <element name="get. Last. Sell. Price"> <complex. Type> <sequence> <element name="ticker" nillable="true" type="xsd: string" /> </sequence> </complex. Type> </element> <element name="get. Last. Sell. Price. Response"> <complex. Type> <sequence> <element name="get. Last. Sell. Price. Return" type="xsd: int" /> </sequence> </complex. Type> data type definitions </element> <element name="quote_timestamp" type="xsd: date. Time" /> </schema> </wsdl: types> (*) 25 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 (*) <wsdl: message name="get. Last. Sell. Price. Request"> <wsdl: part name="parameters" element="intf: get. Last. Sell. Price"/> definition of the data <wsdl: part name="request_header" element="intf: quote_timestamp"/> being communicated </wsdl: message> <wsdl: message name="get. Last. Sell. Price. Response"> <wsdl: part name="parameters" element="intf: get. Last. Sell. Price. Response"/> </wsdl: message> <wsdl: port. Type name="Stock. Service"> <wsdl: operation name="get. Last. Sell. Price"> definition of operation <wsdl: input name="get. Last. Sell. Price. Request" message="intf: get. Last. Sell. Price. Request"/> supported by the service <wsdl: output name="get. Last. Sell. Price. Response" message="intf: get. Last. Sell. Price. Response"/> </wsdl: operation> </wsdl: port. Type> <wsdl: binding name="Stock. Service. Soap. Binding" type="intf: Stock. Service"> <wsdlsoap: binding style="document" transport="http: //schemas. xmlsoap. org/soap/http"/> <wsdl: operation name="get. Last. Sell. Price"> concrete protocol and <wsdlsoap: operation soap. Action=""/> data format specification <wsdl: input name="get. Last. Sell. Price. Request"> <wsdlsoap: header message="intf: get. Last. Sell. Price. Request" part="request_header" use="literal"/> <wsdlsoap: body use="literal" parts="parameters"/> </wsdl: input> <wsdl: output name="get. Last. Sell. Price. Response"> <wsdlsoap: body use="literal" parts="parameters"/> </wsdl: output> </wsdl: operation> </wsdl: binding> <wsdl: service name="Stock. Service"> <wsdl: port name="Stock. Service" binding="intf: Stock. Service. Soap. Binding"> <wsdlsoap: address location="http: //localhost: 9080/SOAPHeader. Web/services/Stock. Service"/> </wsdl: port> URL at which the service </wsdl: service> will be executed </wsdl: definitions> 26 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Usage of Web service description § Requests from Service Requesters will be generated based on the information contained in WSDL documents • IDE tools help generation of WSDL or application IDE tools WSDL IDE tools § location § protocol § operation § message format Service Requester Input message Service Provider Output message 27 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Development approaches § “Top down” approach • create a service from an existing WSDL – create a new Web service application > better interfaces for the requester > development cost WSDL § location § protocol § operation § message format Service § “Bottom up” approach • create a WSDL from an existing application – expose the application as a Web service > quicker implementation of the service > more complex interface for the requester WSDL § location § protocol § operation § message format Service § “Meet in the middle” approach • create a WSDL from an existing application, modify the WSDL and create a wrapper from the modified WSDL – indirectly expose the application as a Web service > more suitable interface for the requester > minimum development 29 WSDL § location § protocol § operation § message format Wrapper Service © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Application development : SOAP for CICS § Current tooling provides … • Bottom up approach for a service provider – WSED can help you create an XML-COMMAREA converter > utilizes XML parser of Enterprise COBOL for z/OS and OS/390 – XML schema generated from WSED can be used as part of the WSDL > use WSDL editor to compose a WSDL • No tool support for use as a service requester IDE tools WSDL Web Services wizard create deploy Message Adaptor Service Requester SOAP for CICS pipeline xsd generate input converter import COBOL source business logic driver program output converter 31 XML Enablement tool CICS © 2005 IBM Corporation
CICS Transaction Server V 3. 1 SOAP for CICS using WSED: Bottom up approach AD environment (workstation) COMMAREA Program source Import generate XML Enablement Tool XML Converters (Message Adaptor) Message definition (XSD) reference Web Services Wizard z/OS environment Service definition (WSDL) generate Service Requester deploy Service Requester Compile/LKED Client Proxy deploy Client Proxy Web Services Client (J 2 SE/J 2 EE) deploy Transport XML Converters (Message Adaptor) COMMAREA program Web Services End-point (CICS) Runtime Environment 33 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Application development : CICS TS V 3. 1 Web service § CICS provides the necessary tools and runtime • WSDL can be generated from a utility – a bottom up approach from an existing application • Utility can generate language structures from WSDL – a top down approach to a new CICS service provider programs – for CICS service requester programs • CICS provides XML-language structure (COMMAREA) conversion top down IDE tools WSDL CICS Web service Service Requester pipeline bottom up binding file conversion CICS Web services assistant lang. structure • COBOL • PL/I • C/C++ business logic CICS 35 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 CICS TS V 3. 1 using Web. Sphere Studio tooling § Bottom up approach AD environment (workstation) Web Services Wizard z/OS environment Service definition (WSDL) generate CICS Web services assistant input language structure generate Service Requester deploy Service Requester Client Proxy binding file deploy Client Proxy Web Services Client (J 2 SE/J 2 EE) deploy Transport Pipeline target program Web Services End-point (CICS) Runtime Environment 37 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 CICS TS V 3. 1 using Web. Sphere Studio tooling… § Top down approach AD environment (workstation) Web Services Wizard z/OS environment Service definition (WSDL) input CICS Web services assistant generate Service Requester deploy Service Requester binding file deploy Web Services Client (J 2 SE/J 2 EE) language structure target program source Client Proxy generate deploy Transport Pipeline Compile/LKED deploy target program Web Services End-point (CICS) Runtime Environment 39 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 CICS TS V 3. 1 using Web. Sphere Studio tooling… § As a Service Requester AD environment (workstation) Web Services Wizard z/OS environment Service definition (WSDL) input CICS Web services assistant generate Service Provider deploy Service Provider binding file deploy Web Services End-point(J 2 SE/J 2 EE) language structure requester program source Stub generate Compile/LKED deploy Transport Pipeline deploy requester program Web Services Client (CICS) Runtime Environment 41 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Scenarios for “Meet in the middle” approach § If you have an existing application and… • an existing WSDL is to be used as interface to the client – e. g. WSDL defined from a requesters perspective • only want to expose fields that are necessary to the requester – existing language structure may be complex, contain unnecessary fields for the requester – use an interface more suitable for the requester • the existing language structure uses data types not supported by the utility – wrapper program converts the data type to a supported data type • the existing application is written in a language not supported by the utility – Assembler or Java programs • etc. • COBOL CICS Web services assistant WSDL CICS Web service pipeline 43 new lang. structure • COBOL • PL/I • C/C++ existing • PL/I lang. structure • C/C++ binding file conversion new language structure Wrapper program existing commarea structure existing business logic © 2005 IBM Corporation
CICS Transaction Server V 3. 1 CICS Web services assistant § Helps deploy an application program in a Web services environment • with minimum amount of programming and resource definition § Two utility programs provided • DFHLS 2 WS – creates WSDL from a language structure • DFHWS 2 LS – creates language structure from WSDL § Supplied JCL procedures will invoke a Java program on USS • Generates the WSDL or language structure • Generates a Web service binding file (WSBind file) – for use in CICS Web service runtime 45 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Web service binding file § Web service binding file (WSBind file) • holds information about the Web service • contents – header section containing the information on the characteristics of the service > target program name > interface to the target program ( commarea or channel ) > etc. – for each operations > the input / output message layout - used to map data between SOAP messages and commarea/channel • used for WEBSERVICE resource definition – WEBSERVICE resource can be created based on the information in the file > the WSBind and WSDL files associated with the service > associated PIPELINE, URIMAP definition > Bindings and end-point > CICS program name and it’s interface type, if it is a CICS service – Dynamically created by PERFORM PIPELINE SCAN (recommended) – information can be obtained by INQUIRE WEBSERVICE command 47 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 CICS usage of the WSBind file § CICS as a service provider CICS Web services Service Requester pipeline SOAP body WEBSERVICE resource Data mapping WSDL HLL data structure WSBind file business logic CICS § CICS as a service requester CICS Web services business logic HLL data structure Data mapping WSDL CICS 49 WSBind file SOAP body pipeline Service Provider WEBSERVICE resource © 2005 IBM Corporation
CICS Transaction Server V 3. 1 CICS Web services assistant § DFHLS 2 WS (Language structure to Web service) • For a bottom up approach development • Input – Programming language data structure > In COBOL or PL/I or C++ > Interface to the program can be COMMAREA or CHANNEL • Output – Web services binding file – Web services description (WSDL) Service definition (WSDL) generate input DFHLS 2 WS language structure COBOL PL/I C/C++ WSBind file 51 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 CICS Web services assistant § DFHWS 2 LS (Web service to language structure) • For a top down approach and service requester development • Input – Web services description (WSDL) • Output – Web services binding file – high level language data structure > In COBOL or PL/I or C++ > Interface to the program can be COMMAREA or CHANNEL Service definition (WSDL) input generate DFHWS 2 LS language structure COBOL PL/I C/C++ WSBind file 53 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Input parameters for DFHLS 2 WS 55 parameter description example PDSLIB Name of the PDS which contains the high level language structures to be processed //USER 1. COPYBOOK REQMEM Member in the PDSLIB for the Web service request REQCB RESPMEM Member in the PDSLIB for the Web service response RESPCB LANG Programming language of the high level language structure. Either COBOL, PL/I, C or C++. COBOL PGMNAME If CICS implements the service, name of the CICS application program MYPROG 02 URI If CICS implements the service, local URI to use as reference to the program /webservices/Account. Info/ex 2 PGMINT If CICS implements the service, interface to the target application when CICS is the service provider. Either COMMAREA or CHANNEL CONTID If CICS implements the service, name of the container that will hold the highest level of language structure in the application program interface mycontname WSBIND Fully qualified HFS name of the Web service binding file /u/user 1/wsbind/Account. Info 2. wsbind WSDL Fully qualified HFS name of the Web service description file /u/user 1/wsdl/generated. WSDL. wsdl LOGFILE Fully qualified HFS name for the log and trace information of the utility. Normally not used /u/user 1/wsbind/Account. Info 2. log © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Input parameters for DFHWS 2 LS 56 parameter description example WSDL Fully qualified HFS name of the file containing the Web services description /u/user 1/wsdl/Account. Info. wsdl BINDING Value of the name attribute used on the <binding> element, if the Web service description contains more than one <binding> element Account. Info. Binding LANG Programming language of the high level language data structure. Either COBOL, PL/I, C or C++. COBOL PGMNAME Name of the CICS application program MYPROG 01 URI Local URI to use as reference to the program /webservices/Account. Info/ex 1 PGMINT Interface to the target application when CICS is the service provider. Either COMMAREA or CHANNEL CONTID Name of the container that will hold the highest level of language structure in the application program interface mycontname WSBIND Fully qualified HFS name of the Web service binding file /u/user 1/wsbind/Account. Info. wsbind PDSLIB Name of the PDS which will contain the high level language data structures //USER 1. COPYBOOK REQMEM Member in the PDSLIB for the Web service request REQCB RESPMEM Member in the PDSLIB for the Web service response RESPCB LOGFILE Fully qualified HFS name for the log and trace information of the utility. Normally not used /u/user 1/wsbind/Account. Info. log HTTPPROXY Name of the proxy server if the WSDL file contains references to other WSDL files located on the internet, and the system uses a proxy server to access the internet proxy. hursley. ibm. com: 80 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 DFHLS 2 WS Sample § Sample JCL for DFHLS 2 WS //LS 2 WS JOB (accounting information), CLASS=A, REGION=0 M // SET QT='''' //JAVAPROG EXEC DFHLS 2 WS, // JAVADIR='java 142 s' //INPUT. SYSUT 1 DD * LOGFILE=/some/user/directory/ls 2 ws. log WSDL=/some/user/directory/wsdl/Register. Pets. wsdl PGMNAME=REGPETS URI=/alocal. URI PGMINT=CHANNEL CONTID=PETSCONTAINER LANG=COBOL WSBIND=/some/user/directory/Reg. Pets. wsbind PDSLIB=//USER 1. COPYBOOK REQMEM=TESTFILE */ 57 < Input COBOL structure > 03 NAME 03 AGE 03 PETS OCCURS 3. 05 TYPE 05 COLOUR PIC X(16). PIC 99. PIC X(8). © 2005 IBM Corporation
CICS Transaction Server V 3. 1 DFHLS 2 WS Sample… § output WSDL <? xml version="1. 0" ? > <definitions target. Namespace="http: //www. REGPETS. com/schemas/" xmlns="http: //schemas. xmlsoap. org/wsdl/" xmlns: reqns="http: //www. REGPETS. com/schemas/REGPETSRequest" xmlns: soap="http: //schemas. xmlsoap. org/wsdl/soap/" xmlns: tns="http: //www. REGPETS. com/schemas/"> <types> <xsd: schema attribute. Form. Default="qualified" element. Form. Default="qualified" target. Namespace="http: //www. REGPETS. com/schemas/REGPETSRequest" xmlns: tns="http: //www. REGPETS. com/schemas/REGPETSRequest" xmlns: xsd="http: //www. w 3. org/2001/XMLSchema"> <xsd: complex. Type abstract="false" block="#all" final="#all" mixed="false" name="Program. Interface"> <xsd: annotation> <xsd: documentation source="http: //www. ibm. com">This schema was generated for use with CICS. </xsd: documentation> </xsd: annotation> <xsd: sequence> <xsd: element name="NAME" nillable="false"> <xsd: simple. Type> <xsd: restriction base="xsd: string"> <xsd: length value="16"/> <xsd: white. Space value="preserve"/> </xsd: restriction> </xsd: simple. Type> </xsd: element> <xsd: element name="AGE" nillable="false"> <xsd: simple. Type> <xsd: restriction base="xsd: unsigned. Short"> <xsd: max. Inclusive value="99"/> <xsd: min. Inclusive value="0"/> </xsd: restriction> Part 1 of 3 </xsd: simple. Type> </xsd: element> 58 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 DFHLS 2 WS Sample… <xsd: element max. Occurs="3" min. Occurs="3" name="PETS" nillable="false"> <xsd: complex. Type mixed="false"> <xsd: sequence> <xsd: element name="TYPE" nillable="false"> <xsd: simple. Type> <xsd: restriction base="xsd: string"> <xsd: length value="8"/> <xsd: white. Space value="preserve"/> </xsd: restriction> </xsd: simple. Type> </xsd: element> <xsd: element name="COLOUR" nillable="false"> <xsd: simple. Type> <xsd: restriction base="xsd: string"> <xsd: length value="8"/> <xsd: white. Space value="preserve"/> </xsd: restriction> </xsd: simple. Type> </xsd: element> </xsd: sequence> </xsd: complex. Type> <xsd: element name="REGPETS" nillable="false"> <xsd: complex. Type mixed="false"> <xsd: sequence> <xsd: element name="content" type="tns: Program. Interface"/> </xsd: sequence> </xsd: complex. Type> </xsd: element> </xsd: schema> </types> <message name="REGPETSRequest"> <part element="reqns: REGPETSRequest" name="Request. Part"/> </message> <message name="REGPETSResponse"/> 59 Part 2 of 3 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 DFHLS 2 WS Sample… <port. Type name="REGPETSPort"> <operation name="REGPETS"> <input message="tns: REGPETSRequest" name="REGPETSRequest"/> <output message="tns: REGPETSResponse" name="REGPETSResponse"/> </operation> </port. Type> <binding name="REGPETSWMQSoap. Binding" type="tns: REGPETSPort"> <soap: binding style="document" transport="http: //schemas. xmlsoap. org/soap/http"/> <operation name="REGPETS"> <soap: operation soap. Action="" style="document"/> <input name="REGPETSRequest"> <soap: body parts="Request. Part" use="literal"/> </input> <output name="REGPETSResponse"> <soap: body use="literal"/> </output> </operation> </binding> <binding name="REGPETSHTTPSoap. Binding" type="tns: REGPETSPort"> <soap: binding style="document" transport="http: //schemas. xmlsoap. org/soap/http"/> <operation name="REGPETS"> <soap: operation soap. Action="" style="document"/> <input name="REGPETSRequest"> <soap: body parts="Request. Part" use="literal"/> </input> <output name="REGPETSResponse"> <soap: body use="literal"/> </output> </operation> </binding> <service name="REGPETSService"> <port binding="tns: REGPETSHTTPSoap. Binding" name="REGPETSPort"> <soap: address location="http: //my-server: my-port/a_local_URI"/> </port> </service> </definitions> 60 Part 3 of 3 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Mapping of COBOL data structures and WSDL 61 COBOL data type PIC X(z) PIC A(z) PIC G(z) PIC N(z) PIC S 9 to S 9999 DISPLAY schema simple. Type string PIC S 9(z) DISPLAY z: between 5 to 9 PIC S 9(z) DISPLAY z: greater than 9 PIC 9 to 9999 DISPLAY int PIC 9(z) DISPLAY z: between 5 to 9 PIC 9(z) DISPLAY z: greater than 9 PIC S 9(z) COMP-4 and 5 z: up to 4 PIC S 9(z) COMP-4 and 5 z: between 5 to 9 PIC S 9(z) COMP-4 and 5 z: greater than 9 PIC 9(z) COMP-4 and 5 z: up to 4 PIC 9(z) COMP-4 and 5 z: between 5 to 9 int short long included <xsd: max. Length value=“z" /> PIC X(8) <xsd: simple. Type> <restriction base=“xsd: string”> <xsd: max. Length value="8" /> <white. Space value="preserve"/> </restriction> </simple. Type> <xsd: max. Length value=“y" /> y: 2*z <xsd: min. Inclusive value=“-9999”/> <xsd: max. Inclusive value=“ 9999”/> <xsd: min. Inclusive value=“-99999”/> PIC S 9(5) <xsd: simple. Type> <xsd: max. Inclusive value=“ 99999”/> <restriction base=“xsd: int”> <xsd: min. Inclusive value=“-999999999”/> <xsd: max. Inclusive value=“ 999999999”/> <xsd: min. Inclusive value=“ 0”/> </restriction> <xsd: max. Inclusive value=“ 9999”/> </simple. Type> <xsd: min. Inclusive value=“ 0”/> <xsd: max. Inclusive value=“ 99999”/> <xsd: min. Inclusive value=“ 0”/> <xsd: max. Inclusive value=“ 999999999”/> short int long unsighed. Short unsigned. Int COBOL data type Schema Simple. Type included PIC 9(z) COMP-4 and 5 z: greater than 9 unsigned. Long PIC S 9(m)V 9(n) COMP-3 decimal <xsd: total. Digits value="p"/> <xsd: fraction. Digits value="n"/> p=m+n PIC 9(m)V 9(n) COMP-3 decimal <xsd: total. Digits value="p"/> <xsd: fraction. Digits value="n"/> <xsd: min. Inclusive value="0"/> p=m+n © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Web Services - Notes The table above shows how COBOL data type elements are mapped to XML schema elements. Data types not listed are not supported in DFHLS 2 WS. The following restriction also apply: – – – REDEFINES LEVEL 66 (RENAMES), 77, 88 SIGN TRAILING, SIGN LEADING BINARY, PACKED-DECIMAL, POINTER COMP 1, 2 POINTER, FUNCTION-POINTER, PROCEDURE-POINTER OBJECT REFERENCE SYNCHRONIZED OCCURS DEPENDING ON, OCCURS INDEXED BY DATE FORMAT Data description items whose values can be affected by compiler options BLANK WHEN ZERO, JUSTIFIED, VALUE clause are ignored Support or restrictions for PL/I, C/C++ languages can be found in the CICS Web Services Guide. 62 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Mapping of COBOL data structures and WSDL … 63 schema COBOL data type any. Type, any. Simpe. Type not supported string, normalized. String, token, Name, NMTOKEN, language, NCName, IDREF, ENTITY, hex. Binary PIC X(z) duration, datetime, g. Day, g. Month, g. Year, g. Month. Day, g. Month. Year PIC X(32) byte, unsigned. Byte PIC X DISPLAY short PIC S 9999 COMP-5 SYNC or PIC S 9999 DISPLAY depending on <min. Inclusive> and <max. Inclusive> unsigned. Short PIC 9999 COMP-5 SYNC or PIC 9999 DISPLAY int PIC S 9(9) COMP-5 SYNC or PIC S 9(9) DISPLAY unsigned. Int PIC 9(9) COMP-5 SYNC or PIC 9(9) DISPLAY long PIC S 9(18) COMP-5 SYNC or PIC S 9(18) DISPLAY unsigned. Long PIC 9(18) COMP-5 SYNC or PIC 9(18) DISPLAY decimal <total. Digits value=“m”> <fraction. Digits value=“n”> PIC 9(p)V 9(n) COMP-3 Boolean PIC X DISPLAY float, double PIC X(32) where p=m-n © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Web Services - Notes The table above shows how XML schema elements are mapped to COBOL data types. Support or restrictions for PL/I, C/C++ languages can be found in the CICS Web Services Guide. DFHWS 2 LS supports Web services descriptions that conform to WSDL version 1. 1, with the following restrictions: – Only SOAP bindings which use literal encodings are supported. – The only transport protocols supported by DFHWS 2 LS are http, https and Web. Sphere MQ. – Data type definitions must be encoded using the XML Schema Definition language (XSD). Within the schema: > Data types used in the SOAP message must be explicitly declared. DFHWS 2 LS does not support data types in the SOAP message that are derived from other data types in the schema and that are not declared. > DFHWS 2 LS does not support: - the <any>, <list>, and <union> elements - the max. Occurs and min. Occurs attributes on the <sequence>, <all> and <choice> elements. - abstract types (except as nonterminal types in an inheritance hierarchy) - the any. Type and the any. Simple. Type types - cyclic references - <attribute> element is ignored. – The length of some keywords within the Web services description is limited. For example, operation, binding and part names are limited to 255 characters in length (in some cases the maximum operation name length may be slightly shorter). – Only one service element is supported for each binding element. 64 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Steps for using CICS as a service provider § For bottom up approach • Prepare copybook of data structure • Run DFHLS 2 WS – Generate WSDL and WSBind file § For top down approach • Prepare WSDL document • Run DFHWS 2 LS – Generate language structure and WSBind file • Create application § For meet in the middle approach • Run DFHLS 2 WS/DFHWS 2 LS and generate WSDL/language structure • Create a wrapper program § Create & install PIPELINE definition • create XML file for processing nodes § Create & install WEBSERVICE and URIMAP definition • PERFORM PIPELINE SCAN command § Create service requester program 65 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Steps for using CICS as a service requester § Prepare WSDL file § Run DFHWS 2 LS • data structure • Web service binding file § Create & install PIPELINE definition • create XML file for processing nodes § Create & install WEBSERVICE definition • PERFORM PIPELINE SCAN command § Create application • EXEC CICS INVOKE WEBSERVICE 67 © 2005 IBM Corporation
CICS Transaction Server V 3. 1 Summary § CICS Web service allows CICS applications be integrated with a Service Oriented Architecture (SOA) • CICS applications in new scenarios – CICS as a Service Provider to an existing program > Existing application not changed > a wrapper to an existing application – CICS as a Service Provider to a new program – CICS as a Service Requester from a new program • Web services assistant – Enables rapid deployment of CICS applications for use in service providers and service requesters 69 © 2005 IBM Corporation
- Slides: 42