Contenido

The Logginf Accounting Service Application has been developed by Imola Informatica.

 

Main features

work in progress

Software requirements and dependencies

Source code

The source code for the Enterprise Module is availbale on the SourceFroge web site, at the address:

By using a Subversion client, you can checkout it with the following

svn co https://ict-romulus.svn.sourceforge.net/svnroot/ict-romulus/trunk/Logging-AccountingService/

Configure Services Pubblication & Registration

in order to publish and register services correctly you have to change some annotation parameters on the source code.

open it.imolinfo.romulus.webservices.domain.LoggingImplementationWS and it.imolinfo.romulus.webservices.domain.AccountingImplementationWS class

and change annotation parameter, specifying the corrected annotations.

Build the Application

Build it from sources

From the root folder, once having installed a Roma distribution in your environment, you must call the following ant target:

ant install

You will find the result of the building and compilation in the directory:

<Logging-AccountingService>/dist

 

 Install and test the application

To deploy the appication on glassfish

copy the .war file from “dist” directory in the <Tomcat>\webapps folder and startup Tomcat

open your browser at http://localhost:8080/Logging-AccountingService/

if it's all right you should can see the web-application rendered in the browser

to see the registered services open your browser at http://localhost:8080/Logging-AccountingService/Services

if it's all right you should can see the list of published services

 

Tutorial

This is a simple tutorial that shows how to use the Logging-Accounting-Services Application features in order to register service-log and service-provision.
The Logging-Accounting-Services  Application is a web application created with  ROMA Meta Framework  that provides Logging and Accounting functionalities that can be accessed in two ways:


    • directly through the web application interface.
    •  using the web services interfaces provided by the application. 


This tutorial follow this organization:

the first paragraph report the whic information are required to enable Logging and Accounting Services and show how to set this information by using the Logging-Accounting Web Application.
the second paragraph show how to use the Logging functionalities and how to perform log registration via Web-Service.
he third show how to use the Accounting Service to register provisions and to obtain the Report.

Logging & Accounting Set up

in order to enable the Logging and Accounting Services features we have to access to the web application and set pre required information by executing following action:

•    create Service required for Logging and Accounting
•    create ServiceUser required for Logging and Accounting
•    create Severity required for the Logging
•    create ProvisionType  required for the Accounting
•    create ProvisionCost  required for the Accounting

We can execute these operation from the main page of the Web-Application, by  clicking on the specialized  Tab.
For example we report the Services creation:
To create new Service select tab Services and click “Nuovo”.

 

This operation will  show the following dialog.
 

Fill  the field Description, Provider, Name, Wsdl Url  and select the Provider object.
this action will open the following dialog.

 

Select the Service Provider if it exists or create new Service Provides as previosly described then save.
Repeat the described operation for each object you want to create, and now you are able to use the Logging and Accounting Web-Service.

Logging Services

Register Log

This section show how to register log using the Logging Web Service Interface.
For simplicity In our case we show this features using  simple Soap Client provided by SoapUI.
to test this feature using SoapUi create a new soapUI Project:
right-click on Projects >> New soapUI Project

this action will show the following dialog.

Specify project name and WSDL Uri and  click ok.
It will perform the WSDL download and it will show all the operation defined in the WSDL and provided by the Logging Service.


Select the operation  doLog  and open the request Request 1, fill the request with the Log information and invoke the operation.
After the invocation is completed, on your right will appear the invocation result.
To verify if the operation is done  and to see the service log,  log-in in the Logging-Accounting web-application, select Log-Entries's Tab and click search.

This operation will shows all logs stored and maintained by the Web Application.

Accounting Services

Register a service-provision

The service-provision registration is a functionality provided by the Accounting Service, and for  ServiceProvision registration we have to use the Accounting web-service functions.
ServiceProvision registration require the existence of  the following information:
Service,  ServiceUser,  ProvisionType and a ProvisionCost.
Be sure you have already created  these objects via Web Application as reported in the Logging & Accounting Set up paragraph .
In particular you have to invoke the “registerUser” operation.

when request is completed, on your right will appear the function's return.
To verify if the operation is done  and to see your service provision log-in in the Logging-Accounting web-application, select ServiceProvisions's Tab and click search, you will obtain all provisions stored and maintained by the application.

Make report

Make report is easy with web-services, you have to specific the user, the service, and the range of time that interests you with two dates.
There are two types of report  “ByInstance” or “ByTime”.
Suppose you want a report “ByTime”... assure that the specified user has been used the specified service otherwise the report returned will contains 0.0 seconds.
To test this features we can use a client like SoapUi as described for the logging service.

Important: for dates use one of these formats:
•    yyyy-mm-dd hh:mm:ss
•    yyyy-mm-dd

When your request has been processed you could  see the SUReportByTime object rendered on your right.
The report contains the total of seconds used and also a not-terminated usage's list if their start-date is in the specified range.