You should get methods like gettypes, getconfig, getstatus in class myType
after you compile the schema using xjc.sh . I think bindings are useful when
you want to override default binding for specific implementation that JAXB
internally uses. Anyone - correct me if I am wrong.
On 4/3/08, Ajay Aggarwal <aaggarwal_at_covergence.com> wrote:
>
> Using JAXB2.0 generated classes, is it possible to differentiate between
> these children using generated types etc.? Are there any specific binding
> customizations to deal with this situation? Below is an example of the
> schema fragment:
>
>
>
> <xsd:complexType name="myType">
>
> <xsd:sequence>
>
> <xsd:choice maxOccurs="unbounded">
>
> <xsd:element name="types" type="myClassType"/>
>
> <xsd:element name="config" type="myClassType"/>
>
> <xsd:element name="status" type="myClassType"/>
>
> </xsd:choice>
>
> </xsd:sequence>
>
> </xsd:complexType>
>
>
>
> Or is my only option is to use element's name to differentiate between
> them? For example when I unmarshal and get an instance of JAXBElement, how
> do I know if it's a "types", or "config" or "status" element?
>
>
>
> Thanks.
>