Hi,
Im using java 1.6 and tring to consuming .net web services using cxf-codegen- plugins. First time i had one wsdl option and I got IllegalAnnotationException Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 43 counts of IllegalAnnotationExceptions This problem solved by adding following dependencies to pom.xml <dependency> <groupId>sun-jaxb</groupId> <artifactId>jaxb-impl</artifactId> <version>2.2</version> </dependency> <dependency> <groupId>sun-jaxb</groupId> <artifactId>jaxb-xjc</artifactId> <version>2.2</version> </dependency> As mentioned on the FAQ (http://cxf.apache.org/faq.html#FAQ- CanCXFrunwithJDK1.6%253F) But when i use multiple wsdlOption in the code-gen plugins., like: <wsdlOptions> <wsdlOption> <wsdl>$ {test.url}FirstService.svc?wsdl</wsdl> <extraargs> <extraarg>-client</extraarg> </extraargs> </wsdlOption> <wsdlOption> <wsdl>$ {test.url}SecondService.svc?wsdl</wsdl> <extraargs> <extraarg>-client</extraarg> </extraargs> </wsdlOption> </wsdlOptions> I get the same IllegalAnnotationException when running the generated client on FirstService. The client genrated on SecondService runs just fine.. Is this a bug or do i miss any additional configurations ? my complete pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns: xsi="http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>no.ws.client</groupId> <artifactId>artifact</artifactId> <name>Component: .net consumer</name> <packaging>jar</packaging> <properties> <test.url>http://a.dot.net.service/</mintra.test.url> <wsdl.url>${test.url}</wsdl.url> <cxf.version>2.2.6</cxf.version> </properties> <dependencies> <!-- External libraries --> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>${cxf.version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>${cxf.version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-ws-security</artifactId> <version>${cxf.version}</version> </dependency> <!-- Omit if using standard WSS4J interceptors --> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-ws-policy</artifactId> <version>${cxf.version}</version> </dependency> <dependency> <groupId>xml-resolver</groupId> <artifactId>xml-resolver</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>org.apache.xmlbeans</groupId> <artifactId>xmlbeans</artifactId> <version>2.4.0</version> </dependency> <dependency> <groupId>sun-jaxb</groupId> <artifactId>jaxb-impl</artifactId> <version>2.2</version> </dependency> <dependency> <groupId>sun-jaxb</groupId> <artifactId>jaxb-xjc</artifactId> <version>2.2</version> </dependency> <!-- /External libraries --> </dependencies> <profiles> <profile> <id>_generate-catalog</id> <build> <plugins> <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>${cxf.version}</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <sourceRoot>${project.build.directory}/ generated/cfx/catalog</sourceRoot> <wsdlOptions> <wsdlOption> <wsdl>$ {mintra.test.url}FirstService.svc?wsdl</wsdl> <extraargs> <extraarg>-client</extraarg> </extraargs> </wsdlOption> <wsdlOption> <wsdl>$ {mintra.test.url}FirstService.svc?wsdl</wsdl> <extraargs> <extraarg>-client</extraarg> </extraargs> </wsdlOption> </wsdlOptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>
