在intellij中生成WSDL时出错:ClassNotFoundException:org.apache.woden.WSDLException

问题描述 投票:0回答:1

我现在连续两天都有问题,我不知道如何解决,我在IntelliJ下有一个axis 2项目,我想为客户端生成wsdl,但是当我尝试使用Tools-> WebServices->从WSDL生成Java代码。

Generate Java code from wsdl...

我有以下错误:

  Retrieving document at 'http://localhost:8080/Axis2_Server_war_exploded/services/HelloWorld?wsdl'.
 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/woden/WSDLException
    at org.apache.axis2.description.WSDLToAxisServiceBuilder.<init>(WSDLToAxisServiceBuilder.java:103)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.<init> (WSDL11ToAxisServiceBuilder.java:225)
    at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.<init> (WSDL11ToAllAxisServicesBuilder.java:63)
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:167)
    at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:50)
    at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
 Caused by: java.lang.ClassNotFoundException: org.apache.woden.WSDLException
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 6 more
 Done

我在服务器端的服务如下:

services.xml:

<serviceGroup>
<service name="HelloWorld">
    <parameter name="ServiceClass">HelloWorld.HelloWorld</parameter>
    <operation name="sayHelloWorldFrom">
        <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
    </operation>
</service>
</serviceGroup>

HelloWorld.java:

@WebService
 public class HelloWorld {
    @WebMethod
    public String sayHelloWorldFrom(String from) {
        String result = "Hello, world, from " + from;
        System.out.println(result);
        return result;
    }
 }

客户端maven依赖项:

    <dependencies>
    <dependency>
        <groupId>org.apache.woden</groupId>
        <artifactId>woden-core</artifactId>
        <version>1.0M10</version>
    </dependency>

    <dependency>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-kernel</artifactId>
        <version>1.7.9</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-transport-local</artifactId>
        <version>1.7.9</version>
    </dependency>

    <dependency>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-adb</artifactId>
        <version>1.7.9</version>
        <scope>compile</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2 -->
    <dependency>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2</artifactId>
        <version>1.7.9</version>
        <type>pom</type>
    </dependency>

    <dependency>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-transport-http</artifactId>
        <version>1.7.9</version>
    </dependency>

</dependencies>

感谢您的帮助!

我现在连续两天都有问题,我不知道如何解决,我在IntelliJ下有一个axis 2项目,我想为客户端生成wsdl,但是当我尝试使用Tools-> ...

java intellij-idea axis2
1个回答
0
投票

选择apache轴作为服务平台apache axis as service platform

© www.soinside.com 2019 - 2024. All rights reserved.