Hi Pat I would suspect you have some combination of either existing QNames or other mappings such that you've ended up mapping 2 QNames to the same class name. In that situation I think XmlBeans starts adding numbers to the end of the class names to avoid collisions.
If that's not the case if you can attach your schema and .xsdconfig file and we can take a look and see what the issue is. Cheers, Lawrence > -----Original Message----- > From: pat [mailto:[EMAIL PROTECTED] > Sent: Friday, March 10, 2006 8:04 AM > To: [email protected] > Subject: Re: generationg bean from schema with different name > > Tahnks, that helps. > > I have one more question about it. When I use the > <xb:qname name="pkg:Test" javaname="TestX"/> > the generator generates more then one class for it; e.g.: > TestX > TestX2 > etc. > > How can I avoid this generation of the classes with numbers ??? I want > only one class TestX. > > Thanks a lot. > > Pat > > Lawrence Jones wrote: > > Hi all > > > > > > > > Alex is quite right about .xsdconfig, and his example will work fine but > > note it will change the _/package name/_ of all generated beans for that > > namespace. If you wanted to change the class name of the generated bean > > then that too is supported via .xsdconfig but this time using the > > <qname> element: > > > > > > > > <xb:config ...> > > > > <xb:qname name="xxx" javaname="package1.package2.MyClass" /> > > > > </xb:config > > > > > > > > That will map the QName xxx to a class with Java name > > package1.package2.MyClass. Note xxx is a standard QName and so needs to > > be defined as something like "ppp:LocalName" where ppp is a prefix for a > > known namespace. > > > > > > > > Cheers, > > > > > > > > Lawrence > > > > > > > > ------------------------------------------------------------------------ > > > > *From:* Alex Soto [mailto:[EMAIL PROTECTED] > > *Sent:* Thursday, March 09, 2006 6:33 AM > > *To:* [email protected] > > *Subject:* Re: generationg bean from schema with different name > > > > > > > > > > yes using a file ended with .xsdconfig. I send you an example: > > > > <?xml version="1.0" encoding="UTF-8"?> > > <xb:config > > xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config"> > > > > <xb:namespace uri="http://www.w3.org/2000/09/xmldsig# > > <http://www.w3.org/2000/09/xmldsig>"> > > <xb:package>com.example.xmlbeans</xb:package> > > </xb:namespace> > > > > </xb:config> > > > > BE aware because this file must be into classpath. In ant file do : > > > > <xmlbean javasource="1.5" > > srcgendir="${dest.dir}/lib/sources/${output.name.importer}" > > classpath="${root}/lib/xbean.jar;${root}/lib/jsr173_1.0_api.jar" > > classgendir="${dest.dir}/classes" > > destfile="${dest.dir}/${output.name.importer}.jar" debug="true" > > noupa="true"> > > <fileset dir="." includes="*.*"/> > > </xmlbean> > > > > Look that fileset . is the directory where i have my xsd file and > .xsdconfig > > > > El dj 09 de 03 del 2006 a les 15:16 +0100, en/na pat va escriure: > > > > > > > > Hi all, > > > > > > > > I want to generate xmlbean from the xml schema but with different name > than it > > > > is in the schema (e.g. in schema is Beans and generated will be MyBean). > > > > > > > > Why I need it is that I need to use AXIS2 with XMLBeans support, but on > the > > > > client side I need different names os on the server - this is only one > way > > > > from server to client. > > > > > > > > Is there a way how to do it ??? > > > > > > > > Thanks a lot. > > > > > > > > Pat > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > > > For additional commands, e-mail: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

