Hi Dan

I use version 2.0.6.

Thanks
Oliver


-----Ursprüngliche Nachricht-----
Von: Daniel Kulp [mailto:[EMAIL PROTECTED]
Gesendet: Fr 05.09.2008 16:10
An: [email protected]
Cc: Wulff, Oliver
Betreff: Re: Custom InInterceptor not called
 

Oliver, 

I tried this with the latest 2.2 snapshot code yesterday and it worked fine.  
I got both messages printed out (true and false) on the console.

Can you double check with the 2.1.2 release or let me know what version this 
affects?

Dan

On Friday 05 September 2008 7:40:48 am Wulff, Oliver wrote:
> Hi there
>
> I came across the problem that my custom interceptor is added to the
> interceptor chain (cxf log message) but handleMessage isn't called. It
> works fine if the interceptor is configured for the bean CXFBeanImpl but it
> doesn't work if the interceptor is configured in the spring config as a sub
> element of the jaxws:endpoint.
>
> You can easily reproduce this with the demo "configuration_interceptor".
>
> 1) update the StreamInterceptor.java to only log that the interceptor has
> been called: //TODO
>
>         boolean isOutbound = false;
>         isOutbound = message == message.getExchange().getOutMessage()
>
>                || message == message.getExchange().getOutFaultMessage();
>
>         System.out.println(">>>handleMessage: " + isOutbound);
>
> 2) update the server.xml to configure the interceptor as an in and out
> interceptor in the CXFBusImpl Bean: <bean id="cxf"
> class="org.apache.cxf.bus.CXFBusImpl">
>         <property name="inInterceptors">
>             <list>
>                 <ref bean="GZIPStream"/>
>             </list>
>         </property>
>         <property name="outInterceptors">
>             <list>
>                 <ref bean="GZIPStream"/>
>             </list>
>         </property>
>     </bean>
>
>
> 3) output of the server looks as expected when the client is run:
> server:
>      [java] Starting Server
>      [java] Server ready...
>      [java] >>>handleMessage: false
>      [java] Executing operation sayHi
>
>      [java] >>>handleMessage: true
>
>
> 4) then, I've configured the "jaxws:endpoint" Bean in the server.xml:
>
>     <jaxws:endpoint id="streamInterceptor"
>         implementor="demo.stream.server.GreeterImpl"
>         address="http://localhost:9000/SoapContext/SoapPort";
>         wsdlLocation="wsdl/hello_world.wsdl"
>         endpointName="e:SoapPort"
>         serviceName="s:SOAPService"
>         xmlns:e="http://apache.org/hello_world_soap_http";
>         xmlns:s="http://apache.org/hello_world_soap_http";>
>         <jaxws:features>
>             <bean class="org.apache.cxf.feature.LoggingFeature"/>
>         </jaxws:features>
>
>         <jaxws:inInterceptors>
>             <ref bean="GZIPStream"/>
>         </jaxws:inInterceptors>
>
>        <jaxws:outInterceptors>
>            <ref bean="GZIPStream"/>
>        </jaxws:outInterceptors>
>
>     </jaxws:endpoint>
>
>
> 5) output of the server when the client is run:
> server:
>      [java] Starting Server
>      [java] Server ready...
>      [java] Executing operation sayHi
>
>      [java] >>>handleMessage: true
>
> handleMessage is NOT called before the request is dispatched to the
> implementation.
>
> Any ideas?
>
> Thanks
> Oliver



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to