I created the service and try to fetch the data from the drupal by creating a my_service content type but not able to get the data...the code for fetching the data follows..can any tell what i m doing wrong in the following code..i m using web services on my localhost
<?php
function my_service_service(){
return array(
array(
'#method' => 'myservice.all',
'#callback' => 'my_service_all',
'#retun' => 'array',
'#help' => 'This return the services created by me'
),
);
}
function my_service_all() {
$result = db_query("SELECT nid FROM {node} WHERE type = 'my_service'");
$nodes = array();
while ($node = db_fetch_object($result)){
$nodes[] = node_load($node);
}
return $nodes;
}
Comments
Comment #1
damien tournoud commentedReassigning to the correct project.
Comment #2
marcingy commented'#retun' should be #return is likely the problem.
Comment #3
marcingy commentedComment #4
marcingy commentedclosing as no follow up.