I am in the process of learning CXF with the help of this Apache CXF Web Service Development book but, alas, one of the book's sample projects won't even compile!
The code in question is Chapter 3's contractfirst
and it's not a typo problem because I am using the source code verbatim as downloaded from the book's support site.
The 3 compilation errors point actually to a single problem:
Chapter3\contractfirst\src\demo\order\OrderProcessService.java:52: cannot find symbol
symbol: constructor Service(java.net.URL,javax.xml.namespace.QName,javax.xml.ws.WebServiceFeature[])
location: class javax.xml.ws.Service
super(WSDL_LOCATION, SERVICE, features);
^
In the file OrderProcessService.java.
Initial research suggests that this may be a JAX-WS 2.2 vs. 2.1 issue but I have no idea how to make this ANT-based compilation environment "endorse" JAX-WS 2.2.
I tried placing a jaxws-api.jar
in %JAVA_HOME%\lib\endorsed
and I tried adding that jar to the project's libraries list but none seemed to help.
I am not using Maven, so I can't even list it as a dependency and hope that this will be magically resolved.
Any idea how to solve this problem? So that I can make this very simple project build?