JAXB generated classes under GWT

547 views
Skip to first unread message

Alan

unread,
Dec 2, 2008, 4:13:33 AM12/2/08
to Google Web Toolkit
Hi all,
This is my first post to this group and I am not native English
speaker, so please sorry for my possible mistakes..

I am trying to use JAXB generated classes on server and client side.
I've added source for generated classes and annotations used by jaxb
to the GWT source tree. And my compilation failed on
XmlGregorialCalendar type.
I've made XJC to bind all dates in XML schemas to java.util.Date

The next compilation fail is on @XmlJavaTypeAdapter(Adapter1.class).
It says that it can't find source for Adapter1.class... but I can not
include it to the source tree, because of it will lead to compilation
errors on java.util.Calendar and javax.xml.bind.DatatypeConverter.

So, does any body managed to use JAXB generated classes with GWT?
Is there a way to make GWT ignore @XmlJavaTypeAdapter?

Thanks in advance for your replies.

Alan

unread,
Dec 3, 2008, 3:35:22 AM12/3/08
to Google Web Toolkit
I believe, that classes generated by JAXB are just annotated beans, so
if we could make GWT ignore some JAXB specific statements, we could
use them to pass data from server to client?
May be GWT have some annotation like @GWTIgnore?

joel

unread,
Dec 3, 2008, 10:01:57 AM12/3/08
to Google Web Toolkit
I am using generated JAXB generated classes in GWT by including the
JAXB source to the GWT compiler as you described. I needed to remove
a number of JAXB classes, e.g. XmlGregorianCalendar. I include the
Adapter classes in the source path and gwt complains when compiling
them with errors like "No source code is available for type
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>;
did you forget to inherit a required module?...Removing invalidated
units" but it still works.
Reply all
Reply to author
Forward
0 new messages