肥皂错误:对象引用未设置为对象的实例

时间:2016-10-13 09:43:07

标签: php soap

我收到此错误:

  

stdClass Object([GetAllEntitiesResult] =>对象引用未设置为对象的实例。)

$wsdl = "http://192.168.25.10:200/FXOWS.asmx?WSDL";    
$username="xxxx";    
$password="xxxxx";    
$orgid="x";    
$client = new SoapClient($wsdl);     
$token_ob = $client->GetAllEntities(array('userName'=>$username, 'passWord' =>$password,'OrgID' =>$orgid));    
print_r($token_ob);
?>

1 个答案:

答案 0 :(得分:0)

以下是我用于SOAP的代码段,您必须根据需要进行调整:

$params = array('userName' => $username,
                'passWord' => $password,
                'OrgID'    => $orgid,
          ));

$wsdl = "http://192.168.25.10:200/FXOWS.asmx?WSDL";

$options = array(
        'uri'=>'http://schemas.xmlsoap.org/soap/envelope/',
        'style'=>SOAP_RPC,
        'use'=>SOAP_ENCODED,
        'soap_version'=>SOAP_1_1, // depends of your version
        'cache_wsdl'=>WSDL_CACHE_NONE,
        'connection_timeout'=>15,
        'trace'=>true,
        'encoding'=>'UTF-8',
        'exceptions'=>true,
        );

    $soap = new SoapClient($wsdl, $options);
    $token_ob = $soap->GetAllEntities($params);

    var_dump($token_ob);

告诉我你的结果是什么。

相关问题