Friday, July 17, 2015

Connecting to a Public REST API in CIS

Lets see how to connect to a Public REST API in CIS.

The REST API I have selected is the Google Maps API.
URL: http://maps.googleapis.com/maps/api/geocode/xml?address={input_address}
input_address is the input you give to the URL at run time. For Eg: Any valid address like (San Diego)

This URL has two parts the BASE URL and the OPERATION URL

From the Google Maps URL:
BASE URL: maps.googleapis.com
OPERATION URL: /maps/api/geocode/xml?address={input_address}

1.  Login into CIS and click on a folder where you have write access and select New Data Source:


2. It will bring a pop-up where you can select the Data Source Adapter:
Select REST as your Data Source Adapter:

3. Click on Next at the bottom of the screen and you can enter the connection information as below.

Name: Any Valid Name. I have named mine as GOOGLE_REST_API.
Base URL: http://maps.googleapis.com
No Need to enter any Login/Password as anyone can access these Public REST API's .


4. Now in the Operations Tab Click on the + Symbol to add a new operation.

5. A window will pop-up where you enter any name for your operation. Give it any name.

6. Now enter the Operation URL in the Operation URL Text Box:
Our Operation URL: /maps/api/geocode/xml?address={input_address} and Hit Parse.
When you hit Parse it will Parse the Operation URL and detect the input parameters in the URL.

7. Hit Create and Close in the Bottom End of the Window and it will Introspect the Operation by combining the Base URL and The Operation URL.

Click on the Operation Name and Click Next

8. Hit Finish and It will introspect and give you the Introspection Task Status Report. Make sure the operation is added in the report as shown below.


9. Click OK and you can see your operation in the resource directory. Open the operation and click on Execute.

10. You have to enter a valid input_address so the Google Maps API can give you the appropriate information like Country Information, Latitude, Longitude Information etc. The Information is in XML so you can use this XML in SQL Scripts, Views and publish them for the consuming applications.

Note: If you would like to convert XML to tabular format you will have to use the XSLT Transformations provided by CIS.


Thursday, January 8, 2015

Testing Published Web Services (WSDL) through SOAPUI

In the previous article we have seen how to publish CIS resources as Web-Services. Now lets see how to test them out through the SOAPUI tool before we access it from end clients.

1. We have seen how to publish the example procedure (LookupProduct) as a Web-Service.
After we publish the procedure we have 4 WSDL links as shown below.


Since the default Security Policy is set as Http-Basic-Authentication only the http links will work.
Open the Composite Web Service (Composite_Test) and Double Click on one of the http link, the link will be copied to the clipboard.

2. Open SOAPUI. (I am not going to cover how to install SOAPUI in this blog. Installation of SOAPUI is straightforward)

3. Right Click on Projects and Select New SOAP Project.


4. After you Select New SOAP Project in the Intital WSDL field enter the WSDL you copied in Step 1 and enter a name for the Project. Select Create sample requests for all operations.



5. SOAPUI will automatically create the Request for the operations in the WSDL supplied.


6. Right Click on Request 1 and Select Show Request Editor.


7. A new window will open to the right which is the Request Editor.

8. In the request properties: Enter the username and password (admin/admin).

9. In the request you can enter any integer value and hit the Submit Request (Green Arrow Button) and it will return the Product Information.



10. When you hit Submit Request it will return the Response for that particular product.





Saturday, October 11, 2014

Publishing Resources as Web-Services in CIS

CIS Publishing: Publishing is the only one way to expose the CIS Developed resources to external clients. There are basically two ways to publish resources
1. Databases-- External Clients access them as JDBC, ODBC and also as ODATA
2. Web-Services-- External Clients access them as REST or WSDL URL's
For the Web-Services they can be exposed as XML as well as JSON.

In this article lets see how to publish resources as a web-service.

After you have installed Cisco Information Server, there is an examples folder in this following PATH: /shared/examples
This folder contains pre-created resources.

There is a SQL Script in the examples folder "LookupProduct":
PATH: /shared/examples/LookupProduct
This SQL Script accepts öne input INTEGER parameter "desiredProduct" and returns ProductName, ProductID and ProductDescription for the matching record in the products table.

Lets publish this as a web-service.

1. Right-Click on the SQL Script "LookupProduct" and Select Publish.



2.  After clicking Publish a new window will pop-up.


3. Select the Web Services Folder and Select Add Composite Web Service


4. Provide a name for the Composite Web Service and Click OK


5. Provide a name for the Published Web-Service and click OK.


6. Now you can see that the folder has been created and the procedure has been published.


This procedure has been published and is now available for access through external clients.

7. Open the created Web-Service and in the SOAP tab there are 4 WSDL URL's and in the REST Tab there are 4 End-Point URL's for end user consumption.

WSDL URL's:


REST URL's:



Since the default Security Policy is /policy/security/system/Http-Basic-Authentication.xml
the http links will work so if you change the security policy to
/policy/security/system/Https-Basic-Authentication.xml then the https links will work.

The next step is to test the published web-services through SOAPUI. Shall post about testing published resources in future.


Monday, August 11, 2014

Connecting to CIS Published Resources through DBVisualizer

In this article lets see how to connect to CIS published resources through JDBC Tool DBVisualizer.

1. Download the latest version of DBVisualizer from here. Download the version according to your operating system and if you have Java installed on your machine download the file which says without Java VM otherwise download the file with Java VM.

2. After you download the installation is straightforward so I am not going to post the steps to Install.

3. Post installation, open DBVisualizer and in the Tools Menu Select Driver Manager


4. It will open up the Driver Manager window.



5. Click Create a new driver as shown in the picture above and enter the details for
Name: give any meaningful name like CIS62 or CIS

6. Click on the Folder icon to browse and open the csjdbc.jar file.

The csjdbc.jar file is located on the machine where you installed the CIS Server.
Location: C:\Program Files\Composite Software\CIS 6.2.0\apps\jdbc\lib if you installed on a windows machine. If you do not have access to the file contact your system administrator.

7. After you configure the driver you are ready to make connections to the CIS Server published resources.

8. Right click on connections and select Create a New Connection.


9. Click the Use Wizard.

10. In the New Connection Wizard give a name to your connection.

11. In the Select Database Driver Screen Select the previously configured CIS Driver.


12. After you select the appropriate driver click Next and it will take you to the screen below.


In the Database URL Field enter the URL:
URL FORMAT: jdbc:compositesw:dbapi@<hostname>:<jdbc_port>?domain=<domain_ name>&dataSource=<datasource_name>

Sample URL: jdbc:compositesw:dbapi@localhost:9401?domain=composite&dataSource=CompositeTraining

Enter the Userid and Password and Hit Finish.

13. Now you can connect, view and query the published resources in the Data Source you have specified in the Database URL.