Hi David,
I don't really see where the problem is when you say "there is an
initial acknowledgment and then the response is delivered somewhere
else".
If you use asynchronous communication (i.e. WS-addressing and double
channel) the acknowledgment (i.e. HTTP 200) is *always* sent back to
the client *before* the server starts processing the request.
Then you can specify different endpoints for reply and fault by using
setReplyTo() and setFaultTo(), respectively.
However be careful that if the response is sent "somewhere else",
i.e., to a host different from the sender, you'll need to write a
handler in order to remove the relatesTo field (WS-addressing stuff).
HTH,
Michele
On 19 Nov 2008, at 22:11, David Ojeda wrote:
Hello,
I am trying to design a webservice that will respond asynchronously
and to a specific URL. I have read documentation on asynchronous
services [1] but I have not found a solution for the following
situation:
1. A client sends a soap request to the webservice
2. The webservice does some validation of the input (by actually
calling another webservice)
3. If the validation succeds, the webservice responds with an xml
that indicates that the operation is pending.
3.1 The webservice does some work that takes a while (>1min)
3.2 The webservice responds (succesfully or with a fault) to an URL
specified by the client
3.3 End
4. If the validation failed, the webservice responds with an xml
that indicates that there is a problem
So I think this situation is weird since there is an initial
acknowledge to the client (with data) and then the response is
delivered somewhere else.
I have managed to use the addressing module to specify the URL for
the final response
options.setReplyTo(new EndpointReference(
"http://10.21.17.196:8888/pruebaservlet/pepe"));
However, when I call the service, I do not how to send or receive
the acknowledge.
I monitored the http communication and the client sends correctly
the soap request and the service responds with a 200 OK code but no
content.
So this is my question: Is it possible to implement this scenario,
i.e. an ack that indicates if the operation will or will not be
performed, then the response is sent somewhere else.
Some other doubts: What would be the "ideal" way to handle this
response?
With a simple servlet? Or perhaps an in-only webservice whose in-
parameter is the output-parameter of the initial webservice.
(I hope I am making some sense with these questions)
Thank you
[1]
http://www.onjava.com/pub/a/onjava/2005/07/27/axis2.html?page=4
http://www.ibm.com/developerworks/webservices/library/ws-axis2/
http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-
using-apache-axis2.html
--
David Ojeda
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]