Hey Ian,
Thanks again.

1) XmlBeans are an apache open source technology whereby we can define
the bean in an XML format (called a xml schema) and have the class
files be generated at compile time. Thus we can go ahead and use them
like regular beans without having the hassle of having to painfully
create mundane code for beans each time. And that the code is
automatically generated for them makes maintaining them (deleting/
adding/modifying properties) easy.

Anyway, back to the issue. I see the xml beans jar as one viable
option. Since you said that the source is what is required, i presume
I don't need to worry about the compiled class files, so what i can do
then is possibly, create the xmlbeans.gwt.xml and add the xml beans
source folder to the classpath of the GWT compiler instead of
bothering to create and copy a jar right?

I'll try it and let you know how it goes. Thanks

Suri

On Oct 16, 5:07 pm, "Ian Petersen" <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 16, 2008 at 3:00 PM, Suri <[EMAIL PROTECTED]> wrote:
> > In my current application to which I'm trying to
> > integrate GWT, we use XmlBeans for passing data along. I do believe
> > xml beans are serializable. So, then
> > 1) Can i use these beans just as well to communicate via the GWT-RPC
> > to my client now?
>
> I don't know what XmlBeans are, so I can't answer definitively, but,
> if the classes are serializable, and the source is available and
> translatable, the answer should be "yes".
>
> > 2) If yes, then what would I require for this to be successfully
> > compiled and translated into javascript for the client code. What I do
> > is first generate the xml beans and jar them up (the class files) to
> > use within the current application. Additionally, the source code for
> > these xml beans is also generated just for any reference sake but is
> > not part of the jar. Do i need both the source as well as the class
> > files in order to be able to implement the beans in the GWT-RPC or
> > would referencing the classpath to the src code for the beans be
> > sufficient?
>
> Any code that's going to run on the client has to be available to the
> GWT compiler in source form at compile time.  In your case, it sounds
> like you may want to create a separate GWT-specific JAR of your
> XmlBeans code.  (Note that I'm making some assumptions about XmlBeans
> because I don't know what they are--you may have to enlighten me to
> get more specific advice.)
>
> Suppose your existing XmlBeans JAR looks like this:
>
> /META-INF
>   MANIFEST
> /com
>   /example
>     /xmlbeans
>       ...class files here
>
> you probably want to modify it to look like this for inclusion by
> reference in a GWT project:
>
> /META-INF
>   MANIFEST
> /com
>   /example
>     XmlBeans.gwt.xml
>     /xmlbeans
>       ...class _and_ java files here
>
> The XmlBeans.gwt.xml file should then look roughly like this:
>
> <module>
>   <!-- give the relative directory name(s) that contain the
> translatable source here -->
>   <!-- use more than one <source> tag if there's more than one directory -->
>   <source path="xmlbeans" />
> </module>
>
> Then, put the JAR on the compiler's classpath (and hosted mode's
> classpath) and, in your main module, add this:
>
> <!-- name the XmlBeans.gwt.xml file here, but translate / to . and
> don't include the .gwt.xml -->
> <inherits name="com.example.XmlBeans" />
>
> You should be good to go.  Of course, this all assumes that your
> XmlBeans code is translatable and that any non-translatable bits are
> isolated from the translatable bits.  If something about your setup
> doesn't meet my assumptions, you'll probably have to ask here, but try
> searching the forum history, too--there have been a few people asking
> about how to include external libraries and that's basically what
> you're doing.
>
> Ian
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to