[
http://issues.apache.org/jira/browse/AXIS2-1349?page=comments#action_12442606 ]
Kevin Conroy commented on AXIS2-1349:
-------------------------------------
I also get a NullPointerException from lack-of-null check on line 132 when
trying to execute a Rest service that has a void return type:
java.lang.NullPointerException
at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:133)
at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:502)
at
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:150)
at
org.apache.axis2.transport.http.util.RESTUtil.processGetRequest(RESTUtil.java:140)
at
org.apache.axis2.transport.http.AxisRESTServlet.doGet(AxisRESTServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
If I give the service a non-void return type (e.g. empty String) then
everything works fine.
> RPCMessageReceiver misbehaviour
> -------------------------------
>
> Key: AXIS2-1349
> URL: http://issues.apache.org/jira/browse/AXIS2-1349
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: rpc
> Affects Versions: 1.1
> Reporter: Ruwan Linton
> Assigned To: Deepal Jayasinghe
>
> I have writen a void setName operation and engaged the RPCMessageReceiver in
> the services.xml
> When I tried to invoke this method using fireAndForget it worked but when I
> tried to do sendRecieve Axis2 engine gave me an AxisFault
> org.apache.axis2.AxisFault: Exception occurred while trying to invoke service
> method setName
> at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
> at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:569)
> at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)
> at
> org.apache.axis2.messageReciever.test.client.Axis2TestathonClient.main(Axis2TestathonClient.java:38)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> This is because a npe is occured in the RPCMessageReceiver because it is
> trying to get some parameters from the outaxisMessage without checking
> weather it is null or not.
> I think Axis engine should not fail at this point.
> <<Code from the RPCMessageReceiver
>
> L: 130 // Handling the response
> L: 131 AxisMessage outaxisMessage =
> op.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
> L: 132 if (inAxisMessage != null) {
> L: 134 messageNameSpace =
> outaxisMessage.getElementQName().getNamespaceURI();
> L: 135 }
> >>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]