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

CurrentInvoice_CreateFromData: SOAP-ERROR: Encoding: object hasn't 'Date' property

0

Hi

 

I'm trying to create an invoice using the webservice: CurrentInvoice_CreateFromData and gets a weird error:

Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn't 'Date' property  
 
The strange part is that the Date property is parsed:
 
 
$data = array("data" => array("Number" => $deb_id), "DebtorHandle" => array("Number" => 1),"OtherReference" => $original_invoice_id, "Date" => date("Y-m-d h:i:s", time()));
var_dump($data );
$current_invoice = $service->soapCall('CurrentInvoice_CreateFromData', $data);
 
The code above outputs:
 
array(4) {
  ["data"]=>
  array(1) {
    ["Number"]=>
    string(3) "506"
  }
  ["DebtorHandle"]=>
  array(1) {
    ["Number"]=>
    int(1)
  }
  ["OtherReference"]=>
  string(5) "10379"
  ["Date"]=>
  string(19) "2014-09-30 10:20:00"
}
 
Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn't 'Date' property

 

 

created Sep 30, 2014 by koldstar2
0% Accept Rate

edited Sep 30, 2014 by koldstar2
Q 2 A 0 C 0

1 Answer

0
In case, you hit our API server with an error, it will always return an error id. If not, you are probably not even getting by the PHP SOAP client. In case of the former please send the error id to api@e-conomic.com, for further investigation.

/Morten
answered Oct 15, 2014 by mortenanders
Visma e-conomic A/S
...