未找到 wsdl2code
我正在尝试使用 axis2 和 Maven 生成 Web 服务客户端 所以我遵循了一些教程,并在我的 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
或 mvn cleancompile
进行编译时代码>,我收到消息:
[INFO] 插件中的内部错误 经理执行目标 'org.apache.axis2:axi s2-wsdl2code-maven-plugin:1.5.1:wsdl2code': 无法加载 mojo 'org.apache。 axis2:axis2-wsdl2code-maven-plugin:1.5.1:wsdl2code' 在插件“org.apache.ax”中 is2:axis2-wsdl2code-maven-plugin'。一个 缺少所需的类: 组织/阿帕奇/axis2 /wsdl/codegen/CodeGenerationException org.apache.axis2.wsdl.codegen.CodeGenerationException
有人可以帮助我吗?
I'm trying to generate webservice client with axis2 and maven
so I followed some tutorials and put some code lines in my 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>
I've added the dependencies :
<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>
The fact is that when I compile with mvn clean install
or mvn clean compile
, I got the message:
[INFO] Internal error in the plugin
manager executing goal
'org.apache.axis2:axi
s2-wsdl2code-maven-plugin:1.5.1:wsdl2code':
Unable to load the mojo 'org.apache.
axis2:axis2-wsdl2code-maven-plugin:1.5.1:wsdl2code'
in the plugin 'org.apache.ax
is2:axis2-wsdl2code-maven-plugin'. A
required class is missing:
org/apache/axis2
/wsdl/codegen/CodeGenerationException
org.apache.axis2.wsdl.codegen.CodeGenerationException
Can someone help me please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的猜测是您缺少此依赖项:
scope=Provided 或插件依赖项可能就足够了。您可以在以下位置查看插件的依赖项 mvnrepository.com
My guess is that you are missing this dependency:
scope=Provided or plugin dependency are probably enough. You can see the plugin's dependencies on mvnrepository.com