一.添加所需的jar包
<!-- axis 1.4 jar start -->
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis-jaxrpc</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis-saaj</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.4</version>
</dependency>
<!-- axis 1.4 jar end -->
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<!-- 邮件start -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<!-- 邮件end -->
不是maven项目,或者没有网络等原因,这边附带下载地址
https://download.csdn.net/download/smallfish1999/13714948
二.右键项目 找到webservices -> GENERATE JAVA CODE FROM...![](https://i-blog.csdnimg.cn/blog_migrate/232970755a6b3132a3d0c8746965ea8e.png)
三.把wsdl路径输入,用户和密码按需填写
点OK就会生成在 output path 下的 mypackage(可手动修改至想放的路径)