• 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服务实现类,而不是接口。

  • 相关阅读:
    数据加密标准(DES)详解(附源码)
    《ProGit》阅读笔记
    版本管理——Git和SVN的介绍及其优缺点
    jQuery-动画
    ajax与jsonp中的几个封装函数
    关于ajax
    js基础——数组的概念及其方法
    js实现放烟花效果——点击处会从下向上升起烟花
    js实现——鼠标移动时跟随着一连的小图片
    BFC的作用及其应用
  • 原文地址:https://www.cnblogs.com/lanzhi/p/6468255.html
Copyright © 2020-2023  润新知