Im generating some classes from WSDL files with wsimport maven plugin @ Mule Anypoint Studio 3.5 with JDK 1.7_55
I'm using jaxb 2.2.7 and remove version 2.1.9 from mule libs and replaced by 2.2.7.
When i compile, sometines works fine but others i take this error multiple times:
The attribute required is undefined for the annotation type XmlElementRef
I tried to create an endorsed folder in JDK and include .jars needed,
Do you know any way to avoid this error or replace this libs correctly?
I include this dependencies in pom.xml
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-tools</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.7</version>
</dependency>
<!-- xjc -->
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>idlj-maven-plugin</artifactId>
<version>1.2.1</version>
</dependency>
wsimport is 2.2.7 to
wsimport settings:
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>wsdl-AMANSequenceService-exec</id>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<args>
<arg>-version</arg>
<arg>-B-nv</arg>
<arg>-Xdebug</arg>
<arg>-B-XautoNameResolution</arg>
<arg>-Xendorsed</arg>
</args>
<extension>true</extension>
<sourceDestDir>${basedir}/src/main/java</sourceDestDir>
<destDir>${basedir}/src/main/java</destDir>
<extension>true</extension>
<wsdlDirectory>${basedir}/src/main/resources/SICG/AMANSequenceService</wsdlDirectory>
<wsdlFiles>
<wsdlFile>AMANSequenceService.wsdl</wsdlFile>
</wsdlFiles>
<bindingFiles>
<bindingFile>${basedir}/src/main/resources/SICG/external/binding.xjb</bindingFile>
</bindingFiles>
</configuration>
</execution>