Hi Werner
sorry it has taken ages for me to get back on this.
It is not possible to get the gwt compiler to compile the castor classes
because they include e.g.:
[java] [ERROR] Line 77: The import java.io.Reader cannot be
resolved
[java] [ERROR] Line 78: The import java.io.PrintWriter cannot be
resolved
[java] [ERROR] Line 79: The import java.io.File cannot be
resolved
[java] [ERROR] Line 80: The import java.io.FileReader cannot be
resolved
[java] [ERROR] Line 82: The import java.io.FileInputStream
cannot be resolved
[java] [ERROR] Line 83: The import java.io.InputStream cannot be
resolved
[java] [ERROR] Line 84: The import java.io.IOException cannot be
resolved
[java] [ERROR] Line 87: The import java.util.Enumeration cannot
be resolved
[java] [ERROR] Line 88: The import java.util.Hashtable cannot be
resolved
[java] [ERROR] Line 89: The import java.util.Properties cannot
be resolved
[java] [ERROR] Line 90: The import java.util.StringTokenizer
cannot be resolved
[java] [ERROR] Line 91: The import java.util.Hashtable cannot be
resolved
[java] [ERROR] Line 92: The import java.net cannot be resolved
gwt is highly restrictive in what it can compile.
The only way to get round is to put the marshalling code into separate
class/package.
James
----- Original Message -----
From: "Werner Guttmann" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, October 15, 2007 3:40 PM
Subject: Re: [castor-user] castor and gwt
James,
James Cowan wrote:
Hi
I have been using castor successfully with gwt to generate the domain
objects passed using gwt-rpc.
I have had to make a few hacks to munge the generated beans (fixed I
believe in the latest source generator).
The main remaining problem is that I have to switch off marshalling
otherwise the gwt javascript compiler complains.
Mind explaining to us the reason for this ? I'd like to underrstand that a
bit more in detail before thinking about any possible resolutions.
This is a bit of a pity because I would like to populate objects from xml
files. I have come up with one hack whereby I generate one version of the
xsd without marshalling for use with gwt and another version which
contains the marshalling code so that I can read xml file; I then use a
bean copy utility to copy from one bean to another. This is a bit clunky.
Any other ways that i could get round this?
One nice solution would be if the marshalling code could be in a separate
class/package which I could then instruct the gwt javascript compiler to
ignore. Would that be feasible?
Not sure, but possible.
But let's first talk about the problem.
James
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email