You are not logged in.
Pages: 1
Topic closed
Is there any place where I modify the response mode of the webservice plugin?
Before I received a well summarized array return, type:
Protocol: xml-rpc, Method: glpi.test, Function: PluginWebservicesMethodCommon::methodTest
Params: none
Compression: Server:/On, Config:1, Agent:?
Duration: 0.058
Response size: 83
Response content: Array
(
[glpi] => 0.90.5
[webservices] => 1.6.0
[pdf] => 1.0.3
)
I now seemingly get the contents of the xml file directly:
+ Calling 'glpi.test' on https://domain.com/plugins/webservices/xmlrpc.php
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>glpi</name>
<value>
<string>0.90.5</string>
</value>
</member>
<member>
<name>webservices</name>
<value>
<string>1.6.0</string>
</value>
</member>
<member>
<name>pdf</name>
<value>
<string>1.0.3</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
+ Bad response
I would like to return it as the first mode (array), since I already have a structure to handle the returns.
I looked at the general settings and the plugin itself, but nothing had any effect on the change (including reinstalling it).
Offline
Webservices still return an array.
What is your request sended?
Versions of plugin and GLPI?
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Command:
php testxmlrpc.php --host=domain.com --username=user --password=pass --url=plugins/webservices/xmlrpc.php --method=glpi.test
GLPI 0.90.5
Plugin Version: 1.6.0
Last edited by bgcorreia (2017-03-22 17:20:25)
Offline
In your param url you must indicate glpi
--url=glpi090/plugins/webservices/xmlrpc.php
For me
+ Calling 'glpi.test' on http://localhost/glpi090/plugins/webservices/xmlrpc.php
+ Response: Array
(
[glpi] => 0.90.5
[pdf] => 1.0.3
[webservices] => 1.6.1
[appliances] => 2.2.1
)
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
My glpi directory is the document root of server name "domain.com". There is nothing wrong with the request, I use the same syntax in other versions, and even this one a while back.
I believe the "problem" was caused by someone (not me ) having installed several plugins on this server, somehow have modified something in the structure, I do not know exactly.
I migrated to version 9.1 (clean installation, just importing the database) using the plugin 1.6.1 and everything is normal.
Thank you
Offline
Thanks for news
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Pages: 1
Topic closed