Reputation: 458
I need the XmlRootElement defined in my generated class. But, getting this error:
[jaxb] [ERROR] [ERROR] Unsupported binding namespace "http://annox.dev.java.net". Perhaps you meant "http://java.sun.com/xml/ns/jaxb/xjc"?
Here is my binding file:
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:annox="http://annox.dev.java.net"
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb
http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd http://annox.dev.java.net "
jaxb:extensionBindingPrefixes="xjc annox" version="2.1">
<jaxb:bindings schemaLocation="../target/src/schema/xmlSchema.xsd" node="/xs:schema">
<jaxb:bindings node="xs:complexType[@name='ReportSubmission']">
<annox:annotate>
<annox:annotate annox:class="javax.xml.bind.annotation.XmlRootElement"
name="ReportSubmission"/>
</annox:annotate>
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>
I'm using Maven 1 and a plugin which has an ant task. Extensions are set to true in the plugin.properties. I very similar schema is used in another application that uses Maven 2, so I'm thinking the schema is correct and the error message is a little misleading. Maybe I'm missing a jar ? The jars I'm using are:
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.1</version>
<properties/>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.1</version>
<properties/>
</dependency>
Any ideas appreciate, thanks in adv.
Upvotes: 1
Views: 573