0
자동차 API를 쿼리하기 위해 SOAP 요청을 작성하려고합니다. 호출을 실행할 때마다 다음과 같은 클라이언트 오류가 발생합니다.Soapclient가 내 accountInfo 개체를 인식하지 못하는 이유
Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn't 'accountInfo' property in ...
그러나 속성으로 정의했습니다. 아래의 관련 줄 :
DEFINE ('API_ENDPOINT',"http://services.chromedata.com/Description/7a?wsdl");
DEFINE ('API_SECRET',"xxx");
DEFINE ('API_ACCTNO',"123456");
DEFINE ('DEBUG',"1");
$useridentification = array('accountInfo' =>array('_'=>"",'number'=>API_ACCTNO, 'secret'=>API_SECRET, 'country'=>'US', 'language'=>'EN', 'behalfof'=>'?'));
enter code here
$vinobject = array('vin'=>$vin);
$buildrequest=array($useridentification, $vinobject);
$client = new SoapClient(API_ENDPOINT);
$response = $client->describeVehicle($buildrequest);
비누 API를 정기적으로 사용하는 사람들에게는 분명히 분명합니다.