0
我有一个wsdl,所有的测试都在soapUI中应用。测试成功了。 同时,我不知道我将如何整合我们的计划。 在SoapUI中完成所有项目后,我使用了WSDL2JAVA axis2。 它为我在文件夹中放了很多课。 我将如何结合? 我只需要一个简单的客户端。 任何简单的方法来做到这一点? 我也有时间戳,用户名,密钥库和一个信任库。 AXIS2能为我安排课程吗?现有的wsdl客户端
我有一个wsdl,所有的测试都在soapUI中应用。测试成功了。 同时,我不知道我将如何整合我们的计划。 在SoapUI中完成所有项目后,我使用了WSDL2JAVA axis2。 它为我在文件夹中放了很多课。 我将如何结合? 我只需要一个简单的客户端。 任何简单的方法来做到这一点? 我也有时间戳,用户名,密钥库和一个信任库。 AXIS2能为我安排课程吗?现有的wsdl客户端
听起来你需要类似Maven来构建和打包您的Web服务客户端。以下Maven POM是一个框架,其目标是从WSDL生成您的客户端类并将整个项目打包为JAR。
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>webservice-client</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.1.4</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>make-a-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<wsdlFiles>
<wsdlFile>myService.wsdl</wsdlFile>
</wsdlFiles>
</configuration>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>