API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Debtor_updateFromdata() Error

0
when updating the debtor ,
got error like this


Notice: Object of class stdClass could not be converted to int in /opt/lampp/lib/php/DataHub_EConomic/DataHub_EConomic_Webservices.php on line 479SOAP-ERROR: Encoding: object has no 'Id' property


code :


 $debtordata = array(Number =  $row['customer_id'],
Handle = array(Number = $first_debtor_group_handle),
'Number' = $row['customer_id'],
'VatZone' = 'EU',
 'IsAccessible' = true,
 'Name' = $row['firstname'],
 'Email' = 'ssss@gmail.in',
 'CINumber' = 143,
 'TelephoneAndFaxNumber' = '111111',
 'Website' = 'www.google.in',
 'Address' = $row['address_1'],
 'PostalCode' = $row['postcode'],
 'City' = $row['city'],
 'Country' = 'INDIA',
'DebtorGroupHandle' = $debtor_group_handles,
//'CurrencyHandle' = $currency_handle,
// 'TermOfPaymentHandle' = $term_handle,

);*/

//$this-client-Debtor_UpdateFromData(array('Number' = 1,data = $debtordata))Debtor_UpdateFromDataResult;
 // $this-client-Debtor_UpdateFromData(array('number' = 1,'data' = (object)$debtordata))-Debtor_UpdateFromDataResult;
//echo updated successfully;


error :

Notice: Object of class stdClass could not be converted to int in /opt/lampp/lib/php/DataHub_EConomic/DataHub_EConomic_Webservices.php on line 479SOAP-ERROR: Encoding: object has no 'Id' property

How cani fix this problem

please give me some suggetions....
created Mar 20, 2013 by sudheerphp
22% Accept Rate
Q 14 A 10 C 0

1 Answer

0
Hi Sudheerphp,

My guess is that your Xml isn't correct. Try to use Fiddler2 to look at the Xml and see if any attributes named Id are present on your Xml tags. If you see any, make sure they are removed before making your request.

Best regards,
Rasmus Beck
Developer, e-Conomic
answered Apr 3, 2013 by rbb
Visma e-conomic A/S
...