Is there a way to handle SOAP requests asynchronously in a JAX-WS web service?

Solution Verified - Updated -

Issue

  • Does JBoss provide any supported way to handle SOAP requests in an asynchronous manner (long poll) without callbacks?
  • I would like to pause the processing of a message and resume it when an external system is ready. But I would not want to lock up the request thread but rather send the response back from some other thread when the processing is done.
  • I have external clients calling using HTTP (most likely SOAP) and this request could take 1-2 seconds to complete so I would prefer not to lock the incoming thread but rather use NIO and return a response when it is ready (from some other thread).
  • JAX-RS 2.0 has this type of syntax, i.e. @Suspended that returns the response from some other thread and releasing the request thread. But I am probably stuck with SOAP and the server is not JavaEE 7 compatible in any case.
  • It should also be possible to do this a raw servlet and startAsync(), but then I would have to invent the SOAP part.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.