本文整理匯總了PHP中Zend_Soap_Client::authenticate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Soap_Client::authenticate方法的具體用法?PHP Zend_Soap_Client::authenticate怎麽用?PHP Zend_Soap_Client::authenticate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Soap_Client
的用法示例。
在下文中一共展示了Zend_Soap_Client::authenticate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: clientAction
public function clientAction()
{
$start = microtime(true);
// Zend_Cache_Core::clean(); exit();
//$Http = new Zend_Controller_Request_Http();
// $sid = $this->start();
// $stop = microtime(true);
$client_auth = new Zend_Soap_Client("http://deposilnik.test.dev-lublin.adm/service/auth?wsdl");
$sid = $client_auth->authenticate("KMETYK-TEST", "root", '10.10.10.10', '206', "negocjator");
// zalogowanie moze byc wykonane ras i poprostu korzystac z tego samego sid
$head->ip = Zend_Controller_Action_HelperBroker::getStaticHelper('Currentip')->getCurrentIp();
$head->sid = $sid;
$client = new Zend_Soap_Client("http://deposilnik.test.dev-lublin.adm/service/monitor?wsdl");
try {
//$client->getNegotiationsCount($head);
//$client->getNegotiations($head, 0, 10);
//$client->getNegotiationDetails($head, $id, $advId);
//$client->getNotifications($head, $consultantId, $negotiationId);
print "<pre>\n";
print "Request :\n" . htmlspecialchars($client->getLastRequest()) . "\n";
print "Response:\n" . htmlspecialchars($client->getLastResponse()) . "\n";
print "</pre>";
print "Response:\n" . htmlspecialchars_decode($client->getLastRequestHeaders()) . "\n";
} catch (Exception $exc) {
echo $exc->getTraceAsString();
}
// Logic_WebService_User::getUser($head, 'KMETYK-TEST');
//Logic_SoapSession::destroy($sid);
$start2 = microtime(true);
//
// if(Logic_Soap_Acl::isPermitted( $head->sid, $head->ip, 'Logic_WebService_User', 'getUserById'))
// echo 'moze';
echo '<br/>auth = ' . (microtime(true) - $start2);
// $sac = new SoapAllowedClient();
//$chash = Logic_SoapSession::getById($head->sid)->getClientHash();
//$userSource = $sac->getUserSourceAssociationByClientHash($chash);
// echo '<br/>'.$chash.' - '.$userSource.'<br/>';
// ini_set('default_socket_timeout', 160);
// diee(ini_get('default_socket_timeout'));
try {
print_r($client->getUserById($head, 491));
echo '<br/>';
// print_r($client->getUser($head, 'KMETYK-TEST')); echo '<br/>';
// $start2 = microtime(true);
$id = 246;
$advId = 460;
// for ($i = 0;$i < 1;$i++){
// var_dump($client->getNegotiationDetails($head, $id, $advId));
/*
echo '<br/>'.($i+1).'<br/><hr/>';
}
*/
//print_r($client->getDictionary($head, 'province'));
//Dictionary
//print_r($client->getDictionary($head, 'province'));
//Handler
//print_r($client->setNegotiationNotification($head, '246', '491', $time, 'adrianredzik@wp.pl'));
//print_r($client->requestCounterOffer($head, 246));
//print_r($client->acceptNegotiation($head, 246));
//print_r($client->restoreNegotiation($head, 246));
//print_r($client->rejectNegotiation($head, 246, $rejectReason = 'Test'));
//? print_r($client->openNegotiation($head, $basicData));
//inputdata
//? print_r($client->getSettings($head));
//monitor
// print_r($client->sendDetailsEmail($head, 246, 'adrian.redzik@noblebank.pl'));
// print_r($client->sendDetailsEmail($head, 246, 'adrian.redzik@noblebank.pl'));
// echo '<br/><br/>';
// print_r($client->getNegotiationDetails($head,)); <-moj test
// print_r($client->getNegotiationDetails($head, 246, 460));
//user
// var_dump($client->getUserById($head, 491));
/* echo '<br/>';print_r($client->getUserById($head, 492));echo '<br/>';
print_r($client->getUserById($head, 493));echo '<br/>';
print_r($client->getUserById($head, 494));echo '<br/>';
print_r($client->getUserById($head, 495));echo '<br/>';
print_r($client->getUserById($head, 496));echo '<br/>';
print_r($client->getUserById($head, 497));echo '<br/>';
print_r($client->getUserById($head, 498)); */
// print_r($client->getUser($head, 'KMETYK-TEST'));
echo '<br/>skrypt = ' . (microtime(true) - $start2);
print "<pre>\n";
print "Request :\n" . htmlspecialchars($client->getLastRequest()) . "\n";
print "Response:\n" . htmlspecialchars($client->getLastResponse()) . "\n";
print "</pre>";
print "Response:\n" . htmlspecialchars_decode($client->getLastRequestHeaders()) . "\n";
} catch (SoapFault $e) {
print $e->getMessage();
// exit;
}
echo htmlspecialchars($client->getLastRequest());
echo '<hr/>';
print "Response:\n" . htmlspecialchars($client->getLastResponse()) . "\n";
$go = microtime(true) - $start;
diee($go);
exit;
}