SOAP java.lang.NullPointerException 错误

问题描述 投票:0回答:1

我在网上进行了研究,但找不到我的问题的确切答案。我正在尝试向 SOAP 服务发出请求。当我尝试使用 SOAPUI 时,我可以得到正确的响应,但当我尝试使用 PHP 时,我什么也得不到。

这是 SOAPUI 的屏幕截图:(备份 URL:http://i.hizliresim.com/qGaOOd.png

这是我的 PHP 代码:

    <?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$wsdl = "http://www.estes-express.com/shipmenttracking/services/ShipmentTrackingService?wsdl";

$options = array(
  'auth' => array(
    'user' => 'myuser',
    'password' => 'mypass'
  )
);

$request = array(
  'search' => array(
    'requestID' => '0841824923',
    'pro' => '0841824923'
  )
);



$client = new SoapClient($wsdl, $options);
echo '<pre>'.print_r($client,true).'</pre>';
try{
    $response = $client->__soapCall('trackShipments', array($request));
    print_r($response);
} catch(SoapFault $ex){
    echo $ex->getMessage();
}

print "\n";

当我运行此脚本时,它返回此错误:“java.lang.NullPointerException”

有什么解决办法吗?预先感谢。

php web-services soap
1个回答
0
投票

Deniz hocam merhaba daha önceki konularına baktım bir kaç konuda sana danışmam gerekiyor nasıl ulaşabilirim sana?

© www.soinside.com 2019 - 2024. All rights reserved.