繁体   English   中英

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

[英]Soap Error: Object reference not set to an instance of an object

我收到此错误:

stdClass对象([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);
?>

这是我用于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);

告诉我你有什么结果。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM