xywuyiba6 发表于 2017-1-13 07:02:57

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>
  依照次两点,该异常信息被解决。
页: [1]
查看完整版本: org.apache.axis2.AxisFault: The input stream for an incoming message is null.