Hi!
To add some minor things to the excellent replies above:
Note that there are two kinds of asynchronicity in connection to web service invocations:
1. Asynchronous client invocation.
The web service is still synchronous, but the operation in the generated stubs in asynchronous and the client will receive a Future object that it can use to retrieve the result of the operation from.
This is accomplished by enabling an option when generating the client artifacts using wsimport.
Thus, this option does not require a special endpoint implementation - you can reuse the regular, synchronous one.
2. Asynchronous web service.
The web service itself is asynchronous. Typically this means that, when receiving a request, it transfers the request to a queue and ends the processing of the request. A special thread or process later processes the request.
There are two ways for the client to obtain a result from such an operation:
- Polling.
A special operation exists in the web service that, given a correlation identifier returned as a result from the original request, returns a result if it is available.
- Callback.
The client provides a service with at least one operation. This operation is used by the original web service to report the result of the asynchronous operation. Compare with the Observer design pattern.
This option require a special endpoint implementation. Perhaps even substantial work on the client side if you choose to use callbacks.
The asynchronous web service alternative may be what they mean by long running. However, my advice is not to trust our speculations here, but to ask your customer directly - they are the ones that know best. At least, if they themselves have told you to do something and later realize it is not what they wanted, it will be easier to bill hours for the time spent on doing what they did not want.
Finally, if you want to implement callbacks but fear you have to write a lot of code, you may want to take a look at Apache Tuscany (or any other SCA implementation) that enables implementation of asynchronous services with callbacks with less effort.
Best wishes!