axis问题求解
[align=center][/align]刚学axis,遇到些难题,求高手解答一下:
安装axis时,我都是按照步骤来的,我的myeclipse版本是6.6,tomcat 6.0,jdk 1.4.2,axis 1.4.我在安装包的axis-bin-1_3\axis-1_3\samples\userguide\example2目录下找到Calculator .java文件,将其改名为Calculator .jws然后copy到tomcat的webapps/axis/下。发布这个webservice。这个webservice提供了两个功能即加减功能。<o:p></o:p>
当请求这个页面http://localhost:8000/axis/http://localhost:8000/axis/Calculator.jws时报这样的错。
AXIS error
Sorry, something seems to have gone wrong... here are the details:
Fault - Error while compiling: D:\apache-tomcat-6.0.30\apache-tomcat-6.0.30\webapps\axis\WEB-INF\jwsClasses\Calculator.java
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.compileError
faultSubcode:
faultString: Error while compiling: D:\apache-tomcat-6.0.30\apache-tomcat-6.0.30\webapps\axis\WEB-INF\jwsClasses\Calculator.java
faultActor:
faultNode:
faultDetail:
{}Errors:Error compiling D:\apache-tomcat-6.0.30\apache-tomcat-6.0.30\webapps\axis\WEB-INF\jwsClasses\Calculator.java:
Line 0, column 0: could not parse error message: Note: sun.tools.javac.Main has been deprecated.
error: Invalid class file format in D:\myeclipse\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '49.0' is too recent for this tool to understand.
D:\apache-tomcat-6.0.30\apache-tomcat-6.0.30\webapps\axis\WEB-INF\jwsClasses\Calculator.java:17: Superclass java.lang.Object of class Calculator not found.
Line 0, column 0: no more tokens - could not parse error message: public class Calculator {
^
2 errors, 1 warning
还有弄axis到生成wsdl文件时候出问题了。
java -Djava.ext.dirs=D:\axis-1_4\lib org.apache.axis.wsdl.Java2WSDL -o UpSendFMMsg.wsdl -l "http://localhost:8000/axis/services/TestService" -n "urn:TestService" -p"com.suntendy.test.webservice" "urn:TestService"
首先我在cmd下转到我的classes路径下C:\jfreechar\axis\WebRoot\WEB-INF\classes。进行上面的生成时说the <class of porttype>was not specified;
我不知道怎么办了。头想破了。[size=large]求解,求解,求解!!![/size] 1 楼 Maike.first 2011-12-20 这个问题已经解决了。原因是myeclipse6.6里面自带了rt.jar.与原有的jdk里面的rt.jar冲突。换个myeclipse为5.0的就可以了