Axis generates Java client code based on WSDL

Source: Internet
Author: User
Tags wsdl

There are several ways to generate Java client code based on WSDL, where the code generated by using axis is more friendly and is often used as a method. First download the Axis jar package: Axis-bin-1_4.zip

Official address: http://ws.Apache.org/axis/as if the official download can not, provide under my Baidu cloud: Http://pan.baidu.com/s/1hs9AwHQ

Adding Configuration environment variables

Axis_home: Unzip the root directory \axis\axis-1_4

Axis_lib: Unzip the root directory \axis\axis-1_4\lib\axis.jar

After the path variable, add:;%axis_home%\bin

Note the semicolon, as well as the Java environment variables are also set Java_home, Jre_home

Create a BAT file

The contents are:


The Lib path of Set axis_lib=axis-1_4
Set java_cmd=java-djava.ext.dirs=%axis_lib%
Set output_path= output file path
Set Package= Package Name
%java_cmd% org.apache.axis.wsdl.wsdl2java-o%output_path%-p%package% own WSDL file

For example: My Axis-bin-1_4.zip file is unzipped in the E:\java\ resource collection \axis-bin-1_4, and then the WSDL file is the same as the bat file that is placed in the sibling directory

Set Axis_lib=e:\java\ Resource Collection \axis-bin-1_4\axis-1_4\lib
Set java_cmd=java-djava.ext.dirs=%axis_lib%
Set Output_path=e:\java\ Resource Collection \axis-bin-1_4
Set Package=server. HelloWorld
%java_cmd% org.apache.axis.wsdl.wsdl2java-o%output_path%-p%package% HRM.asmx.wsdl

Double-clicking a bat file is a code that can be generated.

  

  

Axis generates Java client code based on WSDL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.