cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Ma" <>
Subject XMLSchema and JAXB binding info
Date Mon, 05 Feb 2007 06:11:45 GMT
Hi all,

I pass the following schema to  When I read the
element from XMLSchema,

I found  the jaxb binding info is lost.

<element name="MyProcess">
		<jaxb:typesafeEnumClass name="MyProcess">
			<jaxb:typesafeEnumMember name="BLUE" value="BLUE"/>
			<jaxb:typesafeEnumMember name="RED" value="RED"/>
			<jaxb:typesafeEnumMember name="GREEN" value="GREEN"/>
       <restriction base="string">
		<enumeration value="BLUE"/>
		<enumeration value="RED"/>
		<enumeration value="GREEN"/>

This is the code I found this issue :

XmlSchema xmlSchema =;
Document[] docs = xmlSchema.getAllSchemas();
 for (int i = 0; i < docs.length; i++) {
         Element ele = docs[i].getDocumentElement();
         try {
                    DOMUtils.writeXml(ele, System.out);
         } catch (TransformerException e) {

I investigated the xmlSchema code and found XMLSchema does not handle  the
non-standard schema element like <jaxb: xxx>.
 When tools use the service model to generate code , it   can not get the
schemaInfo contains jaxb customization
to generate customized  types class.

So we need to get schema element from definition  instead of  getting the
schema element from xmlshemaCollection.
I will refactor the WSDLServuceBuilder  to extract the schema from element
and put the element list in service




View raw message