resin下使用axis的问题

resin下部署了一个通过axis1.4调用webservice的应用,但在客户端调用的时候出现如下错误:

java .lang .IncompatibleClassChangeError: Class org .apache .axis .MessageContext does not implement the requested interface javax .xml .rpc .handler .MessageContext
at org .apache .axis .transport.http.ServletEndpointContextImpl.getServletContext(ServletEndpointContextImpl.java :39)
at org .springframework.remoting.jaxrpc.ServletEndpointSupport.init(ServletEndpointSupport.java :84)
at org .apache .axis .providers.java .JavaProvider.getNewServiceObject(JavaProvider.java :238)
at org .apache .axis .providers.java .JavaProvider.getServiceObject(JavaProvider.java :91)
at org .apache .axis .providers.java .JavaProvider.invoke(JavaProvider.java :287)
at org .apache .axis .strategies.InvocationStrategy.visit(InvocationStrategy.java :32)
at org .apache .axis .SimpleChain.doVisiting(SimpleChain.java :118)
at org .apache .axis .SimpleChain.invoke(SimpleChain.java :83)
at org .apache .axis .handlers.soap.SOAPService.invoke(SOAPService.java :454)
at org .apache .axis .server.AxisServer.invoke(AxisServer.java :281)
at org .apache .axis .transport.http.AxisServlet.doPost(AxisServlet.java :699)
at javax .servlet.http.HttpServlet.service(HttpServlet.java :153)
at org .apache .axis .transport.http.AxisServletBase.service(AxisServletBase.java :327)
at javax .servlet.http.HttpServlet.service(HttpServlet.java :91)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java :103)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java :187)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java :266)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java :270)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java :678)
at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java :721)
at com.caucho.util.ThreadPool$Item.run(ThreadPool.java :643)
at java .lang .Thread.run(Thread.java :619)

这个问题主要原因是resin的lib下jaxrpc-15.jar包没有实现 javax .xml .rpc .handler .MessageContext 接口,而axis下自带的jaxrpc.jar包实现了。

 

解决方法: 把resin的lib下axrpc-15.jar包替换成jaxrpc.jar就ok了!

你可能感兴趣的:(java,apache,webservice,servlet,SOAP)