Hi Alan , Thank you for your help and for your collaboration. I think i didn't make my self clear enough.My problem isn't converting XML to Java i'm not needing marshalling and unmarshalling .I have a model which contains data(an xmile file) which i've already converted to a model object. I 'll have to implement a generator that uses this data to create automatically gwt classes.I'll have to generate all the packages i mean by that the client package ,the shared package and the server one automatically.
Since velocity is a good solution , i'll generate theses classes with velocity from scratch.I was searching if anyone implemented such a gnerator before and so can help me with some advice. Thanks a lot again.And good luck every body. Le 23 avril 2012 15:36, Alan Chaney <a...@mechnicality.com> a écrit : > On 4/23/2012 1:34 AM, vanessa vanessa wrote: > > How it doesn't change anything ? > I!'m looking for some documentation and some recommendation .. I didn't > find through the net > someething that fits my needs . > > 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/DevGuideCodingBasicsCompatibilityfor > more information. > > > Regards > > Alan > > > > > > > > > > > > > > Thanks a lot . > > Le 23 avril 2012 09:26, Thomas Broyer <t.bro...@gmail.com> a écrit : > >> >> >> On Monday, April 23, 2012 10:14:00 AM UTC+2, vanessa vanessa wrote: >>> >>> Ok i'll provide further information. i have to create a generator that >>> uses the velocity engine ,it will generate a GWT >>> code which will be in turn compiled . >>> >>> The entry of my generator is an xml file which i'm supposed to >>> transform to a model object . I'll generate therefore >>> the code from this model object .I wish i made my self clear. >>> >> >> The fact that the generated code will be compiled by GWT doesn't change >> anything to your generating process. >> >> So, write a Java program (with a main() et al.) that reads XML and >> outputs Java code. What kind of help are you looking for? >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Web Toolkit" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/google-web-toolkit/-/S4ndjgj-Q30J. >> >> To post to this group, send email to google-web-toolkit@googlegroups.com. >> To unsubscribe from this group, send email to >> google-web-toolkit+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-toolkit@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-toolkit@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.