ho provato a scrivere questo su un file php per tentare di utilizzare la funzione ricerca definita nel webservice....però non vedo niente....

<?php
require_once("nusoap.php");
include ("config.php");
include ("top_foot.php");
//include("http://localhost:81/provamia.php");
//<soap:address location="http://localhost:81/provamia.php"/>

$categoria=$_REQUEST['categoria'];
$valore=$_REQUEST['valore'];
top();
echo'Risultati ricerca:';


$wsdl="http://localhost:81/provamia.php?wsdl";
$client=new soapclient($wsdl, true);
$param=array('str1'=>'nome', 'str2'=>'Piero');
echo $client->call('ricerca', $param);


//$result=ricerca($categoria, $valore);

?>
<form method="post" action="ricerca.php">


<input type="submit" value="Cerca ancora" />
</form>
<form method="post" action="home.php">


<input type="submit" value="Home" />
</form>

<?
// chiusura pagina
foot();
?>

ho modificato così il webservice in modo che stampi direttamente lui i risultati (almeno vorrei che così fosse)
<?

require_once("nusoap.php");
include ("config.php");

define("NAMESPACE", "http://localhost:81");

$server = new soap_server;

$server->debug_flag=false;


$server->configureWSDL('GestioneDati', NAMESPACE);
$server->wsdl->schemaTargetNamespace = NAMESPACE;


$server->wsdl->addComplexType('search','complexType','struct', 'all','',array('user' =>array('name'=>'user','type'=>'xsd:string'),'pass ' =>array('name'=>'pass','type'=>'xsd:string'), 'datasource' =>array('name'=>'datasource','type'=>'xsd:string') , 'database' =>array('name'=>'database','type'=>'xsd:string'),) );

$server->register('ricerca',array('categoria'=>'xsd:string ', 'valore' => 'xsd:string'),array('return'=>'tns:risultati'),NAM ESPACE);


function ricerca($categoria, $valore) {
$link = mysql_connect($db_host, $db_user, $db_password) or die('Could not connect: ' . mysql_error());
mysql_select_db($db_name) or die('Could not select database');

$query = "SELECT * FROM contatti WHERE $categoria = '$valore'";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

$dato=$result;
//mysql_free_result($result);
mysql_close($link);

echo "<table>\n";

while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
return $dato;
}

$HTTP_RAW_POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ?$GLOBALS['HTTP_RAW_POST_DATA'] : '';
$server->service($HTTP_RAW_POST_DATA);
exit();
?>

dov'è l'errore???