users@jaxb.java.net

Re: Set instead of List?

From: John G. Lussmyer <Cougar_at_CasaDelGato.Com>
Date: Fri, 09 Dec 2011 08:01:56 -0800

Well, those docs do seem to imply it's possible, but darned if I can
figure out the syntax needed.

What I have is a <xs:complexType> that contains multiple elements.
One element is:
<xs:sequence>
<xs:element name="ConsumerIdentifier" type="ConsumerIdentifier"
minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
What I want is for the get/setConsumerIdentifier() methods to use
Set<ConsumerIdentifier> instead of List<ConsumerIdentifier>.

Any suggestions on xsd syntax needed?


On 12/9/2011 4:17 AM, Farrukh Najmi wrote:
> On 12/08/2011 12:23 PM, cougar_at_casadelgato.com wrote:
>> Is there any way to have the xsd defined java objects have a Set
>> instead of a List?
>>
> You need to use a jaxb |collectionType |customization either globally
> or for a specific property binding:
>
> http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.5/tutorial/doc/JAXBUsing4.html
>
> --
> Regards,
> Farrukh Najmi
>
> Web:http://www.wellfleetsoftware.com
>


-- 
--
John G. Lussmyer	  mailto:Cougar_at_CasaDelGato.Com
Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com