3 Replies Latest reply on Jun 19, 2012 6:01 AM by objectiser

    Error invoking a BPEL process which calls a web service

    paperrhino

      I have been fighting this error for days now and I cannot find any clues.

       

      I'm using switchyard-as7-0.4.

       

      I started by creating a simple BPEL process which just returns the string that is passed to it. It is basically a clone of the SayHello quickstart. I then went through the process of adding an existing web service as a partner to invoke. The existing web service is hosted in the same running instance of switchyard and it can be successfully called by my test client. The BPEL process deployes with no errors. However, now when I call the process from a test client I get the following error:

       

      16:25:03,948 INFO  [org.apache.ode.utils.WatchDog] (pool-12-thread-14) [Endpoint files for {DeploymentUnit ingestFiles_IngestFiles-0}] updated
      16:25:03,948 ERROR [org.switchyard.component.bpel.riftsaw.RiftsawServiceLocator] (pool-12-thread-14) No service references found for process '{http://ecoe.company.com/high/files}IngestFiles-0'
      16:25:03,964 ERROR [org.apache.ode.bpel.engine.BpelRuntimeContextImpl] (pool-12-thread-14) Partner did not acknowledge message exchange: {PartnerRoleMex#hqejbhcnphr7d7ccvjf9qt [PID {http://ecoe.company.com/high/files}IngestFiles-0] calling null.ingestFile(...) Status REQUEST}
      16:25:03,964 ERROR [org.apache.ode.bpel.runtime.INVOKE] (pool-12-thread-14) Failure during invoke: Partner did not acknowledge.
      16:25:03,964 INFO  [org.apache.ode.bpel.engine.BpelRuntimeContextImpl] (pool-12-thread-14) ActivityRecovery: Registering activity 11, failure reason: Partner did not acknowledge. on channel 21
      16:25:04,011 ERROR [org.riftsaw.engine.internal.BPELEngineImpl] (pool-12-thread-14) Error processing response for MEX {MyRoleMex#hqejbhcnphr7d7ccvjf9qr [Client hqejbhcnphr7d7ccvjf9qq] calling {http://ecoe.company.com/high/files}IngestFilessService.process(...)}: java.lang.NullPointerException
              at org.riftsaw.engine.internal.BPELEngineImpl.onResponse(BPELEngineImpl.java:880) [engine-3.0.0.20120316-M2.jar:]
              at org.riftsaw.engine.internal.BPELEngineImpl.invoke(BPELEngineImpl.java:797) [engine-3.0.0.20120316-M2.jar:]
              at org.switchyard.component.bpel.riftsaw.RiftsawBPELExchangeHandler.handleMessage(RiftsawBPELExchangeHandler.java:236) [switchyard-component-bpel-0.4.0.Final.jar:0.4.0.Final]
              at org.switchyard.internal.DefaultHandlerChain.handleMessage(DefaultHandlerChain.java:148) [switchyard-runtime-0.4.0.Final.jar:0.4.0.Final]
              at org.switchyard.internal.DefaultHandlerChain.handle(DefaultHandlerChain.java:121) [switchyard-runtime-0.4.0.Final.jar:0.4.0.Final]
              at org.switchyard.internal.LocalDispatcher.dispatch(LocalExchangeBus.java:72) [switchyard-runtime-0.4.0.Final.jar:0.4.0.Final]
              at org.switchyard.internal.ExchangeImpl.sendInternal(ExchangeImpl.java:267) [switchyard-runtime-0.4.0.Final.jar:0.4.0.Final]
              at org.switchyard.internal.ExchangeImpl.send(ExchangeImpl.java:184) [switchyard-runtime-0.4.0.Final.jar:0.4.0.Final]
              at org.switchyard.component.soap.InboundHandler.invoke(InboundHandler.java:218) [switchyard-component-soap-0.4.0.Final.jar:0.4.0.Final]
              at org.switchyard.component.soap.BaseWebService.invoke(BaseWebService.java:69) [switchyard-component-soap-0.4.0.Final.jar:0.4.0.Final]
              at org.switchyard.component.soap.BaseWebService.invoke(BaseWebService.java:34) [switchyard-component-soap-0.4.0.Final.jar:0.4.0.Final]
              at sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source) [:1.6.0_31]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_31]
              at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_31]
              at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
              at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
              at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:61)
              at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_31]
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_31]
              at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_31]
              at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
              at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
              at org.apache.cxf.transport.http_jaxws_spi.JAXWSHttpSpiDestination.serviceRequest(JAXWSHttpSpiDestination.java:145)
              at org.apache.cxf.transport.http_jaxws_spi.JAXWSHttpSpiDestination.doService(JAXWSHttpSpiDestination.java:121)
              at org.apache.cxf.transport.http_jaxws_spi.HttpHandlerImpl.handle(HttpHandlerImpl.java:61)
              at org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerDestination$Handler.handle(HttpServerDestination.java:154) [jbossws-cxf-transports-httpserver-4.0.2.GA.jar:4.0.2.GA]
              at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)
              at org.jboss.sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:80)
              at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81)
              at org.jboss.sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:710)
              at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)
              at org.jboss.sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:682)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]
              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]

      16:25:04,042 ERROR [org.switchyard.internal.DefaultHandlerChain] (pool-12-thread-14) org.switchyard.HandlerException was thrown by handler(provider): java.lang.Exception: An exception occured when invoking ODE. --- Caused by java.lang.Exception: An exception occured when invoking ODE. --- Caused by java.lang.NullPointerException: null

       

      The web service it is complaining about "{http://ecoe.company.com/high/files}IngestFiles-0" is the web service interface to the BPEL process itself, not the web service I'm trying to call from the BPEL process. When I look at the deployments in the bpel-console it is listed just as it appears in the log. When I don't have the invoke to the external web service the call to the process succeeds. When I make a call directly to the external web service using the same URL as is defined in the WSDL that the BPEL process imports the call succeeds.

       

      I have verified that the service port and addresses in both WSDLs are correct. The only thing that I can think of is that the BPEL process web service is on port 18001 and the external WS is on port 8080, but that shouldn't be a problem as the port and URL are correct in the external web service's WSDL. I don't think I can even deploy them on the same port on the same server.

       

      I've looked at the source for RiftsawServiceLocator and it looks like it is indeed failing on the lookup for the BPEL web service, not on the external web service, but I suppose I could be interpeting it incorrectly.

       

      Any advice is greatly appreciated. I can provide files on request if you think it will help.

       

      Thanks

        • 1. Re: Error invoking a BPEL process which calls a web service
          jeff.yuchang

          Hi Richard,

           

          Not sure if your situation is as same as the https://issues.jboss.org/browse/RIFTSAW-476 issue described?

           

          If not, please create a new jira and then attach your examples, so that we can look into it.

           

          Thanks

          Jeff

          • 2. Re: Error invoking a BPEL process which calls a web service
            paperrhino

            I'm not 100% sure whether or not it is the same problem.

             

            I have two WSDL files, one for the BPEL process and one for the partner web service. The port type and service for each are defined in their respective files. Is the problem described at that link that I need to combine my partner's WSDL with the BPEL process's WSDL or is it an issu where the WSDL for a single service is defined in two separate files?

             

            My WSDLs seem to parallel those of the working examples uploaded by Gary Brown in that issue.

             

            I've written a simple example which I'll add to a new Jira.

             

            Thanks

            Richard

            • 3. Re: Error invoking a BPEL process which calls a web service
              objectiser

              Hi Richard

               

              I've closed the jira (https://issues.jboss.org/browse/RIFTSAW-499) for now, as the switchyard.xml descriptor does not include the reference to the called service. If you have a look at some of the other quickstarts, to see how references are defined, and if it still does not work after that then reopen the issue with the updated testcase.

               

              Would suggest looking at the quickstart/demos/multiApp/order-consumer for an example of how to define a reference to an external web service. The loan-approval bpel quickstart also defines a reference, but this is to another service defined within the same switchyard app.

               

              Regards

              Gary