Recently through the "plunge into the WebService CXF video tutorial" Video Learning WebService, server-side code is no problem, but in the configuration of client code, but encountered a variety of problems.
First of all, it is recommended to use CXF's Wsdl2java tool in the video to generate the client code, which can never be run on my machine and cannot be solved.
Use the tool that comes with eclipse to generate code successfully, Anxi.
But learn to custom interceptor This section of the time, Configuration clientproxy.getclient () Here always error, has been unable to pass, white search not its solution ...
Finally, you can generate the client code with the Wsimport tool that comes with the JDK, try it out, and record the command here for future use.
Switch to the bin directory of the JDK and execute the following command:
wsimport-keep-d D:\WebService http://192.168.31.7/helloWorld?wsdl
Wait a moment. A bunch of Java code and Class code are generated in the D:\WebService directory, and the Java code is copied to its desired directory for normal use.
Generate WebService client code with the JDK's own tools