There is also programmatic access to an object model representing the schema. From any generated bean, say a class called Abc, you can call
Abc.type.getTypeSystem() This returns a SchemaTypeSystem on which you can execute all sorts of methods concerning the contents of the schema. Cheers, Lawrence > -----Original Message----- > From: Cezar Andrei > Sent: Tuesday, October 04, 2005 10:36 AM > To: [email protected]; [EMAIL PROTECTED] > Subject: RE: Re-Generating schema from the generated code > > Scomp saves the original schema files inside the generated jar, and you > can get to it in the following way: > > InputStream is = > XMLParsers.class.getClassLoader().getResourceAsStream("schemaorg_apache_ > xmlbeans/src/" + GeneratedXMLBean.type.getSourceName()); > > Cezar > > > -----Original Message----- > > From: Eran Chinthaka [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, October 04, 2005 11:33 AM > > To: [email protected] > > Subject: Re-Generating schema from the generated code > > > > Hi, > > > > I'm from Apache Axis2 team. I need a help in generating schema using > > XMLBeans. > > My scenario is like this. I have bunch of classes created using a > given > > xml schema, by XMLBeans. But at some time, I do not have the schema > file > > which was used to generate the code, but I have all the classes > > generated using that schema by xml beans. Now I want to > generate/derive > > the schema from the classes I have. > > I load the generated classes using a proper class loader and I could > > find all the generated codes which are global elements. How can I > > recreate the schema which was used to generate this code. I don't have > > the initial schema file by now. I want to derive it using the classes > I > > have. > > Any help in this is very much appreciated. > > > > (Sorry If I'm repeating this question on this list. I searched in the > > archives, but didn't find something similar to this.) > > > > Thanks, > > Chinthaka > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

