While trying to run java2wsdl axis2 plugin using mave开发者_运维技巧n, i get the following error
[axis2-java2wsdl:java2wsdl {execution: default-cli}]
java.lang.NullPointerException
at sun.net.util.URLUtil.urlNoFragString(URLUtil.java:29)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:292)
at sun.misc.URLClassPath.getResource(URLClassPath.java:168)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
my plugin in the pom looks as follows
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-java2wsdl-maven-plugin</artifactId>
<configuration>
<className>com.merc.ws.books.BookService</className>
</configuration>
</plugin>
my dependencies are as follows
<dependencies>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
</dependency>
<!-- Dependencies required by client -->
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-codegen</artifactId>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
</dependency>
</dependencies>
Try mvn process-classes
instead.
Please, try to run mvn process-classes axis2-java2wsdl:java2wsdl
and let me know if it helps.
Executing just mvn process-classes
or/and adding
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>java2wsdl</goal>
</goals>
</execution>
</executions>
section (according to Maksim Sorokin) didn't work for me.
Make sure your service.wsdl file is in the right place: src/main/axis2/service.wsdl
精彩评论