I'm trying to call multiples request to some webservices. And I can't figure out how to do this.
I'm getting this error:
Amp\\MultiReasonException
Multiple errors encountered
I'm trying with this structure:
$arr =["ACT","BKH"];
$values = Promise\wait(parallelMap($arr, function ($time) {
$start = \microtime(true);
//\sleep($time); // a blocking function call, might also do blocking I/O here
//print_r($time); echo "</br>";
$str ="Sin procesar";
if ($time == "BKH"){
$start = \microtime(true);
//Yii::info('Procesando ...'.var_dump($time));
//---- desde aca ----
//---- hasta aca ----
$str = '('.$time .') Took ' . (\microtime(true) - $start) . ' seconds.';
// Yii::info('fin proceso ... demora: '.$str);
}
return $str;
}));
I'm running this with Yii framework.
If I uncomment Yii::info(...)
I get the error.
Because I need to consume web service, y added this between "//---- desde aca ----" and "//---- hasta aca ----"...
$client= new SoapClient($url_wsdl, array('trace' => 1,
'exceptions' => 1,
"connection_timeout" => 5000/1000,
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
'cache_wsdl' => WSDL_CACHE_NONE,
'encoding' => 'ISO-8859-1'));
and it works, $url_wsdl
is validated, but when I try to use another function, I get the error again..
The function is:
$obj = new SoapVar($xml, XSD_ANYXML);
I don't know where to look for examples (I already looked in examples folder) I can call native functions of php ??
Best Regards
okey !! What happens is that if there is an error in the function, the error is Excepted...
in my case, I have some variables not defined, and I should use new \\SoapVar
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.