1.Asix版本冲突的问题【解决:我用wsdl2Java生成的客户端调用代码,里面有两行代码:oper.setStyle(org.apache.axis.enum.Style.WRAPPED);
oper.setUse(org.apache.axis.enum.Use.LITERAL);enum应该是被认定成了关键字,这里采用axis1.0会报错的, 用axis1.4的jar包就没问题了】
2.异常:An error occurred at line: 34 in the jsp file: /sampleTestCCProxy/Result.jsp
org.eclipse.jst.ws.util.JspUtils cannot be resolved to a type【解决:把Client清除掉,Eclipse重启,异常消失。】
3.[ERROR] The ws.jar service, which is not valid, caused com.ctc.wstx.exc.WstxIOEx
ception: Invalid UTF-8 middle byte 0xfd (at char #66, byte #-1)【解决:这是中文问题,删掉services.xml中的中文即可。要想在services.xml中加中文,需要将编码设为UTF-8或GBK。】
4.异常:Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL【解决:没有在AXIS2上发布,所以导致客户端生成Stub类时出错】
5.
在用eclipse配合Axis2进行开发的时候,编译通过,启动tomcat也顺利,但是就是在调用服务器端的服务时,会抛出:
The ServiceClass object does not implement the required method
in the following form: OMElement xxx (OMElement e)【解决的方法是在service.xml里面对服务器端开放的服务(操作方法)进行说明。比如我的服务端实现了这两个方法login和getLoginMsg,那么就需要这么定义一下:<operation name="login" >
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</operation>
<operation name="getLoginMsg" >
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</operation>】
6.按照教程配置Axis2,出现The Apache Axis2 Web service runtime in Tomcat v7.0 Server does not support the service project 问题【经过Google漫长搜索等待,终于小心的找到了解决方法如下:只能使用Servlet3.0以下的规范
7.异常:javax.servlet.ServletException: Servlet.init() for servlet springmvc threw exception 【解决:经检查原来tomcat运行环境配置错误】
8.New WebService到最后点击finish却一直卡在那,也不能关闭,要关闭就跳出对话框Wizard can not be closed due to an active operation.You must cancel the operation before you can close the wizard.【解决:寻找一个文件夹从以前的项目(应具有相同的名称)。如果有一个,删除它。也删除该项目从工作区本身的任何保留,并尝试再次导入。】
9.在使用Axis2+eclipse开发web service时,在启动tomcat时,一直报错:java. lang.ClassNotFoundException: org.apache.ws.commons.schema.resolver.URIResolver【解决:在Axis2的安装目录下的lib文件夹下找到xmlschema-core-2.2.1.jar文件。将xmlschema-core-2.2.1.jar文件拷贝到tomcat安装目录下的lib文件夹里。重新部署启动tomcat。】
10.Axis2集成Hibernate时出现org.hibernate.HibernateException: ../hibernate.cfg.xml not found【解决:经过Google漫长搜索等待,终于小心的找到了解决方法,开始尝试硬编码路径:
Configuration cfg = new Configuration().configure(new File("x:\..\..\hibernate.cfg.xml"));没想到,终于ok啦!哈哈哈】