String url = "http://localhost:8080//services/xxxService";
try {
xxxHttpBindingStub bindingStub = new xxxHttpBindingStub(new URL(url),new xxxLocator());
//这样就可以调用service接口中的方法了。
//把webservice生成客户端的工具可以在https://download.csdn.net/download/MQ525463147/12585960这里下载,
//是通过axis生成的客户端不需要别的软件就可以生成,里面有成功生成的例子,
//需要注意盘符地址和生成代码的地址(包),就可以了
} catch (Exception e) {
e.printStackTrace();
}
补充:可能需要一个引入一个maven包,生成的代码中会用到javax.xml.rpc.xxx
<!-- https://mvnrepository.com/artifact/javax.xml/jaxrpc-api -->
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>