[jboss-user] [JBossWS] - have interceptors fire when calling web service method from
teraryan
do-not-reply at jboss.com
Thu Mar 12 09:41:55 EDT 2009
I posted this in EJB3, but maybe JBossWS is a better forum.
It's easiest to explain by giving an example. I have an EJB3 stateless session / web method annotated with interceptors:
| @Interceptors({a.class, b.class})
| @WebMethod
| public String processService(String request)
|
Now I need to create another method that, instead of returning a String, returns a more complex object, ie. But the more complex Object can be created using a String from calling processService(), ie.
| @WebMethod
| public ComplexObject processServiceComplex(String request) {
| return new ComplexObject(processService(request));
| }
|
But when I do this (implementing processServiceComplex in the same class as processService), the interceptors for processService don't fire. Is there any way I can get them to fire? I can't use all the interceptors on processServiceComplex, because some of them expect a String as the return value. I also want both methods to be available in the same web services interface, although they don't necessarily need to be in the same class. Basically, I want to re-use the interceptors if possible. Is there any way to do this?
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217456#4217456
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217456
More information about the jboss-user
mailing list