[ 
https://issues.apache.org/jira/browse/AXIS2-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shree Rangan updated AXIS2-2231:
--------------------------------

    Attachment: SecondService.java

> not able to call a service from another service
> -----------------------------------------------
>
>                 Key: AXIS2-2231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2231
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>         Environment: windows xp 
>            Reporter: Shree Rangan
>         Attachments: JaguarClient.java, JaguarService.java, SecondService.java
>
>
>         I have a POJO exposed as a Webservice using Axis2. I have tested this 
> service using RPCServiceClient and it works fine. This service needs to talk 
> to other services which are also POJO's exposed as Webservices using Axis2. 
> The other services also work fine when invoked by RPCServiceClient mechanism. 
> But if I invoke those services from my Axis2 service using the same mechanism 
> of RPCServiceClient mechanism, it gives me the following exception. 
> java.lang.reflect.InvocationTargetException
>       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 
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:118)
>       at 
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
>       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:493)
>       at 
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:319)
>       at 
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:247)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>       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)
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.axis2.context.MessageContext.isHeaderPresent(MessageContext.java:1054)
>       at 
> org.apache.axis2.handlers.addressing.AddressingInHandler.invoke(AddressingInHandler.java:72)
>       at org.apache.axis2.engine.Phase.invoke(Phase.java:381)
>       at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:518)
>       at org.apache.axis2.engine.AxisEngine.receiveFault(AxisEngine.java:596)
>       at 
> org.apache.axis2.description.RobustOutOnlyAxisOperation$RobustOperationClient.send(RobustOutOnlyAxisOperation.java:99)
>       at 
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295)
>       at 
> org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:453)
>       at 
> org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:380)
>       at 
> org.apache.axis2.rpc.client.RPCServiceClient.invokeRobust(RPCServiceClient.java:131)
>       at sample.pojo.service.JaguarService.meth2(Unknown Source)
>       ... 25 more
> here, i am calling meth2(the first service) from the client using 
> RPCServiceClient. 
> from meth2 i am calling meth3(the second service) using RPCServiceClient 
> again. 
> the services work fine independently, when invoked from within a client. 
> the exception is only when the second service is invoked from within another 
> service. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to