Eran,
Have you considered saving a text version of the schema when you
generate the schema type classes? If I understand correctly that is
what scomp does, and it is certainly what the maven 1 xmlbeans 2 plugin
does. You might be able to come up with some way of generating a text
schema from the schema type objects, but this is going to be a research
project whereas saving your DOM node as text is going to be pretty easy
to do.
thanks
david jencks
On Oct 5, 2005, at 9:40 PM, Eran Chinthaka wrote:
Radu,
The problem is I don't have the xsd and my requirement is to generate
that from the XMLObject.
Radu Preotiuc-Pietro wrote:
Just wanted to point out the
XmlObject.documentProperties().setSourceName() method, which allows
you to set the correct xsd name even when you haven’t parsed the xsd
with XmlBeans.
Radu
From: Eran Chinthaka [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 04, 2005 10:30 PM
To: Lawrence Jones
Cc: [email protected]
Subject: Re: Re-Generating schema from the generated code
Hi Lawrence,
Thanks for the reply.
I can get theSchemaTypeSystem. But I don't want to traverse in that.
I just need to generate the schema, preferably in to a String and
want to add that as the schema in the WSDL.
So how can I get the schema as a String.
FYI : We generate the code not providing schema as a file, but as a
DOM Node. And we are calling XMLBeans API programatically.
Thanks for your help in this.
Chinthaka
Lawrence Jones wrote:
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_apach
e_
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]