You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Maciej Pietrzak <mp...@gmail.com> on 2007/05/06 20:38:44 UTC

Async Process with Callbacks and WSA

Hello,

I'm having trouble writing a simple asynchronous process with dynamic callbacks.

What I'm trying to accomplish is to write a process, that will report
back status to it's caller. I'd like to initiate process with one way
message with WS-Addressing headers and then, after a while, to receive
response at address specified dynamically in WS-Addressing headers in
first message. I'd like to specify response address in wsa:ReplyTo
element.

How do I accomplish that?

Do I have manually create partner link and EPR in business process?
I'd be more satisfied if I didn't have to even mention WSA or services
or ports or other technical details in process itself. Is there a way
to have process that does only:

 - receive from initiator,
 - perform some (supposedly long running) business logic unrelated to
communication with initiator,
 - invoke to initiator - but to the address specified in original
message (for example address of specific instance of clustered
application that made the first call)?


I've poked around in Java source and found WSA classes.
I've also created process that sends callback response to partner link
statically linked to endpoint defined in WSDL.
There's some code related to dynamic callback EPR's in
SessionInHandler.java, but it only checks for
{http://www.intalio.com/type/session}:session.


Any help would be really appreciated.


Best Regards,
Maciej

Re: Async Process with Callbacks and WSA

Posted by Alex Boisvert <bo...@intalio.com>.
As complement, you can also take at look at the MagicSession example:
http://svn.apache.org/repos/asf/incubator/ode/trunk/distro-axis2/src/examples/MagicSession/

You'll see the Receiver process is able to call back the Main process using
the EPR passed in the headers, and if you run it with the "httpclient"
logging category set to DEBUG you should get a good feel for the header
forms.

alex


On 5/7/07, Alex Boisvert <bo...@intalio.com> wrote:
>
> Hi Maciej,
>
> Take a look at the stateful exchange protocol spec:
> http://incubator.apache.org/ode/stateful-exchange-protocol.html
>
> At the protocol level, you need to pass the state:callback header element
> (containing an EPR) in your first message.  The wsa:EndpointReference
> element will be automatically copied into the partnerLink and reused in
> future invocations to this partner.
>
> regards,
> alex
>
>
> On 5/6/07, Maciej Pietrzak <mp...@gmail.com> wrote:
> >
> > Hello,
> >
> > I'm having trouble writing a simple asynchronous process with dynamic
> > callbacks.
> >
> > What I'm trying to accomplish is to write a process, that will report
> > back status to it's caller. I'd like to initiate process with one way
> > message with WS-Addressing headers and then, after a while, to receive
> > response at address specified dynamically in WS-Addressing headers in
> > first message. I'd like to specify response address in wsa:ReplyTo
> > element.
> >
> > How do I accomplish that?
> >
> > Do I have manually create partner link and EPR in business process?
> > I'd be more satisfied if I didn't have to even mention WSA or services
> > or ports or other technical details in process itself. Is there a way
> > to have process that does only:
> >
> > - receive from initiator,
> > - perform some (supposedly long running) business logic unrelated to
> > communication with initiator,
> > - invoke to initiator - but to the address specified in original
> > message (for example address of specific instance of clustered
> > application that made the first call)?
> >
> >
> > I've poked around in Java source and found WSA classes.
> > I've also created process that sends callback response to partner link
> > statically linked to endpoint defined in WSDL.
> > There's some code related to dynamic callback EPR's in
> > SessionInHandler.java, but it only checks for
> > { http://www.intalio.com/type/session}:session<http://www.intalio.com/type/session%7D:session>
> > .
> >
> >
> > Any help would be really appreciated.
> >
> >
> > Best Regards,
> > Maciej
> >
>
>

Re: Async Process with Callbacks and WSA

Posted by Alex Boisvert <bo...@intalio.com>.
Hi Maciej,

Take a look at the stateful exchange protocol spec:
http://incubator.apache.org/ode/stateful-exchange-protocol.html

At the protocol level, you need to pass the state:callback header element
(containing an EPR) in your first message.  The wsa:EndpointReference
element will be automatically copied into the partnerLink and reused in
future invocations to this partner.

regards,
alex


On 5/6/07, Maciej Pietrzak <mp...@gmail.com> wrote:
>
> Hello,
>
> I'm having trouble writing a simple asynchronous process with dynamic
> callbacks.
>
> What I'm trying to accomplish is to write a process, that will report
> back status to it's caller. I'd like to initiate process with one way
> message with WS-Addressing headers and then, after a while, to receive
> response at address specified dynamically in WS-Addressing headers in
> first message. I'd like to specify response address in wsa:ReplyTo
> element.
>
> How do I accomplish that?
>
> Do I have manually create partner link and EPR in business process?
> I'd be more satisfied if I didn't have to even mention WSA or services
> or ports or other technical details in process itself. Is there a way
> to have process that does only:
>
> - receive from initiator,
> - perform some (supposedly long running) business logic unrelated to
> communication with initiator,
> - invoke to initiator - but to the address specified in original
> message (for example address of specific instance of clustered
> application that made the first call)?
>
>
> I've poked around in Java source and found WSA classes.
> I've also created process that sends callback response to partner link
> statically linked to endpoint defined in WSDL.
> There's some code related to dynamic callback EPR's in
> SessionInHandler.java, but it only checks for
> {http://www.intalio.com/type/session}:session.
>
>
> Any help would be really appreciated.
>
>
> Best Regards,
> Maciej
>