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

damien tournoud’s picture

Project: Drupal core » Services
Version: 6.15 » 6.x-2.x-dev
Component: node system » Code

Reassigning to the correct project.

marcingy’s picture

'#retun' should be #return is likely the problem.

marcingy’s picture

Status: Active » Postponed (maintainer needs more info)
marcingy’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

closing as no follow up.