Hello Nicolas and Philip,

have you tried to write your own CXF interceptors? An example can be found 
here: http://cxf.apache.org/docs/interceptors.html

Take a look at the code of the SoapActionInInterceptor which extends the 
AbstractSoapInterceptor.
We add our own interceptor to the inInterceptor chain inside the xbean.xml 
configuration:

 <cxfbc:consumer wsdl="classpath:service_liv.wsdl" 
targetService="os:BusinessLogic"
        targetEndpoint="CamelEndpoint"
    >
        <cxfbc:inInterceptors>
            <bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
            <bean 
class="de.bla.commons.interceptors.SoapAuthorisationInterceptor">
                <property name="authenticationService" 
ref="authenticationService" />
            </bean>
        </cxfbc:inInterceptors>
        <cxfbc:outInterceptors>
            <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
        </cxfbc:outInterceptors>
        <cxfbc:outFaultInterceptors>
            <bean class="de.bla.commons.interceptors.FaultOutInterceptor"/>
            <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
        </cxfbc:outFaultInterceptors>
    </cxfbc:consumer>

I hope this helps.

Best regards 
Kai Lüdersdorff


-------- Original-Nachricht --------
> Datum: Thu, 10 Dec 2009 16:35:32 +0100
> Von: Philip <[email protected]>
> An: [email protected]
> Betreff: Read out header information with CXF-interceptor

> Hello everyone,
> 
> we got a CXF-BC Consumer, which receives a SOAP message and forwards it to
> a
> WebService. We like to add an interceptor, which saves the header
> information into a variable, property or somewhere else to use them later
> in
> the smx. Freeman Fang suggested the JbiInWsdl1Interceptor [1]. We tried
> this
> Interceptor but we don't really understand how it works and how to get the
> Header information this way.
> 
> Our second question:
> Is it possible to add an own interceptor in the CXF-BC consumer?
> For example:
> 
> <cxfbc:inInterceptors>
> 
>    <bean class=*"com.sample.OwnInterceptor"*/>
> 
> </cxfbc:inInterceptors>
> 
> Do better approaches exist to get the header information?
> 
> Thanks in advance!
> 
> Best Regards,
> Nicolas and Philip
> 
> 
> 
> [1]
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java

-- 
Mit freundlichen Grüßen

Kai Lüdersdorff

Email: [email protected]


Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

Reply via email to