-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
1.0.6.GA
-
None
-
None
When I built jboss metadata on https://svn.jboss.org/repos/jbossas/projects/metadata/trunk
I received a compilation error in AbstractWebServiceRefProcessor with JDK7, but I can build without this error with JDK6.
[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.340s [INFO] Finished at: Mon Dec 02 17:20:37 CST 2013 [INFO] Final Memory: 13M/211M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project jboss-metadata: Compilation failure [ERROR] /home/wangchao/work/jbossas/EAP5/metadata/trunk/src/main/java/org/jboss/metadata/annotation/creator/ws/AbstractWebServiceRefProcessor.java:[116,28] error: incomparable types: Class<CAP#1> and Class<Object>
the error indicates to AbstractWebServiceRefProcessor.java:
AbstractWebServiceRefProcessor.java
if(annotation.value() != Object.class && annotation.value() != Service.class) ref.setServiceInterface(annotation.value().getName());
From JAX-WS 2.1 to 2.2 API, the value type and default value have been changed from Object.class to Service.class.
WebServiceRef.java
/** * The service class, alwiays a type extending * <code>javax.xml.ws.Service</code>. This element MUST be specified * whenever the type of the reference is a service endpoint interface. */ // 2.1 has Class value() default Object.class; // Fixing this raw Class type correctly in 2.2 API. This shouldn't cause // any compatibility issues for applications. Class<? extends Service> value() default Service.class;