AnsweredAssumed Answered

How to get properties from php webservice node?

Question asked by cperez on Sep 3, 2014
Latest reply on Sep 5, 2014 by cperez
Hi all!

I have a php code to get some documents through a query.
I want to show some properties of the node, but I'm not able to.

This is the query:

$nodes = $session->query($currentStore, $path."/cm:".$cif."/cm:".$space_riegos."\"");

And this where I show all the child node properties

foreach ($nodes[0]->children as $node)
           <td><?php echo $node->child->id; ?></td>
      <td><?php echo $node->child->cm_name; ?></td>
      <td><?php echo $node->child->properties["dig:Doc_name"]; ?></td>

I only see the 'id' and 'cm_name' property, and trying to show the property "dig:Doc_name" shows me the following error:

Notice: Undefined index: dig:Doc_name in C:\xampp\htdocs\api\queryExecuter.php on line 229

I've tried the following properties but all shows me the same message (But with the corresponding property).

<td><?php echo $node->child->properties["Doc_name"]; ?></td>
<td><?php echo $node->child->properties["cm:name"]; ?></td>
<td><?php echo $node->child->properties["name"]; ?></td>
<td><?php echo $node->child->properties["title"]; ?></td>
<td><?php echo $node->child->properties["cm:title"]; ?></td>

Anyone know how I fix this ?
Is it possible to add as a filter in the query some property (like "[diff: doc_id] == '789fe12'")?

Thank you very much in advance