Hi,
Jayaraman, Kannan wrote:
Thanks, Werner. I shall look into that.
Great. Btw, mind elaborating as to why member names with underscores is
such a trouble to you ?
One more question. Is there a framework/tool provided by Castor, which
will help us generate XSD's, given a Java bean (with getters/setters),
which will reflect the fields in the class to map to the elements in the
XSD's.
Not right now, to be honest. There's a tool named 'XMLInstance2Schema',
which will generate an XML schema based upon the XML document instance
provided. In otehr words, you could use Castor to marshal your Java
beans to XML (using default introspection mode or a mapping file), and
then use that tool to generate an XML schema. Noit sure whether this
would need your requirement(s).
Having said that, as part of our work on moving towards (partial) JAXB
compliance, we are looking into adding a schema generator to the tool
set, which features XML schema generation from as set of (annotated)
Java classes.
I hope this helps.
Werner
Thanks
Kannan
-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 16, 2008 4:12 PM
To: [email protected]
Subject: Re: [castor-user] Avoiding Underscore in the private field
names in Castor generated code
Not right now. But this could be easily added, as the code responsible
for adding the underscore to the Java member name is to be found in
either SourceFactory and/or MemberFactory (top of my head, with no
access to the code right now).
You might want to consider raising a Jira issue (feature request),
asking for this to be added. If you found the time (and energy) to
attach a (preliminary) patch that implemented that feature ... that
would be highly appreciated.
Werner
Jayaraman, Kannan wrote:
Is there a way I could prevent Castor not to generate the underscore
in front of the field names in java classes, when it generates the
Castor java code usingXML code generator.
Pls help
Thanks
Kannan
Sample code generated from Castor
* *
*public* *class* ApplicationIDResponse *extends*
com.citi.gcgna.cdf.shared.common.esb.endpoint.impl.EsbResponseBase
* *
*implements* java.io.Serializable
{
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Field _applicationID
*/
*private* java.lang.String _applicationID; //TO AVOID GENERATION OF
UNDERSCORE IN FRONT OF THE FIELD NAME
//----------------/
//- Constructors -/
//----------------/
*public* ApplicationIDResponse()
{
*super*();
} //-- com.citi.gcgna.cdf.shared.co
---------------------------------------------------------------------
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