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:
- 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.
- Create the client java Stubs.
- Compile all the client java Stubs using javac.
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):
- 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)’
- 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.
- Select ‘OK’ to specify the service URL: ‘http://localhost:8080/sree/
services/PeopleService’
- Select ‘Next’ to specify the Soap Binding Stub class (client stub):
‘MyService2SoapBindingStub’
- Select ‘Finish’ to add the data source to the registry.
- Click on the ‘Test Data Source’ button on the Data Modeler’s toolbar to verify that
the
data source is set up correctly.
- 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.
“We evaluated many reporting vendors and were most impressed at the speed with which the proof of concept could be developed. We found InetSoft to be the best option to meet our business requirements and integrate with our own technology.”
- John White, Senior Director, Information Technology at Livingston International
Why Web Service Data Sources Remain Relevant
Here are some key points:
- Reporting Services:
- Developers often utilize XML and web service data sources as sources for Reporting Services (SSRS).
These data sources allow reports to retrieve information from external services or APIs.
- For example, in InetSoft or SSRS, you can configure a web service data source to fetch data from a
publicly accessible service, such as a RESTful API or a SOAP-based web service.
- App Development:
- In app development, web services serve as valuable data sources. Developers can leverage data owned
or
managed by third parties.
- For instance, an app might need to access data from a third-party tool or a public resource. Web
services provide a way to query and retrieve this data programmatically.
- Popularity:
- According to surveys, almost 90% of respondents actively use web services and APIs. These services
facilitate data exchange, integration, and communication between different systems and applications