How to use Apache CXF as a client?

I know how to create client stubs using Apache CXF. However, when I try to run the generated classes, it uses JAXWS. In addition, I notice that import classes are generated classes from the javax package. How can I use the generated classes to use Apache CXF libraries instead of JAXWS libraries?

Below is the code that I use to create client stubs:

wsdl2java -frontend jaxws21 -wsdlLocation "META-INF/wsdl/WSCustom.wsdl" -client -d C:\Workspace\WSClient\META-INF\wsdl\ "C:\Workspace\WSClient\META-INF\wsdl\WSCustom.wsdl"
+5
source share
1 answer

, , CXF, CXF JAX-WS. CXF , , RI, JDK, , CXF . .

, JAR-CXF , , , cxf-rt-frontend-jaxws cxf-rt-transports-http . maven, , , Apache Ivy main JAR

java -jar ivy-2.3.0.jar -dependency org.apache.cxf cxf-rt-frontend-jaxws 2.7.3 -retrieve "[artifact]-[revision](-[classifier]).jar"
java -jar ivy-2.3.0.jar -dependency org.apache.cxf cxf-rt-transports-http 2.7.3 -retrieve "[artifact]-[revision](-[classifier]).jar"

JAR Maven Central .

+4

All Articles