Hi You can set the interceptors into cxf bus[1], then all the CXF endpoints create by CAMEL will use them. [1]http://cwiki.apache.org/CXF20DOC/bus-configuration.html
Willem S. Ali Tokmen wrote: > Hello, Pawel > > Thank you for this quick response. I now have another issue: I would > actually be interested in defining these properties globally, i.e. for > all CXF endpoints created by CAMEL. This way, people programming the > routes would only use CXF URLs and not create the CXF beans by hand. > > Thank you > > S. Ali Tokmen > savas-ali.tok...@bull.net > > Office: +33 4 76 29 76 19 > GSM: +33 66 43 00 555 > > Bull, Architect of an Open World TM > http://www.bull.com > > > > Pawel Jasinski a écrit : >> Hi, >> >> here is a snipped from the camel-context where wss4j is defined as >> interceptor: >> >> <cxf:cxfEndpoint id="consumerEndpoint" >> address="http://localhost:9001/SoapContext/SoapPort/consumer" >> wsdlURL="wsdl/consumer/consumer.wsdl" >> serviceClass="org.example.consumer.Consumer" >> endpointName="s:consumerSOAP" >> serviceName="s:consumer" >> xmlns:s="http://www.example.org/consumer/"> >> >> <cxf:inInterceptors> >> <!-- request consumer => esb --> >> <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"> >> <constructor-arg> >> <map> >> <entry key="action" value="SAMLTokenUnsigned Timestamp >> Signature Encrypt" /> >> >> <!-- signature --> >> <entry key="user" value="" /> >> >> <!-- alias from the keystore to decrypt message --> >> <entry key="signaturePropFile" >> value="META-INF/identity.properties" /> >> >> <!-- encryption --> >> <entry key="decryptionPropFile" >> value="META-INF/wss-bus.properties" /> >> <entry key="passwordCallbackClass" >> value="org.example.common.PasswordHandler" /> >> </map> >> </constructor-arg> >> </bean> >> <bean class="org.example.common.SAMLInterceptor"> >> </bean> >> </cxf:inInterceptors> >> <cxf:outInterceptors> >> .... >> >> </cxf:outInterceptors> >> </cxf:cxfEndpoint> >> >> I hope this helps. >> -- Pawel >> >> >> On Mon, Jan 19, 2009 at 4:12 PM, S. Ali Tokmen >> <savas-ali.tok...@bull.net> wrote: >> >>> Hello >>> >>> In CXF, one can define a serioes of interceptors, inbound and >>> outbound, for >>> doing many actions. Our implementation defines some Processor >>> interceptors >>> for handling security-related tasks (namely, serializing and >>> deserializing >>> Security Contexts). >>> >>> In CXF-Spring, this is done using the jaxws:inInterceptors tag in the >>> jaxws:endpoint definition. >>> >>> Now, I would like to integrate this mechanism into CAMEL... And the >>> question >>> is: how can we define CXF interceptors in CAMEL? Programmatic definition >>> works perfectly for me -if CAMEL for example defines a default CXF >>> bus for >>> itself, getting a reference to it and adding my interceptors for all >>> camel-cxf endpoints would be great. >>> >>> Thanks >>> >>> -- >>> >>> S. Ali Tokmen >>> savas-ali.tok...@bull.net >>> >>> Office: +33 4 76 29 76 19 >>> GSM: +33 66 43 00 555 >>> >>> Bull, Architect of an Open World TM >>> http://www.bull.com >>> >>> >>> >>> >> >> >> >> > >