I think that some toolkit I tried to use to build a client once-upon-a-time gave me an array, and I've been exhibiting allergic behavior ever since.
> -----Original Message----- > From: Daniel Kulp [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 11, 2007 10:28 AM > To: cxf-user@incubator.apache.org > Cc: Benson Margulies > Subject: Re: Best practices with min/max occurs/nillable and JAXB > > On Thursday 11 October 2007, Benson Margulies wrote: > > Fellow users: > > > > When using JAXB code-first, how much do people worry about the > > irritation of Java strings mapping to arrays? > > Well, I personally don't consider minOccurs="0" maxOccurs="1" to be an > array. That's and "optional" element, not an array. Thus, IMO, it > isn't an irritation as it's not an array. None of the standard JAVA > toolkits would map such a construct to an Array. > > Dan > > > That is: String foo: > > > > Turns into an array of 0 or 1 strings, to account for the possibility > > of null versus "" versus "foobar". > > > > One can clean this up with XmlElement. My question is, how often do > > people bother? > > > > -- > J. Daniel Kulp > Principal Engineer > IONA > P: 781-902-8727 C: 508-380-7194 > [EMAIL PROTECTED] > http://www.dankulp.com/blog