1 2 Previous Next 16 Replies Latest reply on Feb 17, 2007 12:43 PM by Gavin King

    Web services and Seam

    Andris Birkmanis Newbie

      We are evaluating Seam for use in several projects, and have come up with several questions.

      One of them is the intended affinity of Seam and web services.
      Currently, Seam runs in JSF-driven configuration ou of the box; how easy would it be to configure it to expose web services instead of JSF UI? Is it going to require a major rewrite? Is it in the plan or it never will get into the plan?

      As an additional question (if Seam is going to support web services in some way) - are there any plans to bind Seam conversations to "conversational" services (in the sense of http://www.w3.org/TR/wscl10/)?

      Or is functionality like that supposed to be added by third parties? What is the SPI in this case? Which parts of Seam are supposed to be extended, and what form its "hidden implementation"?

      Thanks,

      Andris Birkmanis

        • 1. Re: Web services and Seam
          Gavin King Master

          Seam/WS is not really going to be ready until Seam 1.1 or 1.2 (Q3?). I need JBoss EJB3 to support JAX-WS before I can even start working on this stuff.

          Yes, the plan is that Seam/WS will support conversations and orchestration via either BPL or jPDL.

          This is basically very easy to do. All I need to do is parse out the conversation id using a JAX-WS message handler and set up the Seam contexts.

          You could easily implement that yourself, assuming that you have some way to expose an EJB as a web service endpoint, given that JBoss EJB3 does not yet support JAX-WS.

          • 2. Re: Web services and Seam
            Andris Birkmanis Newbie

            My impression is that current Lifecycle, Manager, and Component are too intimately coupled to JSF to easily use Seam in a "headless" (without JSF) mode. Should we mimic test cases and use mock objects to run Seam under web services?

            • 3. Re: Web services and Seam
              Gavin King Master

              Not really true, since Seam already supports invocation via Seam Remoting or a plain servlet with a servlet filter :-)

              • 4. Re: Web services and Seam
                Andris Birkmanis Newbie

                But if I understand that correctly, this would introduce an additional layer of marshalling - first my web service clients go to a SOAP/SeamRemoting bridge, then it talks to Seam components. What I really need is an ability to execute Seam-controlled components from a local Java code, POJO-client in a way.

                • 5. Re: Web services and Seam
                  Gavin King Master

                  Sure, all i am saying is that Lifecycle, Manager, and Component are not coupled to JSF.

                  I am not saying this relieves us of the need to build a SOA layer for Seam. This will happen for Seam 1.1, most likely.

                  • 6. Re: Web services and Seam
                    Andris Birkmanis Newbie

                    I stand corrected - Seam does not require JSF.
                    But all the operation modes I've seen - JSF, servlet, remoting - assume that the client is HTTP-based.
                    Is this statement more correct? Will the next version (probably in addition to SOA layer, and the already existing client technology adapters) expose Seam functionality as plain old Java object to allow custom client technology?

                    • 7. Re: Web services and Seam
                      Gavin King Master

                      Not really correct.

                      For example, if I call a Seam component via RMI, Seam can set up an event context and application contect for me. It just cant do a session or conversation context because RMI can't propagate conversation or session ids.

                      • 8. Re: Web services and Seam
                        Andris Birkmanis Newbie

                         

                        "gavin.king@jboss.com" wrote:
                        Not really correct.

                        For example, if I call a Seam component via RMI, Seam can set up an event context and application contect for me. It just cant do a session or conversation context because RMI can't propagate conversation or session ids.

                        I am specifically trying to understand, what it takes to "propagate conversation or session ids". Imagine using Seam from a calender-driven scheduler (no UI, no HTTP, no ExternalContext, everything is the same JVM). Do I create a custom implementation of Context? Or do I use ServerConversationContext with a custom implementation of Session?

                        • 9. Re: Web services and Seam
                          Gavin King Master

                          A custom implementation of org.jboss.seam.contexts.Session, probably.

                          This is not the hard problem, though.

                          The hard problem is propagation of session ids and conversation ids. threadlocal?

                          • 10. Re: Web services and Seam
                            avi bh Newbie

                            i know this is an old thread...
                            does seam 1.1.6 support web services?

                            • 11. Re: Web services and Seam
                              Norman Richards Master

                              You can do web services, but there is no special support for WS in 1.1.6.

                              • 12. Re: Web services and Seam
                                Gavin King Master

                                According to the road map, Seam 1.1.7 is the last release of the 1.1 series. It will go out as soon as Michael, Ales and Norman are finished on the Spring integration work. Actually it is quite possible that there will end up being a maintenance release numbered 1.1.8 in March, but it will probably not contain new features.

                                So, subsequent to that, the very first thing we will work on is WS and ESB integration. We now know what that stuff is going to look like (well, at least I do), so it is just a matter of actually implementing it, and it will go out initially as Seam 1.2 beta. I have promised you guys Seam/WS in Q1, so the current release date for that is March 30 ;-)

                                Let's see if we can make it ;-)

                                • 13. Re: Web services and Seam
                                  Saeed Iqbal Novice

                                  all the best team!

                                  All I would ask is keeping the document (reference manual + api) updated with new features. since I'm just learning Seam and developing a personal project in it for now. Forums are very nice help as well.

                                  • 14. Re: Web services and Seam
                                    avi bh Newbie

                                    thanks for the quick response guys
                                    since i can wait till next Q i'd like to know if theres a way to simulate the injection of objects into the web service class using seam (or maybe extend seam components).
                                    also if there's any configuration related to it, i'd love to know :-)

                                    1 2 Previous Next