Axis2 generates client code, and axis2 generates Client
To generate the client code through aix2, prepare the corresponding package and execute the command as follows:
I. Preparation of required packages
Download axis2-1.6.2-bin.zip and extract it from the lib package.
Jaxrpc. jar
Wsdl4j-1.6.2.jar
Axis. jar (this file does not appear in the latest package) needs to be downloaded separately from the Internet
Commons-logging-1.1.1.jar
Commons-discovery-0.2.jar
Mail-1.4.jar
Ii. execute commands
Create a lib folder, import the preceding package to the folder, and enter the directory of the lib folder in the dos window.
Run the following command:
Java-Djava. ext. dirs = lib org. apache. axis. wsdl. WSDL2Java-o E: \ workspace \ JavaWeb \ src-p com. lzb. wsclient. sms http: // 192.168.0.219: 8080/AxisServer/services/smsService? Wsdl
Path of the package required by lib-d-path of o output code-path of p code output package path followed by the wsdl access address
The following code can be generated after execution:
How does axis2 generate the wsdl file into a java client, and the server calls the code?
MyEclipse integrates the axis2 java client generation function. Right-click the wsdl file-> NEW-> others-> to search for the web client.
Axis2 generates local Java code based on the wsdl File
Reference: blog.csdn.net/yakson/article/details/8997622
JAVA generates WebService client commands in three ways