Accessing Web Service Data Sources Using Business Intelligence Software

Web Services have proven increasingly efficient in sharing data among distributed applications in a hybrid language environment. The functionalities are made accessible over the web using SOAP (Simple Object Access Protocol). In InetSoft, it is possible to create a data source which retrieves data from a web service. The web service could be any standard SOAP implementation. To connect to the web service from InetSoft make sure you create the client java stub.

Creating the Client Stub (Axis)

Apache Axis is a common and widely used SOAP implementation. It provides a utility for creating a java client stub by introspecting a web service.

Note: Make sure the {StubHome} folder is added to the classpath (of the Data Modeler or Report Designer) when creating your data source.

We will discuss the creation of a (Java) client stub for a web service. The steps involved are as follows:

  1. Make sure your web service is deployed and running on the host server. For axis, you could make sure by going to the following URL http://machine:port/webapp/services. e.g http://localhost:8080/sree/ services.
  2. Create the client java Stubs.
  3. Compile all the client java Stubs using javac.
#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index Read More

Defining a Web Service Data Source

Before creating any web service data source make sure of the following:

  • The web service is up and running on the host server.
  • You have created java client stubs as described in the previous section.

Note: The example discussed in the document uses a web servicecalled ‘People Service’ that is deployed with the installation.

Note: This example discussed in the document can use the ‘complexClient.jar’ file in the ‘sree/WEB-INF/lib’ folder as the client stub.

Walkthrough: We will now walk through the creation of a SOAP data source, which will connect to the ‘PeopleService’ web service (included in the default installation).

Before you start make sure of the following (for this example):

  1. Start the tomcat server and make sure the ‘PeopleService’ web service has been deployed. ‘http://localhost:8080/sree/services’
    • The complexClient.jar file located in the ‘/sree/WEB-INF/lib’ folder is added to the designer or modeler classpath. ‘File > Configure > Classpath (Tab)’
  2. Click the ‘New Data Source’ button to create a new data source, and enter the data source name as ‘Contacts2’ and select ‘soap’ as the data source type.
  3. Select ‘OK’ to specify the service URL: ‘http://localhost:8080/sree/ services/PeopleService’
  4. Select ‘Next’ to specify the Soap Binding Stub class (client stub): ‘MyService2SoapBindingStub’
  5. Select ‘Finish’ to add the data source to the registry.
  6. Click on the ‘Test Data Source’ button on the Data Modeler’s toolbar to verify that the data source is set up correctly.
  7. Click on the ‘Import Binding Stub Class’ to import (introspect) its get methods (done by default on creation of the Data Source)

You can now create a query based on the ‘get’ methods of the data service.

Previous: Accessing XML Data Sources