I got The constructor Service(URL, QName, WebServiceFeature[]) is undefined error after I run wsimport for my client web service. Im using JDK 1.6. Please help.
相关问题
- How do you call a web service in Java with only XS
- No namespace in nested tags in SOAP message with J
- Where is WSIMPORT after JDK11
- How can I tell wsimport that separate WSDL files a
- Java (web service - SOAP) - How do I add a SOAP ha
相关文章
- Using JAX-WS 2.2.5 client with JDK/JRE 1.5
- JAX-WS and Guice 3
-
Remove element
in JAX-WS SOAP Response - How to determine if a Java web service is JAX-WS o
- How to get control over JAXBContext in JAX-WS?
- What might cause a inaccessiblewsdlexception?
- wsimport not using complex input types
- Multiple WSDLs Configurations With Maven JAXWS
Additionally to switch from java 6 to java 7 you may need to change the 'Order and Export' Eclipse tab in 'Java build path' and put 'JRE system library' on top of the list. If that works it could mean you have an old jar somewhere in your project.
add additional option "-target 2.0" while using wsimport to generate source codes for JAX-WS 2.0 and so on.
You had produced code that needs JAX-WS 2.1. Version 2.0 does not have WebServiceFeature class, and as result also not constructor in Service with such a argument type.
As you see, in Java SE 6 there is no such a constructor: javax.xml.ws.Service SE 6, but for example in Java EE 6 there is: javax.xml.ws.Service EE 6
You can manually add webservices-api.jar from JAX-WS 2.2 API, into /lib/endorsed. See the bottom of this page: https://blogs.oracle.com/ritzmann/entry/metro_2_0_on_java
Check the Java version in Eclipse. Go the command prompt and check for the Java version there (command: java -version). Match both the versions and it should work just fine.
remove jdk1.6 from classpath,then add jdk1.7 can resolve this issue