当前位置: 代码迷 >> Java Web开发 >> 调用WEB服务
  详细解决方案

调用WEB服务

热度:11   发布时间:2016-04-17 15:39:22.0
调用WEB服务,求助
我使用AXIS1.4(容器是TOMCAT5.5.17)调用AMAZON   WEB服务的时候,


在设置了环境变量:运行SETENV.BAT
set   AXIS_HOME=E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis
set   CLASSPATH=.
set   CLASSPATH=%AXIS_HOME%\lib\axis.jar;%CLASSPATH%
set   CLASSPATH=%AXIS_HOME%\lib\commons-discovery-0.2.jar;%CLASSPATH%
set   CLASSPATH=%AXIS_HOME%\lib\commons-logging-1.0.4.jar;%CLASSPATH%
set   CLASSPATH=%AXIS_HOME%\lib\jaxrpc.jar;%CLASSPATH%
set   CLASSPATH=%AXIS_HOME%\lib\saaj.jar;%CLASSPATH%
set   CLASSPATH=%AXIS_HOME%\lib\log4j-1.2.8.jar;%CLASSPATH%
set   CLASSPATH=%AXIS_HOME%\lib\wsdl4j-1.5.1.jar;%CLASSPATH%

后使用java   org.apache.axis.wsdl.WSDL2Java   AWSECommerceService.wsdl的时候,发现以下错误

:Exception   in   thread   "main "   java.lang.NOClassDeFoundError:   org.apache.axis.wsdl.WSDL2Java


请教各位~   (AXIS的JAR文件在配置的时候是齐全的)

环境变量CLASSPATH的设置:
E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\axis.jar;E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\axis-ant.jar;E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\axis-schema.jar;E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\commons-discovery-0.2.jar;E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\commons-logging-1.0.4.jar;E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\jaxrpc.jar;E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\log4j-1.2.8.jar;E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\saaj.jar;E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar;   E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\activation.jar;E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\mail.jar;E:\Program   Files\Apache   Software   Foundation\Tomcat   5.5\webapps\axis\WEB-INF\lib\xmlsec-1.3.0.jar;E:\Program   Files\Java\jdk1.5.0_04\lib;.

------解决方案--------------------
没有设置好环境变量啊.自己去看文档.
  相关解决方案