我们首先要准备依赖文件
<!--webService 调用端-->
<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>
<!--webService 调用端-->
第二一步是需要在服务端生成对应的webService文件
在这里插入图片描述
在项目的根目录执行cmd
执行cmd打开命令窗口
![请添加图片描述](https://img-blog.csdnimg.cn/8191
bd1f6a448a5b01c591e79d3ca05.png)
直接wsimport -keep http://127.0.0.1:8080/ams_syxzsxtjk/webService/JK_SBZC?wsdl
运行生成
将代码全路径放在你的客户端中
编写main方法调用
```java
package com.example.demo;
import cn.csg.soa.gd.*;
import lombok.extern.slf4j.Slf4j;
/**
*
* Title: JwsClientHello
* Description: webService 客户端调用
* Version:1.0.0
* @author panchengming
*/
@Slf4j
public class JwsClientHello {
public static void main(String[] args) {
//调用webservice
JKROOM hello=new JKROOMService().getJKROOMPort();
JkROOMReqVo objectFactory = new JkROOMReqVo();
objectFactory.setID("1");
ZcfkRe name=hello.jKROOM(objectFactory);
System.out.println(name.getRETURNCODE());
}
}
[1]: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference
[2]: https://mermaidjs.github.io/
[3]: https://mermaidjs.github.io/
[4]: http://adrai.github.io/flowchart.js/