本文整理汇总了PHP中soapclient::__soapCall方法的典型用法代码示例。如果您正苦于以下问题:PHP soapclient::__soapCall方法的具体用法?PHP soapclient::__soapCall怎么用?PHP soapclient::__soapCall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类soapclient
的用法示例。
在下文中一共展示了soapclient::__soapCall方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: soapclient
//-- credentials are not empty
if (isset($_POST['login']) && $_POST['login'] != '' && isset($_POST['password']) && $_POST['password'] != '') {
//-- file is not in error
if (isset($_FILES['inputFile']['error']) && $_FILES['inputFile']['error'] == '0') {
//-- file is a zip
if (isset($_FILES['inputFile']['type']) && $_FILES['inputFile']['type'] == 'application/zip') {
//-- loas class nusoap.php
require_once '/var/www/appli/lib/nusoap.php';
//-- url webservice
$url = 'http://connect.stage.exaprint.fr/?wsdl';
//-- load client nusoap
$client = new soapclient($url);
//-- load credentials (customers of front)
$credentials = array('username' => str_replace("'", "''", $_POST['login']), 'password' => str_replace("'", "''", $_POST['password']));
//-- call WS to create Token
$token = $client->__soapCall('getToken', array($credentials));
//-- if issues with the creation of token
if (isset($token->error->code) && $token->error->code != '') {
//-- generate error message
switch ($token->error->code) {
case '0':
$error = 'Internal error';
break;
case '-1':
$error = 'Access denied';
break;
default:
$error = 'unknow error';
break;
}
//-- print error
示例2: serialize
$log->Calificacion = $result->Resultado->Calificacion;
$log->URLVerResultados = $result->Resultado->URLVerResultados;
add_to_log(3, 12, serialize(addslashes_object($log)));
/// save log registering the number of details
add_to_log(3, 13, serialize(count($result->Detalles)));
$params = new ResultadoDetalleExtendido();
$params->ResultadoExtendido = new SoapVar($result, SOAP_ENC_OBJECT, "SeguimientoExtendido", "http://educacio.gencat.cat/agora/seguimiento/");
$client = new soapclient($reg_session->wsurltracking . '?wsdl', array('trace' => 1));
$auth = array('User' => $reg_credential->username, 'Password' => $reg_credential->password);
$namespace = rcommond_wdsl_parser($reg_session->wsurltracking . '?wsdl');
$header = new SoapHeader($namespace, "WSEAuthenticateHeader", $auth);
$client->__setSoapHeaders(array($header));
/// save log registering the call to ws tracking
add_to_log(3, 14);
try {
$response = $client->__soapCall("ResultadoDetalleExtendido", array($params));
} catch (Exception $e) {
print_r($e);
}
//delete session information
if ($response->ResultadoDetalleExtendidoResult->Resultado == 'OK') {
// XTEC *********** DELETED -> Take out the session delletion to keep it in hierarchical books
// 2011.09.02 @mmartinez
//delete_records("sessions", 'token', $token);
// ********** FI
echo "OK";
} else {
$descError = "WS response error: " . $response->ResultadoDetalleExtendidoResult->DetalleError->Codigo . " - " . $response->ResultadoDetalleExtendidoResult->DetalleError->Descripcion;
//have to add it to idiomatic files
echo $descError;
add_to_log(3, '3-1', serialize($descError), true);
示例3: soapclient
//-- credentials are not empty
if (isset($_POST['login']) && $_POST['login'] != '' && isset($_POST['password']) && $_POST['password'] != '') {
//-- orderId is not empty
if (isset($_POST['orderId']) && $_POST['orderId'] != '') {
//-- reason is not empty
if (isset($_POST['reasonId']) && $_POST['reasonId'] > '0') {
//-- loas class nusoap.php
require_once '/var/www/appli/lib/nusoap.php';
//-- url webservice
$url = 'http://connect.stage.exaprint.fr/?wsdl';
//-- load client nusoap
$client = new soapclient($url);
//-- load credentials (customers of front)
$credentials = array('username' => str_replace("'", "''", $_POST['login']), 'password' => str_replace("'", "''", $_POST['password']));
//-- get Token
$token = $client->__soapCall('getToken', array($credentials));
//-- if issues with the creation of token
if (isset($token->error->code) && $token->error->code != '') {
//-- generate error message
switch ($token->error->code) {
case '0':
$error = 'Internal error';
break;
case '-1':
$error = 'Access denied';
break;
default:
$error = 'unknow error';
break;
}
//-- print error
示例4: microtime
*
*/
$time_start = microtime(true);
//-- credentials are not empty
if (isset($_POST['login']) && $_POST['login'] != '' && isset($_POST['password']) && $_POST['password'] != '') {
if (isset($_POST['orderId']) && $_POST['orderId'] != '') {
//-- loas class nusoap.php
require_once '/var/www/appli/lib/nusoap.php';
//-- url webservice
$url = 'http://connect.stage.exaprint.fr/?wsdl';
//-- load client nusoap
$client = new soapclient($url);
//-- load credentials (customers of front)
$credentials = array('username' => str_replace("'", "''", $_POST['login']), 'password' => str_replace("'", "''", $_POST['password']));
//-- get Token
$token = $client->__soapCall('getToken', array($credentials));
//-- if issues with the creation of token
if (isset($token->error->code) && $token->error->code != '') {
//-- generate error message
switch ($token->error->code) {
case '0':
$error = 'Internal error';
break;
case '-1':
$error = 'Access denied';
break;
default:
$error = 'unknow error';
break;
}
//-- print error