In this section: How to: |
iWay Explorer provides developers with a simple, consistent mechanism for extending the capabilities of the adapter. The iWay Business Services Provider (iBSP) exposes functionality as web services. It serves as a gateway to heterogeneous back-end applications and databases.
A web service is a self-contained, modularized function that can be published and accessed across a network using open standards. It is the implementation of an interface by a component and is an executable entity. For the caller or sender, a web service can be considered as a "black box" that may require input and delivers a result. A web service integrates within an enterprise as well as across enterprises on any communication technology stack, whether asynchronous or synchronous, in any format.
Note: In a J2EE Connector Architecture (JCA) implementation of iWay adapters, web services are not available. When the adapters are deployed to use the iWay Connector for JCA, the Common Client Interface provides integration services using the iWay adapters. For more information, see the iWay Installation and Configuration documentation.
After you connect to your application system and create an XML schema for a transaction, you can create a web service. The following procedure describes how to create a web service using iWay Explorer.
To create a web service:
The iWay Adapters window opens.
The Transaction node appears under the connected node.
The Create Web Service pane opens on the right, where you enter information that is specific to the web service you are defining, as shown in the following image.
Another pane with the Method Name and Description fields opens, where you enter information that is specific to the method you are defining, as shown in the following image.
The iWay Business Services Provider tab opens. The web service is created and published to the iWay Business Services Provider. iWay Explorer displays the newly created web service under the iWay Business Services folder.
After you create a business service, you can test it to ensure that it functions properly. iWay provides a test tool for testing the business service.
To test the web service:
The business service name appears as a link in the right pane.
The test option appears in the right pane.
The following is an example of an XML document that queries the service.
<?xml version="1.0" encoding="UTF-8" ?> <CICS> <Transaction location="/CICS/Transaction/IWAYSAMP"> <CommArea> <COMMAND>SHORT</COMMAND> </CommArea> </Transaction> </CICS>
<?xml version="1.0" encoding="UTF-8" ?> <CICS> <Transaction location="/CICS/Transaction/IWAYSAMP"> <CommArea> <COMMAND>LONG</COMMAND> </CommArea> </Transaction> </CICS>
The result appears in the right pane.
The Web Service Description Language (WSDL) file is an XML file that describes the web service documents and provides access to the service, such as iWay run-time environment.
To generate WSDL from a web service:
The link for the service appears in the right pane.
Note: The file extension must be .wsdl.
After generating a WSDL file from the IWAYSRV0.ibs serialized object, the IWAYSRV0. wsdl file looks similar to the following image.
If you test or execute a web service using a third party XML editor, for example XMLSPY, the Username and Password values that you specify in the SOAP header must be valid and are used to connect to CICS. The user name and password values that you provided for CICS during target creation using iWay Explorer are overwritten for this web service request. The following is a sample SOAP header that is included in the WSDL file for a web service:
<SOAP-ENV:Header> <m:ibsinfo xmlns:m="urn:schemas-iwaysoftware-com:iwse"> <m:service>String</m:service> <m:method>String</m:method> <m:license>String</m:license> <m:disposition>String</m:disposition> <m:Username>String</m:Username> <m:Password>String</m:Password> <m:language>String</m:language> </m:ibsinfo> </SOAP-ENV:Header>
Note: You can remove the following tags from the SOAP header, as they are not required.
<m:disposition>String</m:disposition> <m:language>String</m:language>
iWay Software |