1 2 Previous Next 22 Replies Latest reply on Aug 8, 2007 2:15 PM by Andre Fernando Salvati

    One ESB Service to provide various methods like a webservice

    Claudio R Novice

      How can I do an ESB service to provide various methods like a webservice?
      Do I need create a ESB service to each method and to use Rules to router the messages (content's based)?
      Is there another easy way to do this?
      Thanks

        • 1. Re: One ESB Service to provide various methods like a webser
          Tom Fennelly Master

          Not totally sure what your question is, sorry. But try taking a look at the Webservice docs on the wiki, also check out the webservice_* quickstarts in the distro.

          • 2. Re: One ESB Service to provide various methods like a webser
            Claudio R Novice

            Hi tfennelly,

            I have a EJB with various method. I would like ESB client access the EJB's methods. How can I do this?
            Do I need to create a ESB service to each method and to use Rules to router the messages (content´s based)?
            Is there another easy way to do this?
            Thanks

            • 3. Re: One ESB Service to provide various methods like a webser
              Tom Fennelly Master

              Check out the webservice_producer and webservice_bpel quickstarts. The webservice_bpel quickstart demonstrates a solution to this exact problem, but there's a fair amount of setup involved - installing the ActiveBPEL BPEL engine etc.

              So, you could run the webservice_producer quickstart and then modify that with an eye on what's going on in the webservice_bpel quickstart.

              Basicaclly, what you need to do is build a JSR 181 implementation of your EJB remote interface and use that JSR 181 impl to map the SOAP calls directly onto your EJB based Service.

              • 4. Re: One ESB Service to provide various methods like a webser
                Tom Fennelly Master

                I forgot to mention that there are a few flash demos there that walk you through the webservice_bpel quickstart. They're slightly out of date (some of the components have been renamed), but the basic concepts are still the same. See: http://labs.jboss.com/jbossesb/resources/tutorials/bpel-demos/bpel-demos.html.

                • 5. Re: One ESB Service to provide various methods like a webser
                  Claudio R Novice

                  Hi tfennelly,

                  I have a problem with quickstart webservice_producer.
                  I have created this topic with the problem:

                  http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4066733#4066733

                  Thanks

                  • 6. Re: One ESB Service to provide various methods like a webser
                    Tom Fennelly Master

                    Yep, I posted a reply to that - you need to read the READMEs first. Thanks.

                    • 7. Re: One ESB Service to provide various methods like a webser
                      Burr Sutter Master

                       


                      How can I do an ESB service to provide various methods like a webservice?
                      Do I need create a ESB service to each method and to use Rules to router the messages (content's based)?
                      Is there another easy way to do this?


                      And ESB Service only has a single "operation" today, however, you can pack anything you like into the ESB message and have it contain what is needed to determine which method on your EJB or WS should be invoked

                      You would need to build your own custom action that reviews the contents of a special place in the Message (where ever you hide your "method" name) and calls the appropriate method on the EJB, POJO or whatever.

                      Burr

                      • 8. Re: One ESB Service to provide various methods like a webser
                        Barry Sheward Newbie

                        I was hung up on the same thing for a while.

                        I think it isn't immediately apparent from reading the documentation that JBoss ESB doesn't support more than one action per service, when web services do.

                        If JBoss ESB is to be used within the context of a larger SOA, it seems natural to think that the services defines within JBoss ESB could be invoked as web services, but counterintuitive to realize that they only support a single action.

                        I believe that once you realize that a JBoss ESB service is really just a provider definition and a set of actions (Java classes which don't even necessarily need to exist within the .esb file), it starts to make more sense.

                        Could this be better addressed in the documentation?

                        • 9. Re: One ESB Service to provide various methods like a webser
                          Burr Sutter Master

                          Thank you for the feedback. I guess if you come from a web services background then I can see how this would be confusing. Perhaps in a future release we can offer multiple operations per ESB Service which is more akin to a Web Service.

                          If you are actually using Web Services through the ESB (mediated by the ESB) then you do get multiple operations (aka methods). But a JMS, FTP or File based ESB service just doesn't have that capability today.

                          Could you propose a solution to the documentation? And have you seen my presentation materials which describe this stuff? Perhaps those better illustrate the concepts of an ESB Service to Actions to .esb archives etc.

                          Burr



                          • 10. Re: One ESB Service to provide various methods like a webser
                            Mark Little Master

                             

                            "bsheward" wrote:
                            I was hung up on the same thing for a while.

                            I think it isn't immediately apparent from reading the documentation that JBoss ESB doesn't support more than one action per service, when web services do.

                            If JBoss ESB is to be used within the context of a larger SOA, it seems natural to think that the services defines within JBoss ESB could be invoked as web services, but counterintuitive to realize that they only support a single action.


                            That's not true. You can have many actions in a single service. Plus, an action can do whatever you want it to. In a good SOA implementation, the intelligence is in the message and you should make sure your service interfaces are simple and do not expose backend implementation choices. What you should not do is expose an EJB directly, for example. That's not SOA.

                            What we have is a low-level approach at present: you define your messages and action implementation accordingly. Think of it like a low-level stub code (which it pretty much is). We'll work on tools to isolate you from the message to a degree, but if those tools start supporting the exposure of individual objects on to the bus (like java2wsdl does for Web Services), then we're breaking loose coupling and moving away from SOA.


                            I believe that once you realize that a JBoss ESB service is really just a provider definition and a set of actions (Java classes which don't even necessarily need to exist within the .esb file), it starts to make more sense.

                            Could this be better addressed in the documentation?


                            Yes, I think that's a good idea.

                            • 11. Re: One ESB Service to provide various methods like a webser
                              Barry Sheward Newbie

                               

                              "bsheward" wrote:
                              I was hung up on the same thing for a while.

                              I think it isn't immediately apparent from reading the documentation that JBoss ESB doesn't support more than one action per service, when web services do.

                              If JBoss ESB is to be used within the context of a larger SOA, it seems natural to think that the services defines within JBoss ESB could be invoked as web services, but counterintuitive to realize that they only support a single action.


                              ... That's not true. You can have many actions in a single service.


                              OK, "actions" was the wrong term, since actions is used within a service. Perhaps "endpoint" would be the right term:


                              I think it isn't immediately apparent from reading the documentation that JBoss ESB doesn't support more than one endpoint per service, when web services do.

                              If JBoss ESB is to be used within the context of a larger SOA, it seems natural to think that the services defines within JBoss ESB could be invoked as web services, but counterintuitive to realize that they only support a single endpoint.



                              • 12. Re: One ESB Service to provide various methods like a webser
                                Mark Little Master

                                Not sure what you mean by "a single endpoint" because services can be exposed through different EPRs. OK, so the action chaining is linear, but if you want more than that then embed jBPM/jpdl.

                                • 13. Re: One ESB Service to provide various methods like a webser
                                  Burr Sutter Master

                                  Yeah action and endpoint are both bad terms for this idea.

                                  Do you mean "operation" as defined in a WSDL? Which typically maps to a method on my Java class (at least when I start from a class and have the WSDL generated automatically).

                                  In any case, multi-operations on a WSDL should work. Check out the webservice_producer example and see if that is what you are looking for.

                                  • 14. Re: One ESB Service to provide various methods like a webser
                                    Andre Fernando Salvati Novice

                                     

                                    "mark.little@jboss.com" wrote:

                                    We'll work on tools to isolate you from the message to a degree, but if those tools start supporting the exposure of individual objects on to the bus (like java2wsdl does for Web Services), then we're breaking loose coupling and moving away from SOA.


                                    Hi Mark,

                                    imagine this architectecture:

                                    .Net client -> WS -> ESB -> Session Facades -> POJOS

                                    Do you mean it would be wrong if I was exposing on WS tier the same Pojos (generated by java2wsdl) that I use on my Session Facades!?

                                    Thanks.


                                    1 2 Previous Next