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

If the 'nillable' attribute is false in the schema, the 'xsi:nil' attribute must not be present in the instance

0

I am getting this error when trying to save a Current Invoice:

Savon::SOAPFault - (soap:Client) Economic.Api.Exceptions.SchemaException(E00500): If the 'nillable' attribute is false in the schema, the 'xsi:nil' attribute must not be present in the instance. (id=be746652-349f-4db6-aaf4-4bb50e5da0eb):

 

The current invoice looks like this:

<Economic::CurrentInvoice:70215250429420 partial=false, persisted=false, id=0, debtor_handle=#<Economic::Entity::Handle:0x007fb8861e9ab0 @number="1">, debtor_name=nil, debtor_address="1871 West str", debtor_postal_code=nil, debtor_city=nil, debtor_country="Austria", attention_handle=nil, date=2015-12-06 17:07:40 +0100, term_of_payment_handle=nil, due_date=2015-12-06 17:07:55 +0100, currency_handle=nil, exchange_rate=100, is_vat_included=false, layout_handle=#<Economic::Entity::Handle:0x007fb8861f2b10 @id=21>, delivery_date=nil, net_amount=0, vat_amount=0, gross_amount=0, margin=0, margin_as_percent=0, heading=nil, text_line1=nil, text_line2=nil>

closed with the note: resolved
created Dec 6, 2015 by usux
0% Accept Rate

closed Dec 8, 2015 by usux
Q 2 A 0 C 0

1 Answer

0
Hi usux

"If the 'nillable' attribute is false in the schema, the 'xsi:nil' attribute must not be present in the instance"
Yes. If the schema defines a field to be nillable:false it means that it must be defined.

DebtorName is not nillable/nullable. It must be defined.
answered Dec 7, 2015 by olej
Visma e-conomic A/S
...