Hello CXF users,

I would like to ask for some advise on how to handle a
robust asynchronous message exchange using WS-Addressing and CXF.

So system A sends a message to system B for processing, and if B
accepts the message, system A will receive some later callback from B
conveying some information on how processing of the message worked out.

It should be possible for B to check on correctness of the message and
B should be able to setup whatever is needed for later (e.g. commit
some data to a database, put something into some queue) before it
confirms submission of message.

For non-technical reasons I would like to use WS-Addressing to communicate
the callback address.

I tried two approaches:

a) A One-Way service.

In that case, I noticed, CXF already returns an HTTP 202 (Accepted) reply
before the application has any chance to get its hands on the message.
I found no (harmless) way to have CXF wait for the application to check
and really "accept" the message.

I would really like to be able to validate the incoming message and safely
put it in a processing queue before replying with a 202 response.

Is that possible?


b) A Two-Way service with (empty) response message (even if no content)

In that case, using WS-Addressing CXF sends an empty SOAP response to the
replyTo address on its own with a new request after the method call
completed.

I would really like to be able to synchronously reply with a simple
message indicating whether submission was successful and if so, send
a more detailed processing message to the replyTo callback when processing
is done.

Is that possible?


So, in essence, I would like to use WS-Addressing to specify a callback
address and return some simple response synchronously for the incoming
call while using the callback address for a more detailed callback
later.

Would one of the two approaches above work or should I follow some
other direction.

Thanks,
Henning

Reply via email to