{
* }
* ['value']=>{
* }
* }
*
*/
class service extends service_nbSOAP
{
var $Url;
/**
* web service provider method GetHit
*
* @param timeout : unsigned
* @return GetHitResult
*/
function GetHit($timeout)
{
return new nbSOAPFault("unimplemented", "The GetHitservice has not been implemented yet", "");
// Fill in web method fuctionality here.
// return a GetHitResult
}
}
/********************* Do not alter the generated code below ************************/
if($_SERVER['REQUEST_METHOD']=="GET")
{
echo "information call, front page, WSDL or function info. ";
echo "All this functionality still has to be written...";
}
else
{
$in = file_get_contents("php://input");
$action = $_SERVER['HTTP_SOAPACTION'];
$action = str_replace("\\\"","",$action);
$SoapClass = new service();
$soapXML = $SoapClass->PerformSoapAction($in, $action);
$soapXML = nbSOAP_Envelope($soapXML);
header("Content-Type: text/xml; charset=utf-8");
echo $soapXML;
}
class service_nbSOAP //extends nbSOAP
{
function PerformSoapAction($in, $action)
{
$xml = nb_easyxmldoc($in);
$body = $xml->findElement("Body", 0, "http://schemas.xmlsoap.org/soap/envelope/");
if($body == false)
return "SOAP body not found";
$params = $xml->findChildElement($body);
switch($action)
{
case "http://localhost:8080/dart/GetHit":
// deserialize parameters
$pidx = $xml->findChildElement($params, "timeout");
if($pidx != false)
$p_timeout = $this->desoap_unsigned($xml, $pidx, "timeout");
else
$p_timeout = null;
// call the method
$res = $this->GetHit($p_timeout);
if(is_a($res,"nbSOAPFault"))
{
return "\n" . $res->soapify() . "";
}
// serialize the result
$soapXML = $this->soapify_GetHitResult($res, "GetHit");
$soapXML = "" . $soapXML;
$soapXML .= "";
return "\n" . $soapXML . "";
break;
default:
return "Unrecognised SOAP action called.";
break;
}
}
}
?>