Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no 'iId' property
Question
I'm trying to query a SOAP API and am receiving the above error. If I was to take a guess I'd say it's relative to this snippet from my wsdl file...
<!-- User authentication -->
<element name="UserAuthentication">
<complexType>
<sequence>
<element name="iId" type="xsd:int" />
<element name="sPassword" type="xsd:string" />
<element name="sType" type="api:UserType" />
</sequence>
</complexType>
</element>
In getSoapResults()
- do you have any idea where I'd put 'iId'? In fact, I'm not even sure what 'iId' relates to at this point, other than an integer of course.
<?php
public function getSoapResults() {
$this->client = new SoapClient("http://api.example.com/v2/Example?wsdl");
$this->header = new SoapHeader('http://api.example.com/', 'sAPIKey', '*************');
$this->client->__setSoapHeaders($this->header);
$oRefineByDefinition = new stdClass();
$oRefineByDefinition->sId = 1203;
$oRefineByDefinition->sName = '';
$oRefineBy->oRefineByDefinition = $oRefineByDefinition;
$aParams7 = array(
"sQuery" => "jeans",
"bAdult" => 0,
"iOffset" => 0,
"iLimit" => 30,
"oActiveRefineByGroup" => $oRefineBy,
"sColumnToReturn" => array("sDescription","sBrand"));
// print '<pre>';print_r($aParams7); die;
$products = $this->client->getProductList($aParams7);
print_r($products);
}
I've tried adding it to the '$aParams'
array but this doesn't work.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow