3 Replies Latest reply on Nov 22, 2007 3:53 AM by Alessio Soldano

    Is this possible to do somehow?

    i o Newbie

      Ok, it's a stupid question and maybe the wrong section:

      suppose i have a pojo or a session bean exposed as web service.

      suppose i have a int foo(int bar) method in it.

      is it tecnically possible to leave some other class answer the web service invocation to foo()?

      that is someone call foo. foo is in fact a void method which call session bean test, which will reply the web service invocation sending back to the invoker the int return value.

      (yes, why dont just wait the end of test invocation, and answer from foo method? but this is an example case, because i actually would need to answer the web service invocation from a message driven bean)

        • 1. Re: Is this possible to do somehow?
          Alessio Soldano Master

          Why do you need a message bean to process your message? If you need a way to invoke your webservice in an asynchronous way, take a look at this http://jbws.dyndns.org/mediawiki/index.php?title=User_Guide#Asynchronous_Invocations and at the org.jboss.test.ws.jaxws.samples.asynchronous test cases you can find in the binaries.
          If you don't want to perform an asynch invocation but you need to use the message driven bean on the server side for other application specific reasons, consider synchronizing your foo method somehow with the MDB. For example you could wait for responses on a temporary queue created by foo. When test mdb finishes processing the message, it replies on that queue it found the reference of in the request message from foo. Of course this is a pattern not directly related to the WS...

          • 2. Re: Is this possible to do somehow?
            i o Newbie

            Yes, i was thinking about synchronizing the exposed service with the mdb, but not with messages, since my exposed slsb should wait for someone else to end some job, and then return.

            what i was wondering is: is it possible to expose-for example- a
            "public String foo()" , but then the body of the method dont return anything, and, better, dont send back any soap response.

            Instead, some other component in the system should send it back to the invoker (so it is needed also a kind of address to answer back)

            maybe it's just impossible.. :)

            • 3. Re: Is this possible to do somehow?
              Alessio Soldano Master

               

              "paoletto" wrote:
              what i was wondering is: is it possible to expose-for example- a
              "public String foo()" , but then the body of the method dont return anything, and, better, dont send back any soap response.

              This is not possible.
              You need to evaluate different communication patterns (asynch, ws-eventing, etc)