users@jaxb.java.net

Re: JAXB mapping

From: Malachi de Ælfweald <malachid_at_gmail.com>
Date: Tue, 28 Aug 2007 07:26:01 -0700

If I had to guess, I'd say that the reason is your min=0 and
max=unbounded... You are saying that a single item may contain unlimited
number of titles and ISBNs.

I think what you really want is the 'Item' sequence to have only one
instance of 'title' and 'ISBN' -- then the calling template to wrap it in a
list.

Malachi

On 8/28/07, Denis <java2xp_at_gmail.com> wrote:
>
> Hi,
>
>
> JAXB maps
>
> <xsd:complexType name="Item">
> <xsd:sequence minOccurs="0" maxOccurs="unbounded">
> <xsd:element name="titel" type="xsd:string" minOccurs="1"/>
> <xsd:element name="isbn" type="xsd:string" minOccurs="1"/>
> </xsd:sequence>
> </xsd:complexType>
>
> to
> public List<JAXBElement<?>> getTitelAndIsbn()
>
>
> but I want to have String getTitel() and String getIsbn() methods. How I
> may have it?
>
>