How can I display the result of an XQuery query in a client server SOAP application? Below is what I have so far, it just prints hello and a name. How can I get it to process XQuery and return the result?
Client Code:
<?php
$client = new SoapClient("hidden");
echo "Functions:<br/><br/>";
echo var_dump($client->__getFunctions());
echo "<br/><br/>";
try
{
$return = $client->sayhello("Ross");
echo($return."<br>");
}
catch(SoapFault $soapFault)
{
echo ($soapFault);
}
?>
Server Code:
<?php
function sayhello($firstName) {
return "Hello ".$firstName;
}//sayhello
ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$server = new SoapServer("hidden");
$server->addFunction("sayhello");
$server->handle();
?>