我正在使用SOAP和PHP连接到web服务。现在我得到的结果值作为一个数组,我认为。
try
{
$result = $soapClient->__soapCall("CreateVehicleInsurancePolicy", array($parameters), null, $soapHeaders, $output_headers);
}
当i print_r($output_headers);它将输出如下
Array ( [SoapHeaderOut] => stdClass Object ( [intResponseCode] => 100 [strArMsg] => الرمز المروري المدخل للمالك غير موجود ÙÙŠ المل٠المروري [strEnMsg] => The entered traffic code for the owner does not exist in the traffic file. ) )
我想分别打印这3个变量。我怎么能那样做呢?我对这些东西很陌生。
尝试这样访问
echo $output_headers['SoapHeaderOut']->intResponseCode;
echo $output_headers['SoapHeaderOut']->strArMsg;
echo $output_headers['SoapHeaderOut']->strEnMsg;