In this section: |
iWay Explorer provides Web 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 manual and the iWay Connector for JCA User's Guide.
You can create a business service for an SQL statement, stored procedure, table function, or batch. A request and response schema must be available before a business service can be generated.
To generate a business service:
The Create Web Service information appears in the right pane.
If you select Use an existing service, a drop-down list appears from which you must select the service.
If you select Create a new service, the Create Web Service pane opens on the right as shown in the following image.
Another pane with the Method Name and Description fields opens.
iWay Explorer switches the view to the iWay Business Services tab, and the new business service appears in the left pane.
After a business service is created, test it to ensure that it functions properly. iWay provides a test tool for testing the business service.
To test a business service:
The business service name appears as a link in the right pane.
The test option appears in the right pane.
If you are testing a Web service that requires XML input, an input field appears as shown in the following illustration. Options to browse, upload, view additional information, or invoke the input are available through buttons.
If you are testing a Web service for a parameterized SQL statement, an input area appears where you can enter the parameter value, as shown in the following illustration.
iWay Explorer displays the results in the right pane as shown in the following illustration.
Generating Web Services Description Language (WSDL) from a Web service enables you to make the Web service available to other services within a host server.
To generate WSDL from a Web service:
The link for the service appears in the right pane.
Note: The file extension must be .wsdl.
The following is an example of a WSDL file for a Web service called MPS generated from a parameterized SQL statement against Legacy Data.
<definitions xmlns:tns="urn:schemas-iwaysoftware-com:iwse" targetNamespace="urn:schemas-iwaysoftware-com:iwse" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:m11="urn:iwaysoftware:ibse:jul2003:VSAM:response" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:m1="urn:iwaysoftware:ibse:jul2003:VSAM" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"><types><xs:schema targetNamespace="urn:schemas-iwaysoftware-com:iwse" elementFormDefault="qualified"><xs:element name="ibsinfo"><xs:complexType><xs:sequence><xs:element type="xs:string" name="service"/><xs:element type="xs:string" name="method"/><xs:element type="xs:string" name="license"/><xs:element type="xs:string" minOccurs="0" name="disposition"/><xs:element type="xs:string" minOccurs="0" name="Username"/><xs:element type="xs:string" minOccurs="0" name="Password"/><xs:element type="xs:string" minOccurs="0" name="language"/></xs:sequence></xs:complexType></xs:element> </xs:schema><xs:schema targetNamespace="urn:schemas-iwaysoftware-com:iwse" elementFormDefault="qualified"><xs:element name="adapterexception"><xs:complexType><xs:sequence><xs:element type="xs:string" name="error"/></xs:sequence></xs:complexType></xs:element> </xs:schema><xs:schema targetNamespace="urn:iwaysoftware:ibse:jul2003:VSAM" xmlns:m1="urn:iwaysoftware:ibse:jul2003:VSAM" elementFormDefault="qualified"><xs:element name="VSAM"><xs:complexType><xs:sequence><xs:element type="xs:string" name="emp_id"/></xs:sequence></xs:complexType></xs:element> </xs:schema><xs:schema targetNamespace="urn:iwaysoftware:ibse:jul2003:VSAM:response" xmlns:m11="urn:iwaysoftware:ibse:jul2003:VSAM:response" elementFormDefault="qualified"><xs:element name="VSAMResponse"><xs:complexType><xs:sequence><xs:element name="RESULT"><xs:complexType><xs:sequence><xs:element name="MPSVSAM"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="RESULTSET_1"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="ROW" maxOccurs="unbounded"><xs:complexType><xs:sequence><xs:element type="xs:string" name="EMP_ID"/><xs:element type="xs:string" name="FIRST_NAME"/><xs:element type="xs:string" name="LAST_NAME"/><xs:element type="xs:string" name="DEPT"/><xs:element type="xs:string" name="COMP_NAME"/></xs:sequence></xs:complexType></xs:element></xs:sequen ce></xs:complexType></xs:element></xs:sequence></xs:complexType></xs:elem ent></xs:sequence></xs:complexType></xs:element> </xs:sequence><xs:attribute type="xs:string" use="required" name="cid"/></xs:complexType></xs:element></xs:schema> </types><message name="VSAMIn"><part element="m1:VSAM" name="parameters"/> </message><message name="VSAMOut"><part element="m11:VSAMResponse" name="parameters"/> </message><message name="MPSHeader"><part element="tns:ibsinfo" name="header"/> </message><message name="AdapterException"><part element="tns:adapterexception" name="fault"/> </message><portType name="MPSSoap"><operation name="VSAM"><documentation/><input message="tns:VSAMIn"/><output message="tns:VSAMOut"/><fault message="tns:AdapterException" name="AdapterExceptionFault"/></operation> </portType><binding type="tns:MPSSoap" name="MPSSoap"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="VSAM"><soap:operation style="document" soapAction="MPS.VSAMRequest@production@@"/><input><soap:body use="literal"/><soap:header part="header" message="tns:MPSHeader" use="literal"/> </input><output><soap:body use="literal"/> </output><fault name="AdapterExceptionFault"><soap:fault use="literal" name="AdapterExceptionFault"/></fault></operation> </binding><service name="MPS"><documentation>MPS</documentation><port binding="tns:MPSSoap" name="MPSSoap1"><soap:address location="http://iwayntk1:7001/ibse/IBSEServlet/XDSOAPRouter"/></port> </service></definitions>
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 RDBMS. The user name and password values that you provided for RDBMS 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, since they are not required:
<m:disposition>String</m:disposition>
<m:language>String</m:language>
iWay Software |