Title: Message
Here's what I think:
Have you seen the comment on
SchemaTypeSystemCompiler.compile(String name, SchemaTypeSystem existingSTS,
        XmlObject[] input, BindingConfig config, SchemaTypeLoader linkTo, Filer filer, XmlOptions options),
? :-) (* Please do not invoke this method directly ... )
 
The "public" APIs that we have offer Schema compilation, Java source generation, Schema persistence, but not Schema copying (you would have to use scomp or the ant task). Of course, I can't stop anyone from using other public methods in the impl packages, but if I were to add Schema copying as a "public" (official, supported) API, I would have to give it a little thought on how to expose it, I am not sure that using the information from XmlObject would be the way to do it.
 
Isn't saving the XMLObjects to a directory of your choice a cleaner approach anyway?
 
Thanks,
Radu
-----Original Message-----
From: Eran Chinthaka [mailto:[EMAIL PROTECTED]
Sent: Monday, October 10, 2005 9:14 PM
To: user@xmlbeans.apache.org
Subject: XMLBeans do not save schema when fed through a Node

Hi All,

This mail has direct connection with the earlier thread : http://www.nabble.com/Re-Generating-schema-from-the-generated-code-t373732.html

We want to get the schema that was used for code generation, later. But we are not passing the schema as a file, but as an array of XMLObjects.

If we call

SchemaTypeSystemCompiler.compile(String name, SchemaTypeSystem existingSTS,
        XmlObject[] input, BindingConfig config, SchemaTypeLoader linkTo, Filer filer, XmlOptions options),

then this will not save the schema for later use, as this method set the schema folder as null. (see SchemaTypeSystemCompiler:220).

But if we call SchemaTypeSystemCompiler.compile(Parameter), then the schema folder will be set properly and it will save the schema.

When we generate schema, we do not give a physical file location but pass an array of XMLObjects which were created using DOM Nodes which contained schemas.
IMO, this is a small bug in XMLBeans, as it is trivial to just get the schema from the XMLObject that are being passed to generate the code and save them. As it does when we pass the file.

What do you all think about this ? We would like to have that so that our ?wsdl generation will be done without that much of a problem and in a cleaner way. If you like to see how we are trying to do that, its here. See the engage() method. (http://svn.apache.org/viewcvs.cgi/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/XMLBeansExtension.java?rev=307058&view=log)

I really appreciate your help on this.

Thanks,
Chinthaka

Reply via email to