1 Reply Latest reply on May 28, 2012 5:27 AM by davsclaus

    Apache-CXF Restful Web Services Async and sync communication

    mallikarjun_sh

      Currently I am working on PoC.  My Requirement is given below.

       

      I have a web service method and I want to invoke this method either synchronously or asynchronously based on the query param given in the URL.

       

      Ex:

          @Path("/")

          class X{

                     @Get

                     @Path("method1")

                     @Produces("application/json")

                      public String method1(....){

                      

                      }

      }

      URL :

      1. http://localhost:8080/app1/method1?async=true

      2. http://localhost:8080/app1/method1?async=false

       

      Based on the async parameter of URLs  the webservice method should get executed either synchronously or asynchronously. 

       

      Is there any way can cxf decide based on the query param before invoking the actual method i.e. method1(...) if not please suggest me a solution for this requirement.