Hi,
I'm using the PHP Automation Client to execute a simple query and I have an error on it, and I don't know how can I resolve it. Obviously I changed the url of Nuxeo, and the correct username and password when I get a session.
Here the code:
$client = new PhpAutomationClient('http://localhost:8080/nuxeo/site/automation');
$session = $client->getSession('Administrator','Administrator');
$answer = $session->newRequest("Document.Query")->set('params', 'query', "SELECT * FROM Document" )->sendRequest();
$documentsArray = $answer->getDocumentList();
And here the error:
Fatal error: Call to a member function getDocumentList() on a non-object in C:\wamp\www\utils\test.php on line 118
But, If before getDocumentList(), I do a var_dump($answer), I see the JSON document listing all documents that means that I received the server answer.
Can someone explain me what's the problem? Thanks in advance!