The JDK provides a wsimport.exe command that is used primarily to generate client code for WebService and then invoke WebService.
Wsimport is based on jdk1.6.0_21 and above the generated local code, it can only resolve the server-side SOAP protocol is 1.1, can not resolve the SOAP1.2 protocol. If parsing SOAP1.2 will parse incomplete.
Usage: If you have already configured the JDK for the PATH environment variable C:\Documents and settings\administrator>wsimport-s f:\-P com.client.jdk.wsimporthttp:// localhost:1111/hello?wsdl
-S to specify the path to the build file, the-P custom class package http://localhost:1111/hello?wsdl is the path to the WSDL.
CXF also provides command Wsdl2java.exe to generate client code from WSDL. It is based on the local code generated by jdk1.7, so you need to make a little change to the generated code.
It can support the SOAP1.1 and SOAP1.2 protocols. The premise is that you have already downloaded the Apache CXF and configured the Wsdl2java.exe for the PATH environment variable.
Usage: C:\Documents and settings\administrator>wsdl2java-d f:\-P COM.CLIENT.CXF http://localhost:1111/hello?wsdl
-d Specifies the path to the build file, the-P custom class package http://localhost:1111/hello?wsdl is the path to the WSDL.