You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2011-06-28 08:35:57

rtassoni
Member
Registered: 2011-06-28
Posts: 1

Data injection using webservices under GLPI v0.78.5

Hi GLPI experts

Testing on a CentOS 5 system I have been unable to inject CSV contents into the Computer itemtype via. the DataInjection v2.0.2 plugin using the supplied testwebservices.php script run as follows:

php testwebservice.php  --host=127.0.0.1 --url=/glpi/plugins/webservices/xmlrpc.php --username=tech --password=tech --uri=/dataDirectory/testdata.csv  --models_id=2  --entities_id=0

It appears an empty XML document is returned when the datainjection.inject method is called.

The same CSV data file can be injected successfully using the same model via. the FileInjection web form. The model allows for record insert/update, child entities and creation of dropdowns and updates to existing fields.
Name    Private    Entity    Child entities    Type    Status
ComputerCSVModel    No    Root entity    Yes    Computer    Model available for use

The "tech" account profile has write access for FileInjection. The WebServices v1.0.0 plugin is configured for unrestricted localhost access and the datainjection methods are marked as available. Running the script substituting the datainjection.inject method with datainjection.listModels or datainjection.listItemtypes does return responses for those list methods. Preliminary debugging has established the CSV file is uploaded to the  PLUGIN_DATAINJECTION_UPLOAD_DIR and read by DataInjection webservices.class.php.

Thanks for any advice.

Offline

#2 2011-06-28 14:34:18

wawa
GLPI-DEV
From: Montpellier / France
Registered: 2006-07-03
Posts: 6,019
Website

Re: Data injection using webservices under GLPI v0.78.5

hello
I'll only be functionnal with version 2.0.2 for GLPI 0.80
on 0.78, it's broken

Offline

Board footer

Powered by FluxBB