='.htmlentities($m[2][$i]).'';
}
return ''.htmlentities($start).$mid.htmlentities($end).'';
}
ini_set('soap.wsdl_cache_enabled', '0');
//header('Content-Type: text/plain; charset=UTF-8');
try {
$cli = new SoapClient('url_to_farm.wsdl_file', array('trace' => 1, 'soap_version' => SOAP_1_1));
if(isset($_GET['a'])) {
print_r($cli->authenticateRemoteAppAndRun('remoteapp', 'pwd', 'animalExists', array('name' => $_GET['a'])));
}elseif(isset($_GET['d'])) {
print_r($cli->authenticateRemoteAppAndRun('remoteapp', 'pwd', 'animalDelete', array('name' => $_GET['d'])));
}elseif(isset($_GET['new'])) {
print_r($cli->authenticateRemoteAppAndRun('remoteapp', 'pwd', 'animalCreate', array('name' => $_GET['new'])));
}
if(isset($_GET['a']) || isset($_GET['d']) || isset($_GET['new'])) echo ''.getLastRequestFormated($cli).'
';
foreach($cli->authenticateRemoteAppAndRun('remoteapp', 'pwd', 'animalsList') as $w) echo ''.$w['name'].' check del
';
//print_r($cli->authenticateRemoteAppAndRun('remoteapp', 'pwd', 'animalsList'));
echo 'NEW
';
echo ''.getLastRequestFormated($cli).'
';
}catch(SoapFault $f) {
die('SOAP::Client fault : '.$f->getMessage());
}
?>