Today I generated a webservice client with CXF 2.6.1 (latest version), using the tool wsdl2java provided. I want to compile the generated classes with Java 5 on Eclipse but it fails because of the following imports:
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
The CXF FAQ states that I can use it with Java 5. So I don't understand why it wouldn't compile in Eclipse.
I asked for a build.xml
to be generated. When I run ant
with that script, it works. The build.xml
be found by downloading CXF 2.6.1 or inline as a template (easy to understand; the ant-target to use is build
). From it, I deduced I needed to grab the following libraries, which I did and put in my eclipse project.
So how can I get it compiling in Eclipse? What libraries, if any, am I missing?
Notes:
set
in a Windows command prompt, there is no reference to my Java 6 installation folder.I don't need to copy the CXF libraries, just to link them inside my project. That works, since cxf-manifest.jar is a jar file with nothing in it except for a classpath which in turn loads all the libraries of CXF.