You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-user@xml.apache.org by David Bau <da...@bea.com> on 2003/09/27 02:04:04 UTC
Fw: Mapping XML type QName to Java Class name?
Including xmlbeans-user...
Here's the fullproof way of getting a classname from a type qname.
(1) Once you've compiled things and got the JAR...
(2) Put the JAR on your classpath
(3) Use com.bea.xml.XmlBeans.getContextTypeLoader() to get the
SchemaTypeLoader corresponding to your thread's context classloader.
(4) say schemaTypeLoader.findType(QNameForType)
(5) say type.getFullJavaName().
Better than a utility class to do a rote name computation, because if the
name is not the default name (e.g., because of a configuration override or a
collision) then you want to get the proper name.
David
----- Original Message -----
From: Mitch Upton
To: David Bau
Sent: Friday, September 26, 2003 7:37 PM
Subject: Mapping XML type QName to Java Class name?
David,
I've gotten my WSDL compiled using SchemaCompiler, but now I need to
infer the Java class name from the QName of the source XSD type...
[clip]
- ---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/