webservice服务一般都是使用WSDL(web service descriptive language)文件的样式来发布的,在WSDL文件里面,包含这个webservice暴露在外面可供使用的接口。
wsdl文本解析

1、直接AXIS调用远程的web service
第一步:引入相关依赖
<dependencies>
<!--spring web Service的包-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
<version>1.5.2.RELEASE</version>
</dependency>
<!--spring web service wsdl包-->
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.3</version>
</dependency>
<!-- 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>

本文介绍了Java调用WebService的三种方式:1) 使用AXIS直接调用远程web service;2) 通过代理类形式调用;3) 在Springboot中调用。详细步骤包括依赖引入和代码实现。
4334

被折叠的 条评论
为什么被折叠?



