Php 在SOAP中处理XQuery
如何在客户机-服务器SOAP应用程序中显示XQuery查询的结果?下面是我到目前为止得到的,它只打印了hello和一个名字。如何让它处理XQuery并返回结果 客户端代码:Php 在SOAP中处理XQuery,php,web-services,soap,xquery,Php,Web Services,Soap,Xquery,如何在客户机-服务器SOAP应用程序中显示XQuery查询的结果?下面是我到目前为止得到的,它只打印了hello和一个名字。如何让它处理XQuery并返回结果 客户端代码: <?php $client = new SoapClient("hidden"); echo "Functions:<br/><br/>"; echo var_dump($client->__getFunctions()); echo "<br/><br/
<?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);
}
?>
服务器代码:
<?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();
?>
您尚未指示此服务器正在运行。 XQuery是一种嵌入式语言,除了在基于XQuery的应用服务器(如eXist或MarkLogic)上之外,通常不“内置” 这看起来像一个复制品