我正在尝试使用axis2和maven生成webservice客户端,所以我遵循了一些教程并将一些代码行放在我的pom.xml中:
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<goals>
<goal>wsdl2code</goal>
</goals>
<configuration>
<packageName>my.packageName</packageName>
<wsdlFile>src/main/resources/wsdl/service.wsdl</wsdlFile>
<databindingName>xmlbeans</databindingName>
<generateAllClasses>true</generateAllClasses>
<generateServerSide>true</generateServerSide>
<generateServerSideInterface>true</generateServerSideInterface>
<generateServicesXml>true</generateServicesXml>
<serviceName>service</serviceName>
</configuration>
</execution>
</executions>
</plugin>
我添加了依赖项:
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.6</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId>
<version>1.2.6</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-wsdl4j</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.3.0</version>
</dependency>
事实是,当我用mvn clean install
or编译时mvn clean compile
,我得到了消息:
[信息] 执行目标 'org.apache.axis2:axi s2-wsdl2code-maven-plugin:1.5.1:wsdl2code' 的插件管理器内部错误:无法加载 mojo 'org.apache。插件“org.apache.ax is2:axis2-wsdl2code-maven-plugin”中的axis2:axis2-wsdl2code-maven-plugin:1.5.1:wsdl2code'。缺少必需的类:org/apache/axis2 /wsdl/codegen/CodeGenerationException org.apache.axis2.wsdl.codegen.CodeGenerationException
有人能帮助我吗?