This issue was reported on axis2's user list and later in xfire as issue xfire-617.
I've been able to reproduce the issue in XmlSchema independently of xfire (see attached files).
To reproduce, get XmlSchema (I used 1.0.3, same behavior as 1.0.1) and unzip IncludeTest.java in the tests directory, unzip the xsd files in test-resources and run the unit tests.
One test case is ok: the one which defines a default namespace in the included file.
The other test case fails because there is no default namespace defined, just like in OTA_SimpleTypes.xsd
This example is ok, remove line <<xmlns="http://www.w3.org/2001/XMLSchema">> in the file above and it will fail. It seems to me that this declaration should be considered implicit and this should be handled in ShemaBuilder.handleSimpleType
Description
This issue was reported on axis2's user list and later in xfire as issue xfire-617.
I've been able to reproduce the issue in XmlSchema independently of xfire (see attached files).
To reproduce, get XmlSchema (I used 1.0.3, same behavior as 1.0.1) and unzip IncludeTest.java in the tests directory, unzip the xsd files in test-resources and run the unit tests.
One test case is ok: the one which defines a default namespace in the included file.
The other test case fails because there is no default namespace defined, just like in OTA_SimpleTypes.xsd
Sample xsd from the attachement:
<schema targetNamespace="http://soapinterop.org/xsd"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsd1="http://soapinterop.org/xsd"
xmlns:xsd2="http://soapinterop.org/xsd2"
elementFormDefault="qualified">
<include schemaLocation="includeAux.xsd"/>
</schema>
includeAux=
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsd1="http://soapinterop.org/xsd2"
elementFormDefault="qualified">
<xs:simpleType name="PaymentCardCodeType">
<xs:union>
<xs:simpleType>
<xs:restriction base="UpperCaseAlphaLength1to2"/>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType name="UpperCaseAlphaLength1to2">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{1,2}"/>
</xs:restriction>
</xs:simpleType>
</schema>
This example is ok, remove line <<xmlns="http://www.w3.org/2001/XMLSchema">> in the file above and it will fail. It seems to me that this declaration should be considered implicit and this should be handled in ShemaBuilder.handleSimpleType