JAXB unmarshalling problem

T

Timo Nentwig

Hi!

I defined an element foo maxOccurs="unbounded".


<xs:element name="foo" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute
name="id" type="xs:string" use="required" />
</xs:complexType>
</xs:element>


xjc generates somewhat strange code (List getQuery() and no Setter, no
delegate method) but at least it does work on marshalling:

List l = bar.getFoo();
l.add(one);
l.add(two);

XML as expected:

<foo id="oneid" />
<foo id="twoid" />

But unmarshalling throws an exception without any more details:

Exception in thread "main" javax.xml.bind.UnmarshalException
at
org.apache.ws.jaxme.impl.JMUnmarshallerImpl.unmarshal(JMUnmarshallerImpl.java:135)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top