Reputation: 113
I have an issue for 2 days straight now and I don't know how to resolve it, I have an axis 2 project under IntelliJ and I want to generate the wsdl for the client but when I try to with the Tools->WebServices->Generate Java code from WSDL ..
Generate Java code from wsdl...
I have the following error :
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
My service on the server side is the following :
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;
}
}
The client maven dependencies :
<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>
Thanks for the help !
Upvotes: 4
Views: 5643
Reputation: 113
I resolved it by going to File->Settings->Tools->Web services and set up the correct axis2 binary disribution :
http://www.apache.org/dyn/closer.lua/axis/axis2/java/core/1.7.9/axis2-1.7.9-bin.zip
(I had the IntelliJ IDEA one).
Upvotes: 6