`
jveqi
  • 浏览: 319043 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

org.apache.axis2.AxisFault: The input stream for an incoming message is null.

阅读更多

org.apache.axis2.AxisFault: The input stream for an incoming message is null.

 

 

最近学习axis2 ,找了篇文章《Axis2 WebService(配置、发布、调用)》(地址为:http://www.lifeba.org/arch/java_axis2_webservice.html)。

 

比照文章做例子的时候 ,执行第二个无参有返回值的方法时,报

org.apache.axis2.AxisFault: The input stream for an incoming message is null.

 

初次接触,后经多方排查,发现(让您见笑了):

1、

        当方法体没有参数返回的时候,我们要采用RPCServiceClient.invokeRobust(QName, new Object[]{..});
        当有返回参数的时候采用:RPCServiceClient.invokeBlocking(QName, new Object[]{..},new Class[]{..})

 

2、services.xml配置中,

<operation name="getAge">
         <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
         <!-- 有返回值 -->
 </operation>
 <operation name="getAdd">
          <messageReceiver  class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
          <!-- 无返回值 -->
 </operation>

 

依照次两点,该异常信息被解决。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics