相关文章推荐
眼睛小的盒饭  ·  ArrayNode (The Adobe ...·  1 年前    · 
冷冷的胡萝卜  ·  klayge 4.2.0 ...·  2 年前    · 

I am trying to create the java files from a remote webservice. I downloaded axis 1.4, copied the lib folder to c:\data\axis\lib which contains of these files:

axis.jar

axis-ant.jar

commons-discovery-0.2.jar

commons-logging-1.0.4.jar

jaxrpc.jar

log4j.properties

log4j-1.2.8.jar

saaj.jar

wsdl4j-1.5.1.jar

I added the c:\data\axis\lib folder to the %AXISCLASSPATH%. Now I am trying to create the java classes using this cmd:

java -cp %AXISCLASSPATH% org.apache.wsdl.WSDL2JAVA http://myurl.com?wsdl

However I keep getting this error message:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/wsdl/

WSDL2Java

Caused by: java.lang.ClassNotFoundException: org.apache.axis.wsdl.WSDL2Java

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

Could not find the main class: org.apache.axis.wsdl.WSDL2Java. Program will exi

Can somebody please help me to get working?

Add the jars to the classpath individually if you're using a Java version before 6. If you're using Java 6, see here if you want to use wildcards.

在使用Idea根据 wsdl 自动生成java code的时候; 抛出 无法 找到 主类 org . apache . axis . wsdl . WSDL2Java (Throws Could not find main class: org . apache . axis . wsdl . WSDL2Java )。 添加本文的jar包压缩包解压出来的所有jar包到当前使用的java.exe 命令的lib目录下的ext目录中即可解决。 针对Win10!!! Java运行“HelloWorld“出错,找不到或 无法 加载 主类 ,原因 java.lang.ClassNotFoundException: HelloWorld     a,在类上添加@WebService注解          (注:此注解是jdk1.6提供的,位于javax.jws.WebService包中)      b,通过EndPoint(端点服务)发布一个WebService         (注:EndPoint是jdk提供的一个专门用于发布服务的类,该类的publish方法接收两个参数,一个是本地的服... 如果是已经多次使用的环境及工具,别的工程可以正常运行java文件,可以尝试清理一下工程: 清理后再运行一下试试,我之前遇到过这种情况是清理解决的。 如果是新手,需要检查一下环境变量等问题,如下: 检查环境变量配置问题: JAVA_HOME:D:\Java\jdk1.8.0_9 2003 年 11 月本文详细介绍了在Linux环境下以 Apache Axis + Resin作为Web服务平台部署Web服务时的常见问题及解决方法。衷心希望本文对Web服务的开发人员或对Web服务感兴趣的读者能起到一定的帮助作用。1 引言随着Web服务技术的发展和成熟,其方便性和易用性已逐渐被人们所接受,越来越多的合作伙伴之间开始利用Web服务来实现合作方之间的数据接口。使用 Apache 安装JDK安装Tomcat到C:\Tomcat并验证安装是否成功下载 AXIS 项目打包文件 axis -1_3.zip解压缩后将目录中的webapps目录下的 axis 子目录拷贝到C:\Tomcat\webapps下。验证 AXIS 的安装:重新启动Tomcat服务器后打开浏览器输入网址ht https://httpd. apache . org /docs/2.4/ https://httpd. apache . org /docs/2.4/mod/mod_proxy_wstunnel.html websockets https://can... 解决:java.lang.ClassNotFoundException: org . apache . axis . wsdl . WSDL2Java 一·问题描述:1.idea解析 wsdl 文件失败,报错如图所示:二·报错原因:三·解决办法: 一·问题描述: 1.idea解析 wsdl 文件失败,报错如图所示: 二·报错原因: idea的WebService Client工具解析 wsdl 文件,缺少相关的jar包 三·解决办法: 参考这个文章:IDEA如何解析 wsdl 文件为Java源代码 https://blog.csdn.ne