6.2.1 Defining a Web Service Data Source

Before you create any web service data source, verify the following points:

The web service is running on the host server.

(Optional) You have created a Java client stub as described in Creating the Client Stub.

The example below uses a web service called 'PeopleService' which is deployed with the default installation. To follow the example, use the peopleservice-client.jar file in the sree/WEB-INF/lib folder as the client stub. Make certain that you add it to the Style Studio classpath. (See Configuring the Style Studio Classpath in Getting Started.)

Walkthrough

You 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, verify the following:

Start the server and make sure that the 'PeopleService' webservice has been deployed ('http://localhost:8080/sree/PeopleService').

Verify that the peopleservice-client.jar file located in the sree/WEB-INF/lib folder is on the Style Studio classpath. (See Configuring the Style Studio Classpath in Getting Started.)

Then follow the steps below:

1. Click the 'New' button in the Style Studio toolbar. This opens the 'New Asset' dialog box.

2. In the left panel, select the 'Data Source' node. In the right 'Types' panel, select 'SOAP', and click 'OK'. This opens the 'SOAP Data Source Wizard'.

3. Select the General tab. In the 'Name' field, enter “Contacts2”.

4. Select the URL tab. In the 'URL' field, enter the service URL: 'http://localhost:8080/sree/PeopleService'

 

5. Select the Import tab. In the 'Server Interface' field, specify the client stub class (Soap Binding Stub): 'com.inetsoft.webservice.client.PeopleServiceService'

 

Note: The 'Generated' option can be used to generate the client stub automatically if the web service does not require special inter­vention for the generation of the client (i.e., if a working client can be generated by wsimport with no arguments or custom binding).

6. Click 'Finish' to add the data source to the data source registry (datasource.xml).

 

7. Click the 'Test Data Source' button on the Style Studio toolbar to verify that the data source is configured correctly.

By default, this is done when you create the data source

8. Click on the 'Import Binding Stub Class' to import (introspect) its 'get' methods.

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

<< 6.2 Web Service Data Source © 1996-2013 InetSoft Technology Corporation (v11.4) 6.2.2 Creating the Client Stub >>