Hong,

If your task takes a long time to complete then using a jax-ws synchronous or 
asynchronous API call might not help you. I assume that you're using an HTTP 
binding so at some point you're going to run up against a timeout at the 
protocol level. Matthieu's comments about correlation are about converting the 
WSDL operation from a request-response style to a pairing of two one-way 
operations. This is why you'd need to have a callback and use correlation with 
your BPEL. The BPEL process invokes the service and when the service completes 
(seconds, minutes, hours, or days later) the service invokes the BPEL process 
to tell it that it's done. In BPEL you'd need an invoke followed by some type 
of receive activity. The concept of a jax-ws synchronous or asynchronous call 
doesn't apply here. The jax-ws API has helpers that make it easy to issue a 
service call synchronously or asynchronously but this just to simplify the 
client side interaction with the service call and has nothing to do with the 
underlying bindings. In other words, the API deals with which Thread will 
execute the call, not whether the actual underlying call is a one-way or 
request-response call.


On 5/14/09 3:54 PM, "[email protected]" <[email protected]> 
wrote:

Matthieu,

Thank you for the information about correlation.  However, we are
currently trying to figure out how the BPEL interacts with jax-ws web
service asynchronously, and how to make it happen.  Due to the nature of
our project, we have to have BPEL call jax-ws web service
asynchronously, would you help us on that issue?

Thank you so much,

Hong

-----Original Message-----
From: Matthieu Riou [mailto:[email protected]]
Sent: Thursday, May 14, 2009 1:36 PM
To: [email protected]
Cc: Martens, Samuel (Healthcare USA)
Subject: Re: bpel asynchronously call jax-ws web service

On Wed, May 13, 2009 at 12:43 PM, <[email protected]> wrote:

> Howdy,
>
> We were able to synchronously invoke a jax-ws web service from BPEL,
it
> was fine.  Now since our task takes long time, we need to invoke the
> task (web service) asynchronously.  We are using apache ode BPEL, and
> our web service uses sun's reference jax-ws implementation and runs on
> Tomcat.  We did google search, and did find information on what to do
on
> the BPEL side, but so far we were not able to find information on what
> should happen on the jax-ws web service side, and how it works.  Has
> anybody done something like that before?  I need something concrete,
> like the sample code or information on how it works.
>

If you want your jax-ws service to call back you'll either need
correlation
(google search for resources) or reusing the endpoint that ODE passes
using
our stateful exchange protocol [1] (which is kind of a special case of
correlation). I would read about either.

Matthieu

[1] http://ode.apache.org/implicit-correlations.html


> Thank you in advance,
>
> Hong
>
>


Reply via email to