zoukankan      html  css  js  c++  java
  • 用Axis2发布WebService遇到的坑

    因为开发的系统是古老并且重量级的系统,jar包一大推引用及各种关联,集成axis2发布WebService服务的时候报错!

    message org.apache.xerces.dom.DocumentImpl.getXmlStandalone()Z

    description The server encountered an internal error that prevented it from fulfilling this request.

    exception

    org.apache.axis2.dataretrieval.DataRetrievalException: org.apache.xerces.dom.DocumentImpl.getXmlStandalone()Z
    	org.apache.axis2.dataretrieval.AxisDataLocatorImpl.getData(AxisDataLocatorImpl.java:85)
    	org.apache.axis2.description.AxisService.getData(AxisService.java:2964)
    	org.apache.axis2.description.AxisService.getWSDL(AxisService.java:1645)
    	org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1413)
    	org.apache.axis2.transport.http.ListingAgent.handleWSDLRequest(ListingAgent.java:327)
    	org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:183)
    	org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:260)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)



      上网找了博客,说是xerces的jar冲突的原因居多,经测试,另起一个web项目,把xerces-2.4.0.jar删除掉,确实是可以,是其中之一的解决方法,
    但是并不适用与笔者的正在开发中的系统,那个jar肯定是需要用到才会被引用在系统中的,所以说删除jar包方法不可行;
      继续摸索了一段时间,发现
    xerces-2.4.0.jar 与 xmlParserAPIs-1.0.jar 相关jar包冲突,xmlParserAPIs-1.0.jar 有多种命名(xmlAPIs等等);
      最后解决方法:
      更新 xerces-2.4.0.jar 的版本 为 xerces-2_6_2.jar(下载地址:http://www.java2s.com/Code/Jar/x/Downloadxerces262jar.htm),重启项目就ok了。
      以上方法对本项目有效,不确定对其他情况是否有效,仅供参考。
    
    
  • 相关阅读:
    斐波那契数列——兔子问题
    最长上升子序列
    洛谷P1325 雷达安装
    K短路
    DIJ的优化,和spfa的优化
    洛谷P5017摆渡车
    洛谷P2258 子矩阵
    三元表达式、列表推导式和生成器表达式
    递归调用、 二分法
    匿名函数、内置函数
  • 原文地址:https://www.cnblogs.com/oablog/p/axis2.html
Copyright © 2011-2022 走看看