[ class tree: reportico ] [ index: reportico ] [ all elements ]
Prev Next

Turning Reports into Web Services (currently unavailable)

Overview

All reports can be turned into web services. This means that each report you create has the capability of being invoked with a SOAP request XML packet and output is sent as a SOAP response XML packet. Criteria can be specified as part of the request to run the report.


Generating a Report Web Service

In order to generate the necessary files to allow a report to run as a web service, you must select the report in Design mode. Then select the Generate Web Service option from the Mode list box.

This generates 3 new files in the project directory where your xml files are stored. The contents of these files will appear in your browser in your screen. These files as follows:-

  1. WSDL file. This file is necessary for potential users of the web service to be able to understand how to run your report. It tells web services users what URL must be called in order to run your report and what criteria items can be passed. This file is named the same as the report XML definition file but with an extension of WSDL. The contents of the WSDL file are controlled by the Smarty template wsdl.tpl found in the Reportico templates directory.

    To view the WSDL from a browser enter the URL :-

        http://{HOST}/{REPORTICO_DIR}/projects/{PROJECT}/xxxxxx.wsdl
    
    where xxxxxx is the name of the Reportico report definition without the xml extension.

  2. Web Service Gateway script. This is a PHP script that web service users will call when they want to run your report. It is responsible for decoding the SOAP requests and passing them on the the report. It is also responsible for delivering the SOAP report output back to the web service user. This is named in the form xxxxxx_wsv.php where xxxxxx is the name of the Reportico report definition without the xml extension. The contents of this file are controlled by the Smarty template soapserver.php found in the Reportico templates directory.

    To check visibility of a gateway script after Web Service Generation, enter the URL :-

        http://{HOST}/{REPORTICO_DIR}/projects/{PROJECT}/xxxxxx_wsv.php
    
    where xxxxxx is the name of the Reportico report definition without the xml extension.

  3. Web Service Gateway test client script. This is a PHP script that can be run from the browser to test your web service. You will need to edit the script if you want to provide criteria values. The contents of this file are controlled by the Smarty template soapclient.php found in the Reportico templates directory.

    To run the test client script, enter the URL :-

        http://{HOST}/{REPORTICO_DIR}/projects/{PROJECT}/xxxxxx_wcl.php
    
    where xxxxxx is the name of the Reportico report definition without the xml extension.


Web Service Config Parameters

In order to generate reports as web services, you need to ensure that the following project parameters are configured in your config.php file :-

  1. SW_SOAP_NAMESPACE. This is the namespace you wish to use for your reports. It takes the format of mynamespace.org. Read more about namespaces but it should identify your collection of web services adn could your organistation name or service name.

  2. SW_SOAP_SERVICEBASEURL. This is full URL path to your Reportico installation directory. Therefore the default of http://127.0.0.1/reportico should be changed

    to reflect the external hostname/ip address and the location of your Reportico area. This path is used in generation of the web service files mentioned above.


Prev Up Next
The Output Menu Report Design Mode Reportico FAQ

Documentation generated on Mon, 09 Jun 2014 18:10:08 +0100 by phpDocumentor 1.4.3