Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Moxy jaxb-compile fails on xs:choice

Hi,

I am trying parse the following schema using Moxy Jaxb-Compile

<?xml version="1.0" encoding="utf-8"?>
<xs:schema
           xmlns:CPX="http://Main/Schemas/CPX";
           attributeFormDefault="unqualified"
           elementFormDefault="unqualified"
           targetNamespace="http://Main/Schemas/v0.0.1";
           id="Main"
           xmlns:xs="http://www.w3.org/2001/XMLSchema";>

  <xs:import schemaLocation="CPX001.xsd" namespace="http://Main/Schemas/CPX";
/>
  <xs:import schemaLocation="CPX002.xsd" namespace="http://Main/Schemas/CPX";
/>
  <xs:element name="Message">
    <xs:complexType>
      <xs:choice>
        <xs:element ref="CPX:CPX001" />
        <xs:element ref="CPX:CPX002" />
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>


But I am getting the following error:


>M:\Programs\eclipselink-2.1.0-M7\bin\jaxb-compiler.cmd Main.xsd -extension
-d M:/Shared/Projects.Java/yellowfire/yellowfire-xml/src/main/gen  -verbose

parsing a schema...
[ERROR] src-resolve: Cannot resolve the name 'CPX:CPX002' to a(n) 'element
declaration' component.
  line 16 of
file:/M:/Shared/Projects.Java/yellowfire/yellowfire-xml/src/main/xsd/Main.xsd

Failed to parse a schema.


Regards,
Mark P Ashworth
-- 
View this message in context: http://old.nabble.com/Moxy-jaxb-compile-fails-on-xs%3Achoice-tp28522272p28522272.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top