2016-10-13 12 views
0

のインスタンスに設定されていません。ここでソープエラー:オブジェクト参照、私はこのエラーを取得していますオブジェクト

stdClass Object ([GetAllEntitiesResult] => Object reference not set to an instance of an object.)

$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); 
?> 

答えて

0

iは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); 

あなたはどのような結果を持っているか教えてください。

+0

私はまだ同じ結果を得ています – ParminderBrar

+1

オブジェクト(stdClass)#2(1){["GetAllEntitiesResult"] => string(53) "オブジェクト参照がオブジェクトのインスタンスに設定されていません。 } – ParminderBrar

+0

'__getLastRequest()'を使うときのリクエストは何ですか? SoapUIでwsdlの結果は何ですか? – Peacefull

関連する問題