il seguente file bindings JAXB crea le classi adattatore come previsto, ma Eclipse e XMLSpy dire che è non valida:JAXB associazioni di file: convalida errore
<?xml version="1.0" encoding="UTF-8"?>
<jxb:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd" version="2.1">
<jxb:globalBindings>
<jxb:javaType name="java.util.Calendar" xmlType="xs:date" parseMethod="javax.xml.bind.DatatypeConverter.parseDate"
printMethod="javax.xml.bind.DatatypeConverter.printDate" />
<jxb:javaType name="java.util.Calendar" xmlType="xs:dateTime" parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
printMethod="javax.xml.bind.DatatypeConverter.printDateTime" />
<jxb:javaType name="java.util.Calendar" xmlType="xs:time" parseMethod="javax.xml.bind.DatatypeConverter.parseTime"
printMethod="javax.xml.bind.DatatypeConverter.printTime" />
</jxb:globalBindings>
</jxb:bindings>
L'errore è qualcosa di simile:
cvc-complex-type.2.4.b: The content of element 'jxb:globalBindings' is not complete. One of '{"http://java.sun.com/xml/ns/jaxb":javaType, "http://java.sun.com/xml/ns/jaxb":serializable, WC[##other:"http://java.sun.com/xml/ns/jaxb"]}' is expected.
Si noti che il file dello schema dei collegamenti JAXB fa riferimento a elementi di livello superiore utilizzando il prefisso "jaxb".
Come posso creare un file di binding JAXB valido?
Grazie, mio test mostrano che ti sembra di essere corretto. Ho presentato un problema qui: http://java.net/jira/browse/JAXB-924 Sentiti libero di votare e/o commentare. – Puce
votato e guardato :) –
Qualsiasi soluzione alternativa? – l3dx