|
|
WS-Policy and moreFabian's Blog on WS-Policy and more |
|
Friday Feb 27, 2009
Metro 2.0 on Java SE 6
We have recently had reports in the Metro user forum where people that ran Metro 2.0 with Java SE 6 had trouble using wsimport. They would typically get errors like this:
parsing WSDL...
generating code...
wspolicy/provider/wsdl/server/Echo.java
wspolicy/provider/wsdl/server/EchoResponse.java
wspolicy/provider/wsdl/server/EchoService.java
wspolicy/provider/wsdl/server/Echo_Type.java
wspolicy/provider/wsdl/server/ObjectFactory.java
wspolicy/provider/wsdl/server/package-info.java
Copying 2 files to
/Users/fr159072/tmp/WebApplication8/build/web/WEB-INF/wsdl/NewWebServiceFromWSDL
wsimport-service-generate:
Created dir:
/Users/fr159072/tmp/WebApplication8/build/web/WEB-INF/classes
Created dir: /Users/fr159072/tmp/WebApplication8/build/web/META-INF
Copying 1 file to
/Users/fr159072/tmp/WebApplication8/build/web/META-INF
Copying 3 files to /Users/fr159072/tmp/WebApplication8/build/web
library-inclusion-in-archive:
library-inclusion-in-manifest:
wsimport-service-compile:
Compiling 6 source files to
/Users/fr159072/tmp/WebApplication8/build/web/WEB-INF/classes
/Users/fr159072/tmp/WebApplication8/build/generated/wsimport/service/wspolicy/provider/wsdl/server/EchoService.java:47:
cannot find symbol
symbol : constructor
Service(java.net.URL,javax.xml.namespace.QName,javax.xml.ws.WebServiceFeature[])
location: class javax.xml.ws.Service
super(ECHOSERVICE_WSDL_LOCATION, ECHOSERVICE_QNAME,
features);
/Users/fr159072/tmp/WebApplication8/build/generated/wsimport/service/wspolicy/provider/wsdl/server/EchoService.java:55:
cannot find symbol
symbol : constructor
Service(java.net.URL,javax.xml.namespace.QName,javax.xml.ws.WebServiceFeature[])
location: class javax.xml.ws.Service
super(wsdlLocation, ECHOSERVICE_QNAME, features);
/Users/fr159072/tmp/WebApplication8/build/generated/wsimport/service/wspolicy/provider/wsdl/server/EchoService.java:63:
cannot find symbol
symbol : constructor
Service(java.net.URL,javax.xml.namespace.QName,javax.xml.ws.WebServiceFeature[])
location: class javax.xml.ws.Service
super(wsdlLocation, serviceName, features);
3 errors
For a detailed analysis when exactly this is happening, see this Wiki page. The reason for these failures is that Metro 2.0 contains JAX-WS 2.2, which clashes with JAX-WS 2.1 1 that is built into Java SE 6. You will only see these failures if you did not install Metro 2.0 with our installation scripts metro-on-glassfish.xml/metro-on-tomcat.xml. That is the case if you e.g. installed Metro 2.0 for GlassFish V3 via the update center or if you use a version of GlassFish V3 built into NetBeans. The simplest solution is to download the Metro 2.0 nightly build and run the installation script. The script copies the file webservices-api.jar, which contains the JAX-WS 2.2 API, into <java-home>/lib/endorsed. Alternatively, you can of course manually copy webservices-api.jar into a suitable endorsed directory. Tags: Web Services, Project Metro, JAX-WS, Java 1Java SE 6 update 3 and older contains JAX-WS 2.0. Posted at 04:35PM Feb 27, 2009 by Fabian Ritzmann in Sun | Comments:
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||