I have a properly configured http invoker setup and in a working condition. For authentication, i use AOP, which essentially adds a authentication bit into a thread local based on various criteria (like the web context, username pwd, etc.)
And now, the problem. When the call is received @ service end, my service cribs about the authentication bit. On careful debugging, i realized that the respective aspect was never got called.
Here is the relevant code of the aspect that adds the authentication bit into thread local.
@Before(value = "execution(public * provision(..))")
public void authenticate(){...}
And here is the service method that is got called.
public ServiceResponse provision(String xyz, String abc){...}
If i make the "provision()" method called in local setup, the aspect is got called. But when this method is called via http-invoker, it doesnt get called? How can i circumvent this problem elegantly? (I have one solution, where i add authentication piece into provision() method but that is hampering my test-ability and SRP.