Advanced Operations - Importing SOAP Web services

As part of the installation steps you have deployed a billing web application that exposes several SOAP web services. The different services are available at http://localhost:8080/billing/services. Make sure the billing web service is up and running before following the steps of this section (Installation & Bootstrapping)

These web services have been created by the billing department and expose the information about the customers' bills using three different operations:

  • getBills: returns a list with all the bills in the system.
  • getBillByCustomerID: returns a list with all the bills for the specified input customer id.
  • getBillByPhoneCenter: returns a list with all the bills for the specified input phone center.

All the different operations will return the billing information using a hierarchical structure: the bills will be returned as part of a list. For instance, if you invoke the getBillByCustomerId operation using a customer id as input parameter, you will get a list with all the bills for that customer. For each item (bill) in the list you will see: the customer id and ssn; the amount due for that bill; the billing start date, end date and due date; the phone center that provided the service for that bill and the bill id.

To import a SOAP web service as a data source you will just have to point to the location of the WSDL descriptor for the web service.

TIP

In this case, you are going to use the BillProvider service from the list of available services. The descriptor for this service will be available at http://localhost:8080/billing/services/BillProvider?wsdl.

The Denodo Platform can integrate both SOAP and REST web services. For SOAP web services you will use the Web service type of data source, for REST web services you could use either JSON or XML data sources depending on the output format of the REST web service. Follow these steps to create a SOAP data source:

  1. Right click on the '1 - Data Sources' folder and select New > Data source > Web service.
  2. In the New Web Service Data Source creation wizard enter:
    • Name: soap_billing_ds.
    • WSDL: http://localhost:8080/billing/services/BillProvider?wsdl.
    New web service datasource menu
  3. Click Ok (you can leave the default values for the remaining options).

In the next Web Service Data Source screen you will see a list with the different operation available in the web service and the option of creating a new base view for each one of them.

In this case you are interested in the getBillByCustomerId operation, so click on the Create Base View link associated with this operation.

Web service operations

In the Web Service View for operation <getBillByCustomerId> screen just choose Do not stream output and click Ok.

Before confirming the creation of the view, rename it to get_bill_by_customer_id and rename the input parameter for the web service operarion from in0 to customer_id.

New web service base view

Click Ok after these changes.

The web service operation that you just imported has a mandatory input parameter: the customer id.

To reflect this restriction in the data source, the new base view will also have limited query capabilities and when querying the view (clicking on 'Execute' button) we will have to provide a value for this input parameter (customer_id) as a WHERE condition.

Any time a data source has a mandatory input parameter, it is going to become a mandatory WHERE condition that you can not remove from the view execution dialog when querying the view.

NOTE

Actually, if you try to execute a query from the VQL shell without providing the WHERE condition you will get an error.

If we use 'C003' as value for the customer id we will get the complete list of bills for that customer as the result of the query.

New web service base view New web service base view

A list of items is represented with an Array data type. You can see in the results of the query that the return column is displayed as [Array].... If you double click on this value you can see the contents of the array. In this example you can see the 2 bills that belong to this customer.

New web service base view