Ned, This sounds awsome! When I first started working with Castor I actually thought that this was already possible. Afterall, one of the presentations on the Castor site promotes Castor as the quickest path between XML, Java, and RDBS. Well right now this is only partially true. I have been looking for this functionality all along, so I'd love to see it!
Can you please elaborate a little bit on how you would use XDoclet to "generate the mapping.xml file from the java source code via javadoc"? I'm not familiar with XDoclet, so if it is at all possible an example of how this would work would be very much appreciated. - Or, can you point me to somewhere where I can learn more? thanks Ned Bob. -----Original Message----- From: Ned Wolpert [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 11:38 PM To: [EMAIL PROTECTED] Subject: [castor-dev] Modeling everything from the XML Schema... Folks- Bruce Snyder and myself have been further discussing how to go from the XML Schema to the JDO model for complete code generation in Castor. For those following this thread, Matz brought up the idea of using the source generator to generate the classes needed for JDO, and I mention that I'm doing that myself. Bruce brought up XDoclet (xdoclet.sourceforge.net) which can generate the mapping.xml file from the java source code via javadoc. After a some quick checks, here's the current score. >From a single XML schema, generate the source code that can be use by JDO. Using annotations in the schema, generate the needed tags so xdoclet can produce the mapping.xml file from the resulting codebase. This combo allows the following to be produced from one XML schema file: -Java <-> XML marshaling source code -Object model -JDO Mapping file The only thing left missing is the SQL statements to auto-gen the tables. Granted, that's not a 'small' thing, but it seems like with that piece, this is one step away from being able to create an ant task that builds the entire substructure from one single XML Schema. Castor, front and back. Ok, now I'm looking for a dose or two of reality. What did I miss? I need comments positive and neg about this, if its a 'good thing(tm)'. Since one needs the tables names, field names/types to get XDoclet to generate the mapping.xml file in the first place, it seems like it shouldn't be too hard (famous last words) to also generate generic (or postgresql ;-) SQL code to auto-create the tables. This _seems_ not only doable, but quite useful. Speak up in the back! I can't hear you! ===== Virtually, | "Must you shout too?" Ned Wolpert | -Dante [EMAIL PROTECTED] | _________________/ "Who watches the watchmen?" 4e75 -Juvenal, 120 AD -- Place your commercial here -- fnord __________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
