cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Dahanne" <>
Subject RE : [custom interceptors not loaded in Jboss but loaded OK in standalone client]
Date Tue, 11 Aug 2009 15:24:05 GMT
I resolved my problem !
In fact, my jboss installation was using jboss-ws native WS-stack, and so the Provider class
chose org.jboss.* implementations, so my interceptors were never called ...

-------- Message d'origine--------
De: Anthony Dahanne []
Date: mar. 11/08/2009 14:54
Objet : [custom interceptors not loaded in Jboss but loaded OK in standalone client]
I'm using wsdl2java functionality from CXF 2.2.1, to generate a Java client.
I've been able to successfully generate the Java classes including the service of my WSDL
and associated XSDs.
I have also created 2 interceptors, to log the XML streams in & out.
I'm currently using the configuration file method, to chain my interceptor to the bus, my
cxf.xml file is this one :

<beans xmlns="" 

    <bean id="logInbound" class="mypackage.interceptors.RequestInterceptor"/> 
    <bean id="logOutbound" class="mypackage.interceptors.ResponseInterceptor"/> 
            <ref bean="logInbound"/> 
            <ref bean="logOutbound"/> 
            <ref bean="logOutbound"/> 

These interceptors work fine in a standlone client app (in a jar), but when I deploy this
jar inside a demo app (war) in Jboss 4.2, even if the demo can access the webservice and return
the response, it does not load the interceptors, and ignore them.
I've been thinking of a classpath problem with the cxf.xml file, so I tried to copy it everywhere
(!), and it did not solve my problem.
Finally, I used annotations in the client class, it still works in the standalone jar, still
doesn't in the war...

@org.apache.cxf.interceptor.InInterceptors(interceptors = { "mypackage.interceptors.RequestInterceptor"
@org.apache.cxf.interceptor.InFaultInterceptors(interceptors = { "mypackage.interceptors.ResponseInterceptor"
@org.apache.cxf.interceptor.OutInterceptors(interceptors = { "mypackage.interceptors.ResponseInterceptor"

Did I forget something when deploying to my Jboss app server ?

Thank you for you help !

View raw message