Your XML Schema snippet is incomplete and incorrect.
Please post a correct XML Schema, clearly indicating whether an
<xs:element> is a child of <xs:schema> or something else.
Also, post exactly (!) the Java code JAXB 1.x generates from the
(correct) XML Schema part you post.
And, finally, post the code that breaks now, with declarations or
imports of the variables and types used therein.
-W
On Sat, Apr 24, 2010 at 12:21 PM, Rochak Gupta <rochak005_at_gmail.com> wrote:
> Hi,
>
> I have apeculiar need . I hope somebody can help. Basically I am involved in
> the migration project from JAXB1.x to JAXB2.x . Now we have some code in
> Jaxb1.x which makes some conditional check whether a given object is an
> instance of a given simple element for e.g.
> <complextype>
> <element name="simple" type="string">
> .
> </complextype
>
> code goes as such
>
> if (obj instanceof simple)
> then..
> else
>
> however in jaxb2.x type simple is not generated as its simple element . I
> can't
> possibly change the logic . Is it possible through some external binding
> that I
> forcefully make JAXB2.x generate this classes . Kindly respond asap. Any
> response is higly apreciated.
>
> Thanks and regards,
> Rochak