The input to GWT is Java code. As Thomas said, you are looking for
something that takes XML and converts it to Java source.
Velocity (and Freemarker, for that matter) take Java models and
convert them to a textual representation, such as HTML or XML or
just plain text (for example, I generate the text of emails using
Freemarker) so they are not really much use in your case.
I suggest that you look at JAXB which "binds" XML to java -- in
other words, generates the java code required to represent an XML
description.
There's also XStream and many others.
Your requirement means you will have to learn about XML binding and
GWT. The GWT developer docs are at
https://developers.google.com/web-toolkit/ and you can go to
http://jaxb.java.net/ for stuff on JAXB - or just search Google
using the search term ' xml binding java ' which will give you lots
of information and alternatives.
Finally, problems with converting XML --> Java are not really
relevant to this list, but if you have problems compiling the
generated Java with the GWT compiler, then this would be the place
to ask on specific debugging issues. There are limitations on the
Java source that GWT will compile - see
https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsCompatibility
for more information.
Regards
Alan