1 2 3 Previous Next 35 Replies Latest reply on Apr 14, 2014 11:34 AM by Gary Brown

    SwitchYard BPEL to Bean Service routing question

    adamdva Newbie

      Hello,

       

      I'm creating an advanced BPEL Process to orchestrate flows between several SOAP-based web services.

      I want to create Bean based components that performs some functionality. I've created a simple bean component and generated the WSDL associated with it, then promoted the service to a SOAP Web Service, which I can test via SoupUI. I've also created the transformer to handle the interaction.

       

      My problem arises when I try to add a reference to the BPEL component that uses that reference to the interal Bean component but utilizes the SOAP interface.

      When I try to test the BPEL service, if I invoke the Bean-based partner link, it just hangs, and after the JBoss call timeout, throws a timeout exception for the BPEL service.  I can't tell where it's failing and why the connection is not being made.

      Can anyone provide any suggestions?

      Thanks,

      Adam

        • 1. Re: SwitchYard BPEL to Bean Service routing question
          Gary Brown Master

          Hi Adam

           

          If the bean based service is presenting a WSDL interface, then in theory it should be no different than the loan_approval example included with the bpel quickstarts, with the only exception that the invoked service in that case is also BPEL.

           

          Would it be possible to provide a simplified testcase to demonstrate the issue? If so, can you create a jira and attach the testcase.

           

          Regards

          Gary

          • 2. Re: SwitchYard BPEL to Bean Service routing question
            Keith Babo Master

            Agree with Gary's post.  If you could attach an example - either your application or modifying one of the existing bpel quickstarts to approximate your use case.

             

            BTW, if the bean services in question are in the same application, you can invoke them locally without going out of process over SOAP.

             

            cheers,

            keith

            • 3. Re: SwitchYard BPEL to Bean Service routing question
              adamdva Newbie

              Guys,

              Thanks for your attention.

              I choose to extend the Loan Approval QuickStart BPEL Project with my simple Logging Bean Service for testing and so I could provide it for you.

              When I recreated my configuration in the Loan Approval Project, I was able to see the inter-component message being sent (instead of just having the process hang), however, the SOAP to Java transformer is recieving NULL for the from Element.

              I've created a JIRA Ticket, as suggested, and uploaded my sample project:

              https://issues.jboss.org/browse/SWITCHYARD-1256

               

              Any help you can provide would be appreciated. I still haven't figured out why my original project is hanging, but I've had other issues with the Eclipse tooling.

              thanks,

              Adam

              • 4. Re: SwitchYard BPEL to Bean Service routing question
                Rob Cernich Master

                Hey Adam,

                 

                Could you please elaborate on the problems you are having with the tools, so we can address the issues?

                 

                Thanks in advance,

                Rob

                • 5. Re: SwitchYard BPEL to Bean Service routing question
                  adamdva Newbie

                  Rob,

                  A couple things:

                  1) The switchyard.xml configuration editor does not contain the BPEL Implementation.

                  2) The ODE Deployment Descriptor Editor fails when the usePeer2Peer="false" attribute is in the invoke tag.

                   

                  I'll try to keep a list of things I think may be bugs and keep you posted.

                  thanks again,

                  Adam

                  • 6. Re: SwitchYard BPEL to Bean Service routing question
                    Rob Cernich Master

                    Hey Adam,

                     

                    Support for BPEL implementation types is next on my list of things to do for the tools.

                     

                    I'm not sure about the ODE DD editor.  How is that used in the context of SwitchYard?

                     

                    Best,

                    Rob

                    • 7. Re: SwitchYard BPEL to Bean Service routing question
                      adamdva Newbie

                      Rob,

                       

                      I'm new to this, but it appears to me that the deploy.xml (ODE DD) configuration file is required when utilizing BPEL Components. So it's not directly related to the switchyard.xml, though it seams like I have to configure these associations in two different XML configurations.

                       

                      Another error I just encountered: When trying to open the switchyard.xml from the quickstarts/demos/policy-security-saml project in the editor, I'm getting the following;

                      Error loading file: switchyard.xml.  Feature 'security' not found. (platform:/resource/switchyard-quickstart-demo-policy-security-saml/src/main/resources/META-INF/switchyard.xml, 18, 142)

                      Feature 'security' not found. (platform:/resource/switchyard-quickstart-demo-policy-security-saml/src/main/resources/META-INF/switchyard.xml, 18, 142)

                       

                      thanks again,

                      Adam

                      • 8. Re: SwitchYard BPEL to Bean Service routing question
                        Gary Brown Master

                        Hi Adam

                         

                        Just to jump in, the deploy.xml is required by the Apache ODE BPEL engine that we use within the BPEL component for switchyard. However I agree that there is a lot of overlap.

                         

                        If you could create a feature request, then we can explore some possibilities in a future release.

                         

                        Regards

                        Gary

                        • 9. Re: SwitchYard BPEL to Bean Service routing question
                          adamdva Newbie

                          Hello,

                          I have the internal Bean Service (LoggingService) receiving the message successfully through the transformer, and seeming OK through the out-bound transformer, but then an error is thrown.

                           

                          I've attached my WSDL and the Transformer class, but I keep getting the follwoing error:

                          17:20:07,503 ERROR [org.apache.ode.jacob.vpu.JacobVPU] (ODEServer-1) Method "run

                          " in class "org.apache.ode.bpel.runtime.INVOKE" threw an unexpected exception.:

                          org.apache.ode.bpel.iapi.ContextException: Failed to invoke external service

                                  at org.riftsaw.engine.internal.MessageExchangeContextImpl.invokePartnerU

                          nreliable(MessageExchangeContextImpl.java:139) [engine-3.0.0.20121217-M4.jar:3.0

                          .0.20121217-M4]

                                  at org.riftsaw.engine.internal.MessageExchangeContextImpl.invokePartner(

                          MessageExchangeContextImpl.java:183) [engine-3.0.0.20121217-M4.jar:3.0.0.2012121

                          7-M4]

                                  at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.invoke(BpelRuntimeC

                          ontextImpl.java:951) [riftsaw-bpel-runtime-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.bpel.runtime.INVOKE.run(INVOKE.java:101) [riftsaw-bpel

                          -runtime-3.0.0.20121217-M4.jar:]

                                  at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source) [:1.6.0_

                          38]

                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

                          sorImpl.java:25) [rt.jar:1.6.0_38]

                                  at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_38]

                                  at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:4

                          51) [riftsaw-jacob-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139) [riftsaw

                          -jacob-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntime

                          ContextImpl.java:1089) [riftsaw-bpel-runtime-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.j

                          ava:487) [riftsaw-bpel-runtime-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineIm

                          pl.java:478) [riftsaw-bpel-runtime-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineIm

                          pl.java:417) [riftsaw-bpel-runtime-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerIm

                          pl.java:455) [riftsaw-bpel-runtime-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable$1.call

                          (SimpleScheduler.java:576) [riftsaw-scheduler-simple-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable$1.call

                          (SimpleScheduler.java:566) [riftsaw-scheduler-simple-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(Simpl

                          eScheduler.java:294) [riftsaw-scheduler-simple-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(Simpl

                          eScheduler.java:251) [riftsaw-scheduler-simple-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.proces

                          sInTransactionContext(SimpleScheduler.java:566) [riftsaw-scheduler-simple-3.0.0.

                          20121217-M4.jar:]

                                  at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.call(S

                          impleScheduler.java:546) [riftsaw-scheduler-simple-3.0.0.20121217-M4.jar:]

                                  at org.apache.ode.scheduler.simple.SimpleScheduler$RunJobCallable.call(S

                          impleScheduler.java:533) [riftsaw-scheduler-simple-3.0.0.20121217-M4.jar:]

                                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [r

                          t.jar:1.6.0_38]

                                  at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.

                          0_38]

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec

                          utor.java:886) [rt.jar:1.6.0_38]

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

                          .java:908) [rt.jar:1.6.0_38]

                                  at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]

                          Caused by: java.lang.NullPointerException

                                  at org.switchyard.component.bpel.riftsaw.WSDLHelper.wrapResponseMessageP

                          art(WSDLHelper.java:185) [switchyard-component-bpel-0.7.0.Final.jar:0.7.0.Final]

                           

                           

                                  at org.switchyard.component.bpel.riftsaw.RiftsawServiceLocator$ServicePr

                          oxy.invoke(RiftsawServiceLocator.java:335) [switchyard-component-bpel-0.7.0.Fina

                          l.jar:0.7.0.Final]

                                  at org.riftsaw.engine.internal.MessageExchangeContextImpl.invokePartnerU

                          nreliable(MessageExchangeContextImpl.java:96) [engine-3.0.0.20121217-M4.jar:3.0.

                          0.20121217-M4]

                                  ... 25 more

                           

                           

                          I can't see why the response is causing the NPE.

                          Any help you can get would be appreciated.

                          thanks again,

                          Adam

                          • 10. Re: SwitchYard BPEL to Bean Service routing question
                            Gary Brown Master

                            Hi Adam

                             

                            Could you create a simple stripped down version of your app and add it to a jira, then we can investigate further? If you could post the jira reference here - thanks.

                             

                            Regards

                            Gary

                            • 11. Re: SwitchYard BPEL to Bean Service routing question
                              adamdva Newbie

                              Thanks for the response,

                              I've created https://issues.jboss.org/browse/SWITCHYARD-1298 and attach a sample project and the error stack trace.

                               

                              I have to admit that I'm getting increasing frustrated trying to use SwitchYard.

                               

                              thanks again,

                              Adam

                              • 12. Re: SwitchYard BPEL to Bean Service routing question
                                Keith Babo Master

                                Before I jump in with a reply on the application itself, I want to mention that message tracing can really help pinpoint the point at which things are going bad in a composition.  This can be enabled through the domain tab in our editor or by adding a domain handler to your switchyard.xml.  Here's an example:

                                 

                                https://github.com/jboss-switchyard/quickstarts/blob/master/camel-soap-proxy/src/main/resources/META-INF/switchyard.xml

                                 

                                OK, now digging into the details of your app.

                                • 13. Re: SwitchYard BPEL to Bean Service routing question
                                  Keith Babo Master

                                  OK, I downloaded the app in the JIRA and I see you're already using message trace, so that's good.  The other thing I noticed is that the BPEL process which was attached had an invoke of a "loanService" which is not declared as a component reference in switchyard.xml.  I assumed this was a leftover from the original example, so I simply commented it out in the BPEL process.  After that, I tried again and everything worked.  I have attached my request message (generated from soapUI) and the console output of the server including message trace.  I can see the log message being generated.  So not sure what I'm doing wrong (or right in in this case)?


                                  BTW, I'm invoking the executeSearch operation on ADRSearchServices.  If I should invoke another operation or use a different payload, please let me know.

                                   

                                  ~ keith

                                  • 14. Re: SwitchYard BPEL to Bean Service routing question
                                    Keith Babo Master

                                    Correction - I attached the reply message, not the request message.  The request message is attached here (again, default generated by soapUI):

                                    1 2 3 Previous Next