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

CashBookEntry_CreateFromData throws exception

0
Why does the following


?xml version=10 encoding=UTF-8?
envEnvelope xmlnsxsd=http//wwww3org/2001/XMLSchema xmlnsxsi=http//wwww3org/2001/XMLSchema-instance xmlnseconomic=http//e-conomiccom xmlnsenv=http//schemasxmlsoaporg/soap/envelope/
  envBody
    economicCashBookEntry_CreateFromData
      economicdata
        economicTypeFinanceVoucher/economicType
        economicCashBookHandle
          economicNumber1/economicNumber
        /economicCashBookHandle
        economicAccountHandle
          economicNumber1010/economicNumber
        /economicAccountHandle
        economicContraAccountHandle
          economicNumber1011/economicNumber
        /economicContraAccountHandle
        economicDate2011-09-11T131702+0200/economicDate
        economicVoucherNumber11234/economicVoucherNumber
        economicTexttest/economicText
        economicAmountDefaultCurrency42/economicAmountDefaultCurrency
        economicCurrencyHandle
          economicCodeDKK/economicCode
        /economicCurrencyHandle
        economicAmount100/economicAmount
        economicDebtorInvoiceNumber xsinil=true/
        economicCreditorInvoiceNumber xsinil=true/
        economicDueDate2011-09-11T131717+0200/economicDueDate
        economicBankPaymentCreditorId0/economicBankPaymentCreditorId
        economicBankPaymentCreditorInvoiceId0/economicBankPaymentCreditorInvoiceId
        economicStartDate2011-09-11T131702+0200/economicStartDate
        economicEndDate2011-09-11T131722+0200/economicEndDate
      /economicdata
    /economicCashBookEntry_CreateFromData
  /envBody
/envEnvelope



Result in this error:

?xml version=1.0 encoding=utf-8?soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchemasoap:Bodysoap:Faultfaultcodesoap:Client/faultcodefaultstringEconomic.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=1775947948}/faultstringdetail //soap:Fault/soap:Body/soap:Envelope

At the same time, I get an error if I set DebtorInvoiceNumber og CreditorInvoiceNumber to anything but nil.
created Sep 11, 2011 by jespr
0% Accept Rate
Q 1 A 0 C 0

1 Answer

0
Hi,

CreditorInvoiceNumber is not 'nillable' per se - but you should be allowed to set it to the empty string.

In any case, note that neither DebtorInvoiceNumber, CreditorInvoiceNumber nor DueDate are relevant if the entry type is FinanceVoucher.


Best regards,
answered Sep 12, 2011 by Christian Estrup
Visma e-conomic A/S
...