org.apache.axis2.AxisFault: Service class XXXXX must have public as access Modifier解决方案
2016-03-28 21:46
981 查看
使用Axis2工具生成客户端调用辅助类后,编写客户端调用代码运行时报错,完整错误信息如下:
乍一看错误信息好像是说web服务接口和实现类必须定义为public,检查代码发现就是public,真正的原因是在services.xml中描述WebService时
ServiceClass属性应该指定Web服务实现类,而不是接口。
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服务实现类,而不是接口。
相关文章推荐
- org.apache.axis2.AxisFault: Service class XXXXX must have public as access Modifier解决方案
- org.apache.axis2.AxisFault: Service class XXXXX must have public as access Modifier解决方案
- WebService学习之旅(六)使用Apache Axis2实现WebService客户端调用
- WebService学习之旅(六)使用Apache Axis2实现WebService客户端调用
- WebService学习之旅(六)使用Apache Axis2实现WebService客户端调用
- Apache Arrow源码分析(二)——类型的封装
- LAMP环境配置初体验
- 创建高可用Apache服务
- Apache Spark Jobs 性能调优(二)
- 关于org.apache.jasper.JasperException: Unable to compile class for JSP问题的解决
- 如何使用 Apache ab 以及 OneAPM 进行压力测试?
- 如何使用 Apache ab 以及 OneAPM 进行压力测试?
- apache 设置禁止访问某些文件或目录
- Apache的Order Allow,Deny 详解
- Apache ActiveMQ
- apache安装
- linux上部署Django项目(Apache+mod_wsgi+django)
- 初次尝试利用脚本自动编译搭建LAMP-----Apache
- Apache POI - the Java API for Microsoft Documents - 15秒快速入门
- PHP,APACHE连接数量解决