Invocation of services

Invocation

At this point you have deployed your Data Services in the Denodo internal web container. One service is REST and the other is SOAP, let's see how to invoke them (it will be different).

Invoke a REST Web Service

If you are following all this set of tutorial, you already now how to invoke a REST service. In the Basics tutorial / Connecting from your app / RESTful web service you learnt how to query the RESTful web service. REST services will work the same way than the RESTful one but, in this case, you only have access to the views included when creating this REST service.

From a browser, you have to open the URL shown in the Context path of the service, in this case,
http://127.0.0.1:9090/server/tutorial/customer.

The browser will ask for the user to connect (admin / admin). Then, it will load a page like this one:

See the examples below to know how to query this service:

  1. http://127.0.0.1:9090/server/tutorial/customer/views/i_client_info -> returns all client data.
  2. http://127.0.0.1:9090/server/tutorial/customer/views/i_client_info?client_id=C005 -> returns the data for the client whose 'client_id' is 'C005'.

Now, always the error [INTERFACE_NOT_IMPLEMENTED] is returned.

NOTE

This is the normal behavior, remember you only created the interface to define the contract with your clients. Later, you will add the implementation.

Invoke a SOAP Web Service

SOAP Web Services are invoked using a SOAP client, for example, SoapUI. This kind of SOAP clients only need the WSDL file to create a client for the service.

To get the WSDL you can open a browser and go to the URL of the service: http://127.0.0.1:9090/server/tutorial/customerws, click on the SOAP link and finally, click on the wsdl link to allow the browser to show the content of the .wsdl file.

Copy the URL of the wsdl: http://127.0.0.1:9090/server/tutorial/customerws/services/customerws?wsdl, you will need it when using the SoapUI application.

TIP

Now, open SOAPui and create a new project using the URL of the WSDL. The application will create a request template for your operation. Don't forget to configure the authentication!:

  • Username: admin
  • Password: admin
  • WSS-PasswordType: PasswordText

The same as before, all queries will return the same error [INTERFACE_NOT_IMPLEMENTED] as expected.
Later, you will add the implementation.

NOTE

At this point, the infrastructure has been completed. Now, every team can work as their own:

  • One team, can work in the application side, to modify the app which will use your new Denodo service.
  • The other team (Denodo team), can work in the implementation of the service without modifying the Web Service. All changes will be in the Denodo views, there is no need to re-create the service (if the contract doesn't change).

The next section of the tutorial will show you how to add the implementation to your interface and how the services will return the results without redeploy them.