users@jaxb.java.net

Validator throws error for non-mandatory fields

From: Roshan Nair <roshan.nair_at_gmail.com>
Date: Tue, 12 Oct 2004 14:52:24 +0530

Hi,
         I am working on the UBL sample provided with jaxb (jwsdp
1.4). I used JAXB to create the order form. There are only four
elements that are always required (ie minOccurs="1"). These are ID,
IssueDate, BuyerParty, SellerParty.

         I created an Order object with only these four elements.
However when validating I get the following error:

[java] DefaultValidationEventHandler: [ERROR]: uncompleted content
model. expecting:
<AllowanceCharge>,<DeliveryTerms>,<DestinationCountry>,<FreightForwarderParty>,<OrderLine>,<SalesConditions>,
<org.oasis.ubl.commonaggregatetypes.AllowanceCharge>,<org.oasis.ubl.commonaggregatetypes.DeliveryTerms>,
<org.oasis.ubl.commonaggregatetypes.DestinationCountry>,<org.oasis.ubl.commonaggregatetypes.FreightForwarderParty>,
<org.oasis.ubl.commonaggregatetypes.OrderLine>,<org.oasis.ubl.commonaggregatetypes.SalesConditions>
     [java] Location: obj: org.oasis.ubl.order.impl.OrderImpl_at_f0c85e
     [java] There was a problem validating the order.

Now, all these elements have a minOccurs="0". Why do I get this error?
Where can I see a list of errors that ValidationEventHandler throws
and their interpretations?

The UBL schemas provided with the jwsdp1.4 distro are a subset of an
older version of UBL. I am creating the Order object in a single
class. I create instances of all the elements that are mandatory
within the same class. I don't think the issue is with my code.
Its fairly large so I'll post it if someone wants to look at it.
A similar question (uncompleted content model) was asked earlier but
the reply does not help here.

Thanks for the help.

Roshan Nair

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net