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

Order_CreateFromData throws exception with 'had invalid child element "DebtorHandle"'



I hope you guess can help me with this Order creation problem.
It seems that no matter what properties I set on the order, I get this error.

Response looks like:

Economic.Api.Exceptions.SchemaException(E00500): The element 'data' in namespace 'http://e-conomic.com' has invalid child element 'DebtorHandle' in namespace 'http://e-conomic.com'. List of possible elements expected: 'DebtorName, DebtorAdd
ress, DebtorPostalCode, DebtorCity, DebtorCountry, DebtorEan, PublicEntryNumber, AttentionHandle, YourReferenceHandle, OurReferenceHandle, OurReference2Handle, Date' in namespace 'http://e-conomic.com'. (id=d2c70ca7-9eef-413f-898f-336e3f82ce6b)

Request looks like this:

<?xml version="1.0" encoding="UTF-8"?>
        <tns:DebtorName xsi:nil="true"/>
        <tns:DueDate xsi:nil="true"/>
        <tns:IsVatIncluded xsi:nil="true"/>
        <tns:DeliveryDate xsi:nil="true"/>
Can you help me correct the request, and pin-point me, so that I include all the requireded properties, in the request, for the request to succeed?
created Mar 7, 2016 by mathiasjakobsen
33% Accept Rate
Q 3 A 0 C 3

1 Answer

Best answer
Hi Mathias

You're deviating from schema which throws off the validation.


For starters you haven't defined handle. But please use the wsdl for full schema reference.

Edit: Solution found via API support. It is crucial that the elements come in the same order in the XML as defined by the WSDL. The cause here was scrambled order of the elements.
answered Mar 14, 2016 by olej
selected Apr 15, 2016 by olej
Hi Olej,

Even though I alter the request to have all required elements, I still get the error. Even if I fetch an existing Order, removes the Id and tries to create from the exact same data, the error occours. Do you have acces too the API logs, so that you can help me solve this?
Visma e-conomic A/S