未找到 wsdl2code

发布于 2024-09-26 18:42:37 字数 2625 浏览 8 评论 0原文

我正在尝试使用 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 installmvn 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

万水千山粽是情ミ 2024-10-03 18:42:37

我的猜测是您缺少此依赖项:

<dependency>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-codegen</artifactId>
    <version>1.5.1</version>
</dependency>

scope=Provided 或插件依赖项可能就足够了。您可以在以下位置查看插件的依赖项 mvnrepository.com

My guess is that you are missing this dependency:

<dependency>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-codegen</artifactId>
    <version>1.5.1</version>
</dependency>

scope=Provided or plugin dependency are probably enough. You can see the plugin's dependencies on mvnrepository.com

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文