Davanum Srinivas wrote:
Can you please open a JIRA bug and zip up your war and upload it?
Before I do that I'd like to just clarify something. My testing shows
that XmlBeanSerializer.writeSchema() is being passed simple types. This
seems wrong. All that has to be done to trigger this from the starwars
demo is to make the xbeans sample starwars.xsd character complex type
contain some simple element with a restriction like this:
<complexType name="character">
<xs:sequence>
<xs:element ref="month"/>
</xs:sequence>
...
<xs:element name="month">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:totalDigits value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
...
It seems that XmlBeansSerializer is forgetting about referernces inside
of complex types.
SchemaType docType = XmlBeans.typeForClass(javaType);
if (docType.getName() == null) {
if (docType.isSimpleType()) {
if (docType.getSimpleVariety() == SchemaType.ATOMIC) {
SchemaType s2 = docType.getPrimitiveType();
QName q2 = s2.getName();
System.out.println("simple atomic qname:" +
q2.toString());
return null;
}
}
}
This little patch allows the WSDL to generate and it prints out the
primitive types that are ignored (XmlDecimal in case you're interested)
I suspect they are unhandled data left over because the Atomic types
weren't handled (only complex, element, simple seem to be handled) and
the month restriction causes atomic types to be used.
Anyone have any thoughts about how to nudge me forward?
Thank you.
--
Free replacement for Exchange and Outlook (Contacts and Calendar)
http://www.ScheduleWorld.com/
WAP: http://www.ScheduleWorld.com/sw/WAPToday?id=4000&tz=EST
WebDAV: http://www.ScheduleWorld.com/sw/webDAVDir/4000.ics
VFREEBUSY: http://www.ScheduleWorld.com/sw/freebusy/4000.ifb