zoukankan      html  css  js  c++  java
  • org.apache.axis2.AxisFault: Service class XXXXX must have public as access Modifier解决方案

    使用Axis2工具生成客户端调用辅助类后,编写客户端调用代码运行时报错,完整错误信息如下:

    log4j:WARN No appenders could be found for logger (org.apache.axiom.locator.DefaultOMMetaFactoryLocator).
    log4j:WARN Please initialize the log4j system properly.
    org.apache.axis2.AxisFault: Service class com.csdn.ws.axis2.recipe01.HelloWorld must have public as access Modifier
        at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:508)
        at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:368)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:414)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
        at com.csdn.ws.axis2.recipe01.HelloWorldStub.sayHello(HelloWorldStub.java:162)
        at com.csdn.ws.axis2.recipe01.client.Client.main(Client.java:15)

    乍一看错误信息好像是说web服务接口和实现类必须定义为public,检查代码发现就是public,真正的原因是在services.xml中描述WebService时

    <parameter name="ServiceClass">
            com.csdn.ws.axis2.recipe01.HelloWorldImpl
    </parameter>

    ServiceClass属性应该指定Web服务实现类,而不是接口。

  • 相关阅读:
    Leetcode888. 公平的糖果棒交换
    Leetcode81. 搜索旋转排序数组 II
    Leetcode80. 删除排序数组中的重复项 II
    Leetcode1631. 最小体力消耗路径
    Leetcode57. 插入区间
    Leetcode724. 寻找数组的中心索引
    Leetcode18. 四数之和
    Leetcode110. 平衡二叉树
    Leetcode1128. 等价多米诺骨牌对的数量
    python 集合和深浅copy
  • 原文地址:https://www.cnblogs.com/lanzhi/p/6468255.html
Copyright © 2011-2022 走看看