users@jaxb.java.net

problem of simple element not being generated in JAXB2.X

From: Rochak Gupta <rochak005_at_gmail.com>
Date: Sat, 24 Apr 2010 15:51:06 +0530

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