Hi

I am trying to get a simple xsd2java example working using an external jaxb
bindings file to change the default Calendar format

My pom looks like this:

<plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-xjc-plugin</artifactId>
        <version>2.3.0</version>
        <configuration>
              <extensions>
                       
<extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:2.3.0</extension>
              </extensions>
        </configuration>                                                        
        
        <executions>
                <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                                <goal>xsdtojava</goal>
                        </goals>
                        <configuration>
                                <xsdOptions>
                                        <xsdOption>
                                                
<xsd>${basedir}/src/main/resources/GBO.xsd</xsd>
                                    
<bindingFile>${basedir}/src/main/resources/simple.xjb</bindingFile>
                                        </xsdOption>
                                </xsdOptions>
                        </configuration>
                </execution>
        </executions>
</plugin>

The bindings file is as follows:


<jaxb:bindings jaxb:version="2.0"
        jaxb:extensionBindingPrefixes="xjc"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
        xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
        <jaxb:globalBindings>
                <xjc:simple />
                <jaxb:javaType name="java.util.Calendar" xmlType="xs:date"
                        parseMethod="javax.xml.bind.DatatypeConverter.parseDate"
                        
printMethod="javax.xml.bind.DatatypeConverter.printDate" />
                <jaxb:javaType name="java.util.Calendar" xmlType="xs:time"
                        parseMethod="javax.xml.bind.DatatypeConverter.parseTime"
                        
printMethod="javax.xml.bind.DatatypeConverter.printTime" />
                <jaxb:javaType name="java.util.Calendar" xmlType="xs:dateTime"
                        
parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
                        
printMethod="javax.xml.bind.DatatypeConverter.printDateTime" />
        </jaxb:globalBindings>
</jaxb:bindings>


The generate-sources goal fails with the following

[INFO] --- cxf-xjc-plugin:2.3.0:xsdtojava (generate-sources) @ RB_GBO_SO_GG
---
[ERROR] vendor extension bindings (jaxb:extensionBindingPrefixes) are not
allowed in the strict mode. Use -extension.
  line 1 of
file:/C:/prj/mungo/samples/RB_GBO_SO_GG/src/main/resources/GBO.xsd

What have I missed?


--
View this message in context: 
http://cxf.547215.n5.nabble.com/Problems-with-cxf-xjc-plugin-tp5709012.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to