1.pom文件
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.5.13</version>
</dependency>
2.java代码调用
SoapClient client = SoapClient.create("http://cwzf.zzcsjr.edu.cn/xysf/OrderView.asmx")
// 设置要请求的方法,此接口方法前缀为web,传入对应的命名空间
.setMethod("web:View", "http://www.szhtkj.com.cn/")
.setParam("xh",xh)//参数
.setParam("tm",tm)//参数
.setParam("sign",sign);//参数
String s=client.send(true);//发送请求
System.out.println(s);
3.返回结果
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<ViewResponse xmlns="http://www.szhtkj.com.cn/">
<ViewResult>
<ReturnCode>00000</ReturnCode>
<ReturnMsg>查询成功</ReturnMsg>
<Xh>20190613</Xh>
<Amount>0.11</Amount>
</ViewResult>
</ViewResponse>
</soap:Body>
</soap:Envelope>