Changing Web service implementation

Change Web Service implementation

Solved the integration problem with the consuming applications, now you can work with Denodo at your own. The goal is to create derived views as needed and finally add the top derived view as implementation of 'i_client_info' interface.

Creating derived views

You already know how to create derived views using the available operations (selection, union, join, flatten, minus, intersect). This topic was covered in the Basics tutorial / DV First steps / Simple derived views.

The derived view must have fields that match the definition of the interface. In the example of 'i_client_info' interface, the schema is the shown in the image below.

This schema is very similar to the schema of the 'client_with_bills' view, so let's reuse it!

  • client_id: this field comes directly from 'client_with_bills' view.
  • full_name: you don't have this field in any of your views but you can concatenate 'name' and 'surname' fields of the view 'client_with_bills' in order to get the full name.
  • client_type: this field comes directly.
  • full_address: the same than full_name field but concatenating 'street', 'city', 'zip' and 'state'.
  • phone: this field comes from 'client_with_bills' view but it has a different name: 'primary_phone'.
  • billing_due_date: this field comes directly but it has a different name: 'due_date'.
  • balance: this field comes directly.

As you only need one view, to create the new derived view you should use the selection operation to model the proper schema. You can follow these steps:

  1. Right-click over the 'client_with_bills' view in the elements tree and select New > Selection.
  2. Go to the Output tab and rename the view to: client_info_impl.
  3. Remove the fields: name, surname, code, value, street, city, zip, state, customer_id, ssn, billing_end_date, phone_center, billing_period_id, billing_start_date, billing_id, return_customer_id, package_id, amount_due and tax_id.
  4. Rename primary_phone to phone.
  5. Rename due_date to billing_due_date and edit this field to convert it to date (the date pattern is yyyy-MM-dd HH:mm:ss).
  6. Create a new field called 'full_name' concatenating name and surname.
  7. Create a new field called 'full_address' concatenating street, city, zip and state.
  8. Change the type of the 'balance' field from text to decimal.
  9. And finally, click on Ok to create the view.

It's a good idea to execute this view to see if everything works as expected. Make changes to the view if needed and when the view works ok, go to the next point.


Configuring interface implementation

The last step of this tutorial is to configure the 'i_client_info' interface to use 'client_info_impl' as implementation view. So, open the interface in the workspace double-clicking on it and pressing "Edit" button.

Now, open the Implementation tab. Here you have to drag the implementation view of the interface (see next screenshot).

When done, click on Ok button to update your interface.

If the implementation view does not match the definition of the interface, the Implementation tab will be marked with a tooltip explaining why the view is not compatible with the interface.


Ok, your work have been done! Well... not yet... only a last step, let's test again your services (the same steps covered in the Invocation section) to see if when the Services are queried, Denodo executes the implementation view of the interface.

For example, test the REST data service using this URL:

and test the SOAP data service using in SOAPui application the same request as before:

It is important to know that you don't need to change/modify/update your data services. Only editing the virtualization layer will be enough. That's great!


You are finished the Denodo Data Services Tutorial set.

Thank you!!