由于要和第三方对接短信业务,对方提供的文档使用的是webservice,所以我们系统中需要生成对应的客户端连接,不多说上代码.....
项目pom需要增加以下jar
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>apache-cxf</artifactId>
<version>3.1.7</version>
<type>pom</type>
</dependency>
<!-- axis 1.4 jar start -->
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.xml.soap/javax.xml.soap-api -->
<dependency>
<groupId>javax.xml.soap</groupId>
<artifactId>javax.xml.soap-api</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>javax.xml.rpc</groupId>
<artifactId>javax.xml.rpc-api</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2</version>
</dependency>
本次开发使用的是idea生成的客户端
运行成功