I'm going a bit crazy here trying to get JAXB to do what I want. The problem I'm having is when I want to have a list with more than one type of element in the list. I'm using a choice element in my schema with maxOccurs="unbounded". The problem is when I marshall, the tags of the listed elements are missing. Their children show up, unfortunately now they are the children of the parent of the list! Unmarshalling works fine. Is this a problem with JAXB, or am I misusing the choice element?
The relevant part of the schema is something like:
The output SHOULD look like:
Instead I get:
The starter and reserve tags just disappear. I find this amazing since the output came from classes specifically for those tags.