You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "S. Ali Tokmen" <sa...@bull.net> on 2009/01/19 16:12:16 UTC
Definining interceptors in camel-cxf
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.tokmen@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
Re: Definining interceptors in camel-cxf
Posted by "S. Ali Tokmen" <sa...@bull.net>.
I'm happy to tell you that it's fixed now :)
Here's the CXF Bus configuration in my Spring XML file:
<!-- Global CXF and WSS configuration -->
<!-- Not importing these resources will result in:
- A NullPointerException in the WSDLServiceFactory since
CxfBusImpl.extensions will not contain any WSDLManager
- BusException(s) due to missing binding factories
-->
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<!-- SecurityContext accessor specific to JOnAS 4 -->
<bean
class="org.ow2.jonas.ws.security.jonas4.SecurityContextAccessorJ4"
id="JonasAccessor" />
<!--
OutInterceptor that will add the WS-Security header and the
JOnASSecurityContextToken
-->
<bean id="JonasWSSOutInterceptor"
class="org.ow2.jonas.ws.security.cxf.WSS4JSecurityContextOutInterceptor">
<property name="securityContextAccessor">
<ref bean="JonasAccessor" />
</property>
</bean>
<!-- Use the JonasWSSOutInterceptor as a default OutInterceptor in
CXF -->
<cxf:bus>
<cxf:outInterceptors>
<ref bean="JonasWSSOutInterceptor"/>
</cxf:outInterceptors>
</cxf:bus>
<!-- End of the global CXF and WSS configuration -->
Thank you for your valuable help, and also to the Eclipse debugger :)
S. Ali Tokmen
savas-ali.tokmen@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
S. Ali Tokmen a écrit :
> Hello
>
> I think I've found the real cause of this problem:
>
> 1. At line 81, the WSDL Service Factory does a:
> definition =
> getBus().getExtension(WSDLManager.class).getDefinition(url);
> 2. The "bus" we have there is the one defined in our beans.xml file,
> therefore a CXFBusImpl
> 3. The "extensions" field of that bus only has one
> BusApplicationContext and no WSDLManager
> 4. Therefore, the getExtension returns null
>
> To fix it, I think we need to spring-import the CXF extensions.
> http://www.nabble.com/Need-clarification-on-cxf-servlet.xml-config-file.-td19598828.html
> tells me there's a cxf-all.xml import that improts everything.
>
> I'll keep you updated
>
> S. Ali Tokmen
> savas-ali.tokmen@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
>
>
>
> S. Ali Tokmen a écrit :
>> Hello
>>
>> I also have this impression :) I've tried with a simpler, CXF-only
>> example, and it still does the exact same exception!
>>
>> The only thing I do it to add the following in the beans.xml file:
>>
>> <!-- !!! Enabling this results in a NPE !!! -->
>> <cxf:bus>
>> <cxf:outInterceptors>
>> <ref bean="LoggingOutInterceptor"/>
>> </cxf:outInterceptors>
>> </cxf:bus -->
>>
>> I'm pretty sure I'm forgetting something, just cannot see what.
>>
>> All source codes are available on the following SVNs:
>>
>>
>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/wss-propagation-parent
>>
>> revision 16259 for the CXF-only version
>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
>> revision 16258 for CXF + CAMEL
>>
>> Versions used are CAMEL 1.5.0 and CXF 2.1.3.
>>
>> Cheers
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@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
>>
>>
>>
>> Willem Jiang a écrit :
>>> Hi,
>>>
>>> Can you send me your test case, and which version of camel are you
>>> using?
>>> It's looks like a cxfEndpoint configuration issue.
>>>
>>> Willem
>>> S. Ali Tokmen wrote:
>>>
>>>> Hello again
>>>>
>>>> I now have a very annoying exception:
>>>>
>>>> java.lang.NullPointerException
>>>> at
>>>>
>>>> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:311)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:408)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:189)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:161)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:68)
>>>> at
>>>>
>>>> org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:84)
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
>>>>
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:45)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
>>>>
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
>>>>
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
>>>>
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
>>>> at
>>>>
>>>> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:659)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:632)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:167)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:162)
>>>>
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:97)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:116)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:384)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:189)
>>>>
>>>> at org.apache.camel.spring.Main.doStart(Main.java:152)
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:156)
>>>>
>>>>
>>>> ... 1 more
>>>>
>>>> Anyone has any idea? I'll start debugging CXF shortly, now waiting for
>>>> package downloads.
>>>>
>>>> Thanks
>>>>
>>>> S. Ali Tokmen
>>>> savas-ali.tokmen@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
>>>>
>>>>
>>>>
>>>> Willem Jiang a écrit :
>>>>
>>>>> Please try the last verion of Camel 1.5.1-snapshot or Camel
>>>>> 2.0-snapshot.
>>>>> I just fixed some bus related issue in camel-cxf component.
>>>>>
>>>>> Willem
>>>>>
>>>>> S. Ali Tokmen wrote:
>>>>>
>>>>>
>>>>>> Hello, Willem
>>>>>>
>>>>>> The cxf:bus approach would be exactly what I need, but when I
>>>>>> enable it
>>>>>> I have the impression Camel-CXF ignores all of it. Did you try out
>>>>>> anything similar?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> S. Ali Tokmen
>>>>>> savas-ali.tokmen@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
>>>>>>
>>>>>>
>>>>>>
>>>>>> Willem Jiang a écrit :
>>>>>>
>>>>>>> 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.tokmen@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
>>>>>>>>> <sa...@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.tokmen@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
Re: Definining interceptors in camel-cxf
Posted by William Tam <em...@gmail.com>.
FWIW, I added a unit test for cxf bus injection.
wtam@lenw500:~/repos/apache/camel/trunk/components/camel-cxf$ svn ci
-m "add a unit test for cxf bus injection"
Sending camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanTest.java
Adding camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java
Adding camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfEndpointBeansRouterWithBus.xml
Transmitting file data ...
Committed revision 737122.
On Fri, Jan 23, 2009 at 12:03 PM, William Tam <em...@gmail.com> wrote:
> org.apache.camel.Component and org.apache.camel.Endpoint interfaces
> are not generic in 2.0 is expected. it is a clean up effort in 2.0.
>
> On Fri, Jan 23, 2009 at 12:01 PM, William Tam <em...@gmail.com> wrote:
>> The stack does not match the current source. (It points to the old
>> CxfProducer before refactoring.) Could you compile manually and
>> re-test it?
>>
>> Any idea why the 2.0 snapshot is more than a week old, anyone?
>>
>>
>> On Fri, Jan 23, 2009 at 10:44 AM, S. Ali Tokmen
>> <sa...@bull.net> wrote:
>>> Hello
>>>
>>> Unfortunately, Camel 2.0-SNAPSHOT and CXF 2.2-SNAPSHOT (versions present on
>>> the 23/01/2009) seem to break. I have an exception:
>>>
>>> java.lang.NullPointerException
>>> at
>>>
>>> org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:97)
>>> at
>>> org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:70)
>>> at
>>>
>>> org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
>>> at
>>> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:92)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>>> at
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>> at
>>>
>>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>>> at
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>> at
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>> at
>>>
>>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>>> at
>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>> at
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>> at
>>>
>>> org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>>> at
>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>> at
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>> at
>>>
>>> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>>> at
>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>> at
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>> at
>>> org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
>>> at
>>> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>>> at
>>>
>>> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
>>> at
>>>
>>> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:683)
>>> at
>>>
>>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:652)
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:166)
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:161)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:96)
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:115)
>>> at
>>>
>>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>>> at
>>>
>>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>>> at
>>>
>>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>>> at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
>>> at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
>>> at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
>>> at
>>>
>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>>> at
>>>
>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>>> at
>>>
>>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
>>> at org.apache.camel.spring.Main.doStart(Main.java:186)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>>> at
>>>
>>> org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:101)
>>> ... 1 more
>>>
>>> There's also a "regression" in Camel: the org.apache.camel.Component and
>>> org.apache.camel.Endpoint interfaces are not generic anymore. Is that
>>> expected?
>>>
>>> Cheers
>>>
>>> S. Ali Tokmen
>>> savas-ali.tokmen@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
>>>
>>>
>>>
>>> Willem Jiang a écrit :
>>>>
>>>> Just one more thing for the using camel-2.0-snapshot, you also need to
>>>> use the latest CXF 2.2-snapshot, or CXF 2.1.4-snapshot.
>>>>
>>>> Willem
>>>>
>>>> Willem Jiang wrote:
>>>>
>>>>>
>>>>> You can get camel-2.0 snapshot from
>>>>> http://people.apache.org/repo/m2-snapshot-repository/
>>>>>
>>>>> Willem
>>>>>
>>>>> S. Ali Tokmen wrote:
>>>>>
>>>>>>
>>>>>> Hello Willem
>>>>>>
>>>>>> Which repository would you recommend to me for testing with
>>>>>> camel-2.0-snapshot; should I compile manually?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> PS: My source code is public, on
>>>>>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
>>>>>>
>>>>>> S. Ali Tokmen
>>>>>> savas-ali.tokmen@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
>>>>>>
>>>>>>
>>>>>>
>>>>>> Willem Jiang a écrit :
>>>>>>
>>>>>>>
>>>>>>> Ah, You already found the answer :)
>>>>>>> Can you try the last Camel-2.0 snapshot, there are some changes on the
>>>>>>> CXF bus. Please let me know if anything is broken there.
>>>>>>>
>>>>>>> Willem
>>>
>>>
>>
>
Re: Definining interceptors in camel-cxf
Posted by William Tam <em...@gmail.com>.
org.apache.camel.Component and org.apache.camel.Endpoint interfaces
are not generic in 2.0 is expected. it is a clean up effort in 2.0.
On Fri, Jan 23, 2009 at 12:01 PM, William Tam <em...@gmail.com> wrote:
> The stack does not match the current source. (It points to the old
> CxfProducer before refactoring.) Could you compile manually and
> re-test it?
>
> Any idea why the 2.0 snapshot is more than a week old, anyone?
>
>
> On Fri, Jan 23, 2009 at 10:44 AM, S. Ali Tokmen
> <sa...@bull.net> wrote:
>> Hello
>>
>> Unfortunately, Camel 2.0-SNAPSHOT and CXF 2.2-SNAPSHOT (versions present on
>> the 23/01/2009) seem to break. I have an exception:
>>
>> java.lang.NullPointerException
>> at
>>
>> org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:97)
>> at
>> org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:70)
>> at
>>
>> org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
>> at
>> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:92)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>>
>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>>
>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>>
>> org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>>
>> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>> org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
>> at
>> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:683)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:652)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:166)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:161)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:96)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:115)
>> at
>>
>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>> at
>>
>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>> at
>>
>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
>> at
>>
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>> at
>>
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>> at
>>
>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
>> at org.apache.camel.spring.Main.doStart(Main.java:186)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>>
>> org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:101)
>> ... 1 more
>>
>> There's also a "regression" in Camel: the org.apache.camel.Component and
>> org.apache.camel.Endpoint interfaces are not generic anymore. Is that
>> expected?
>>
>> Cheers
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@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
>>
>>
>>
>> Willem Jiang a écrit :
>>>
>>> Just one more thing for the using camel-2.0-snapshot, you also need to
>>> use the latest CXF 2.2-snapshot, or CXF 2.1.4-snapshot.
>>>
>>> Willem
>>>
>>> Willem Jiang wrote:
>>>
>>>>
>>>> You can get camel-2.0 snapshot from
>>>> http://people.apache.org/repo/m2-snapshot-repository/
>>>>
>>>> Willem
>>>>
>>>> S. Ali Tokmen wrote:
>>>>
>>>>>
>>>>> Hello Willem
>>>>>
>>>>> Which repository would you recommend to me for testing with
>>>>> camel-2.0-snapshot; should I compile manually?
>>>>>
>>>>> Thanks
>>>>>
>>>>> PS: My source code is public, on
>>>>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
>>>>>
>>>>> S. Ali Tokmen
>>>>> savas-ali.tokmen@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
>>>>>
>>>>>
>>>>>
>>>>> Willem Jiang a écrit :
>>>>>
>>>>>>
>>>>>> Ah, You already found the answer :)
>>>>>> Can you try the last Camel-2.0 snapshot, there are some changes on the
>>>>>> CXF bus. Please let me know if anything is broken there.
>>>>>>
>>>>>> Willem
>>
>>
>
Re: Definining interceptors in camel-cxf
Posted by "S. Ali Tokmen" <sa...@bull.net>.
Hello
Now compiling revision 737658 from
https://svn.apache.org/repos/asf/camel/trunk
I'll keep you updated
Thanks
S. Ali Tokmen
savas-ali.tokmen@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
William Tam a écrit :
> The stack does not match the current source. (It points to the old
> CxfProducer before refactoring.) Could you compile manually and
> re-test it?
>
> Any idea why the 2.0 snapshot is more than a week old, anyone?
>
>
> On Fri, Jan 23, 2009 at 10:44 AM, S. Ali Tokmen
> <sa...@bull.net> wrote:
>
>> Hello
>>
>> Unfortunately, Camel 2.0-SNAPSHOT and CXF 2.2-SNAPSHOT (versions present on
>> the 23/01/2009) seem to break. I have an exception:
>>
>> java.lang.NullPointerException
>> at
>>
>> org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:97)
>> at
>> org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:70)
>> at
>>
>> org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
>> at
>> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:92)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>>
>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>>
>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>>
>> org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>>
>> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>> org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
>> at
>> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:683)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:652)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:166)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:161)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:96)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:115)
>> at
>>
>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>> at
>>
>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>> at
>>
>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
>> at
>>
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>> at
>>
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>> at
>>
>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
>> at org.apache.camel.spring.Main.doStart(Main.java:186)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>>
>> org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:101)
>> ... 1 more
>>
>> There's also a "regression" in Camel: the org.apache.camel.Component and
>> org.apache.camel.Endpoint interfaces are not generic anymore. Is that
>> expected?
>>
>> Cheers
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@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
>>
>>
>>
>> Willem Jiang a écrit :
>>
>>> Just one more thing for the using camel-2.0-snapshot, you also need to
>>> use the latest CXF 2.2-snapshot, or CXF 2.1.4-snapshot.
>>>
>>> Willem
>>>
>>> Willem Jiang wrote:
>>>
>>>
>>>> You can get camel-2.0 snapshot from
>>>> http://people.apache.org/repo/m2-snapshot-repository/
>>>>
>>>> Willem
>>>>
>>>> S. Ali Tokmen wrote:
>>>>
>>>>
>>>>> Hello Willem
>>>>>
>>>>> Which repository would you recommend to me for testing with
>>>>> camel-2.0-snapshot; should I compile manually?
>>>>>
>>>>> Thanks
>>>>>
>>>>> PS: My source code is public, on
>>>>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
>>>>>
>>>>> S. Ali Tokmen
>>>>> savas-ali.tokmen@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
>>>>>
>>>>>
>>>>>
>>>>> Willem Jiang a écrit :
>>>>>
>>>>>
>>>>>> Ah, You already found the answer :)
>>>>>> Can you try the last Camel-2.0 snapshot, there are some changes on the
>>>>>> CXF bus. Please let me know if anything is broken there.
>>>>>>
>>>>>> Willem
>>>>>>
>>
>
>
>
>
Re: Definining interceptors in camel-cxf
Posted by Willem Jiang <wi...@gmail.com>.
I think it may relate to the change of camel's repository.
We need to update the deploy script :(.
Before that , check out the code and build it locally is a option.
Willem
William Tam wrote:
> The stack does not match the current source. (It points to the old
> CxfProducer before refactoring.) Could you compile manually and
> re-test it?
>
> Any idea why the 2.0 snapshot is more than a week old, anyone?
>
>
> On Fri, Jan 23, 2009 at 10:44 AM, S. Ali Tokmen
> <sa...@bull.net> wrote:
>> Hello
>>
>> Unfortunately, Camel 2.0-SNAPSHOT and CXF 2.2-SNAPSHOT (versions present on
>> the 23/01/2009) seem to break. I have an exception:
>>
>> java.lang.NullPointerException
>> at
>>
>> org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:97)
>> at
>> org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:70)
>> at
>>
>> org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
>> at
>> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:92)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>>
>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>>
>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>>
>> org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>>
>> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>> org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
>> at
>> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:683)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:652)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:166)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:161)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:96)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:115)
>> at
>>
>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>> at
>>
>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>> at
>>
>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
>> at
>>
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>> at
>>
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>> at
>>
>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
>> at org.apache.camel.spring.Main.doStart(Main.java:186)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
>> at
>>
>> org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:101)
>> ... 1 more
>>
>> There's also a "regression" in Camel: the org.apache.camel.Component and
>> org.apache.camel.Endpoint interfaces are not generic anymore. Is that
>> expected?
>>
>> Cheers
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@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
>>
>>
>>
>> Willem Jiang a écrit :
>>> Just one more thing for the using camel-2.0-snapshot, you also need to
>>> use the latest CXF 2.2-snapshot, or CXF 2.1.4-snapshot.
>>>
>>> Willem
>>>
>>> Willem Jiang wrote:
>>>
>>>> You can get camel-2.0 snapshot from
>>>> http://people.apache.org/repo/m2-snapshot-repository/
>>>>
>>>> Willem
>>>>
>>>> S. Ali Tokmen wrote:
>>>>
>>>>> Hello Willem
>>>>>
>>>>> Which repository would you recommend to me for testing with
>>>>> camel-2.0-snapshot; should I compile manually?
>>>>>
>>>>> Thanks
>>>>>
>>>>> PS: My source code is public, on
>>>>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
>>>>>
>>>>> S. Ali Tokmen
>>>>> savas-ali.tokmen@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
>>>>>
>>>>>
>>>>>
>>>>> Willem Jiang a écrit :
>>>>>
>>>>>> Ah, You already found the answer :)
>>>>>> Can you try the last Camel-2.0 snapshot, there are some changes on the
>>>>>> CXF bus. Please let me know if anything is broken there.
>>>>>>
>>>>>> Willem
>>
>
Re: Definining interceptors in camel-cxf
Posted by William Tam <em...@gmail.com>.
The stack does not match the current source. (It points to the old
CxfProducer before refactoring.) Could you compile manually and
re-test it?
Any idea why the 2.0 snapshot is more than a week old, anyone?
On Fri, Jan 23, 2009 at 10:44 AM, S. Ali Tokmen
<sa...@bull.net> wrote:
> Hello
>
> Unfortunately, Camel 2.0-SNAPSHOT and CXF 2.2-SNAPSHOT (versions present on
> the 23/01/2009) seem to break. I have an exception:
>
> java.lang.NullPointerException
> at
>
> org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:97)
> at
> org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:70)
> at
>
> org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
> at
> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:92)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
> at
>
> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
> at
>
> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
> at
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
> at
>
> org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
> at
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
> at
>
> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
> at
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
> at
> org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
> at
> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
> at
>
> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
> at
>
> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:683)
> at
>
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:652)
> at
>
> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:166)
> at
>
> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:161)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
> at
>
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:96)
> at
>
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:115)
> at
>
> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
> at
>
> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
> at
>
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
> at
>
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
> at
>
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
> at
>
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
> at
>
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
> at
>
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
> at
>
> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
> at org.apache.camel.spring.Main.doStart(Main.java:186)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
> at
>
> org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:101)
> ... 1 more
>
> There's also a "regression" in Camel: the org.apache.camel.Component and
> org.apache.camel.Endpoint interfaces are not generic anymore. Is that
> expected?
>
> Cheers
>
> S. Ali Tokmen
> savas-ali.tokmen@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
>
>
>
> Willem Jiang a écrit :
>>
>> Just one more thing for the using camel-2.0-snapshot, you also need to
>> use the latest CXF 2.2-snapshot, or CXF 2.1.4-snapshot.
>>
>> Willem
>>
>> Willem Jiang wrote:
>>
>>>
>>> You can get camel-2.0 snapshot from
>>> http://people.apache.org/repo/m2-snapshot-repository/
>>>
>>> Willem
>>>
>>> S. Ali Tokmen wrote:
>>>
>>>>
>>>> Hello Willem
>>>>
>>>> Which repository would you recommend to me for testing with
>>>> camel-2.0-snapshot; should I compile manually?
>>>>
>>>> Thanks
>>>>
>>>> PS: My source code is public, on
>>>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
>>>>
>>>> S. Ali Tokmen
>>>> savas-ali.tokmen@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
>>>>
>>>>
>>>>
>>>> Willem Jiang a écrit :
>>>>
>>>>>
>>>>> Ah, You already found the answer :)
>>>>> Can you try the last Camel-2.0 snapshot, there are some changes on the
>>>>> CXF bus. Please let me know if anything is broken there.
>>>>>
>>>>> Willem
>
>
Re: Definining interceptors in camel-cxf
Posted by "S. Ali Tokmen" <sa...@bull.net>.
Hello
Unfortunately, Camel 2.0-SNAPSHOT and CXF 2.2-SNAPSHOT (versions present
on the 23/01/2009) seem to break. I have an exception:
java.lang.NullPointerException
at
org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:97)
at
org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:70)
at
org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
at
org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:92)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
at
org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
at
org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:253)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
at
org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
at
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
at
org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
at
org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
at
org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
at
org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:683)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:652)
at
org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:166)
at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:161)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:96)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:115)
at
org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
at
org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
at org.apache.camel.spring.Main.doStart(Main.java:186)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49)
at
org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:101)
... 1 more
There's also a "regression" in Camel: the org.apache.camel.Component and
org.apache.camel.Endpoint interfaces are not generic anymore. Is that
expected?
Cheers
S. Ali Tokmen
savas-ali.tokmen@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
Willem Jiang a écrit :
> Just one more thing for the using camel-2.0-snapshot, you also need to
> use the latest CXF 2.2-snapshot, or CXF 2.1.4-snapshot.
>
> Willem
>
> Willem Jiang wrote:
>
>> You can get camel-2.0 snapshot from
>> http://people.apache.org/repo/m2-snapshot-repository/
>>
>> Willem
>>
>> S. Ali Tokmen wrote:
>>
>>> Hello Willem
>>>
>>> Which repository would you recommend to me for testing with
>>> camel-2.0-snapshot; should I compile manually?
>>>
>>> Thanks
>>>
>>> PS: My source code is public, on
>>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
>>>
>>> S. Ali Tokmen
>>> savas-ali.tokmen@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
>>>
>>>
>>>
>>> Willem Jiang a écrit :
>>>
>>>> Ah, You already found the answer :)
>>>> Can you try the last Camel-2.0 snapshot, there are some changes on the
>>>> CXF bus. Please let me know if anything is broken there.
>>>>
>>>> Willem
Re: Definining interceptors in camel-cxf
Posted by Willem Jiang <wi...@gmail.com>.
Just one more thing for the using camel-2.0-snapshot, you also need to
use the latest CXF 2.2-snapshot, or CXF 2.1.4-snapshot.
Willem
Willem Jiang wrote:
> You can get camel-2.0 snapshot from
> http://people.apache.org/repo/m2-snapshot-repository/
>
> Willem
>
> S. Ali Tokmen wrote:
>> Hello Willem
>>
>> Which repository would you recommend to me for testing with
>> camel-2.0-snapshot; should I compile manually?
>>
>> Thanks
>>
>> PS: My source code is public, on
>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@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
>>
>>
>>
>> Willem Jiang a écrit :
>>> Ah, You already found the answer :)
>>> Can you try the last Camel-2.0 snapshot, there are some changes on the
>>> CXF bus. Please let me know if anything is broken there.
>>>
>>> Willem
>>
>
>
Re: Definining interceptors in camel-cxf
Posted by Willem Jiang <wi...@gmail.com>.
You can get camel-2.0 snapshot from
http://people.apache.org/repo/m2-snapshot-repository/
Willem
S. Ali Tokmen wrote:
> Hello Willem
>
> Which repository would you recommend to me for testing with
> camel-2.0-snapshot; should I compile manually?
>
> Thanks
>
> PS: My source code is public, on
> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
>
> S. Ali Tokmen
> savas-ali.tokmen@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
>
>
>
> Willem Jiang a écrit :
>> Ah, You already found the answer :)
>> Can you try the last Camel-2.0 snapshot, there are some changes on the
>> CXF bus. Please let me know if anything is broken there.
>>
>> Willem
>
>
Re: Definining interceptors in camel-cxf
Posted by "S. Ali Tokmen" <sa...@bull.net>.
Hello Willem
Which repository would you recommend to me for testing with
camel-2.0-snapshot; should I compile manually?
Thanks
PS: My source code is public, on
svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
S. Ali Tokmen
savas-ali.tokmen@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
Willem Jiang a écrit :
> Ah, You already found the answer :)
> Can you try the last Camel-2.0 snapshot, there are some changes on the
> CXF bus. Please let me know if anything is broken there.
>
> Willem
Re: Definining interceptors in camel-cxf
Posted by Willem Jiang <wi...@gmail.com>.
Ah, You already found the answer :)
Can you try the last Camel-2.0 snapshot, there are some changes on the
CXF bus. Please let me know if anything is broken there.
Willem
S. Ali Tokmen wrote:
> Hello
>
> I think I've found the real cause of this problem:
>
> 1. At line 81, the WSDL Service Factory does a:
> definition =
> getBus().getExtension(WSDLManager.class).getDefinition(url);
> 2. The "bus" we have there is the one defined in our beans.xml file,
> therefore a CXFBusImpl
> 3. The "extensions" field of that bus only has one
> BusApplicationContext and no WSDLManager
> 4. Therefore, the getExtension returns null
>
> To fix it, I think we need to spring-import the CXF extensions.
> http://www.nabble.com/Need-clarification-on-cxf-servlet.xml-config-file.-td19598828.html
> tells me there's a cxf-all.xml import that improts everything.
>
> I'll keep you updated
>
> S. Ali Tokmen
> savas-ali.tokmen@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
>
>
>
> S. Ali Tokmen a écrit :
>> Hello
>>
>> I also have this impression :) I've tried with a simpler, CXF-only
>> example, and it still does the exact same exception!
>>
>> The only thing I do it to add the following in the beans.xml file:
>>
>> <!-- !!! Enabling this results in a NPE !!! -->
>> <cxf:bus>
>> <cxf:outInterceptors>
>> <ref bean="LoggingOutInterceptor"/>
>> </cxf:outInterceptors>
>> </cxf:bus -->
>>
>> I'm pretty sure I'm forgetting something, just cannot see what.
>>
>> All source codes are available on the following SVNs:
>>
>>
>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/wss-propagation-parent
>>
>> revision 16259 for the CXF-only version
>> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
>> revision 16258 for CXF + CAMEL
>>
>> Versions used are CAMEL 1.5.0 and CXF 2.1.3.
>>
>> Cheers
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@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
>>
>>
>>
>> Willem Jiang a écrit :
>>> Hi,
>>>
>>> Can you send me your test case, and which version of camel are you
>>> using?
>>> It's looks like a cxfEndpoint configuration issue.
>>>
>>> Willem
>>> S. Ali Tokmen wrote:
>>>
>>>> Hello again
>>>>
>>>> I now have a very annoying exception:
>>>>
>>>> java.lang.NullPointerException
>>>> at
>>>>
>>>> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:311)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:408)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:189)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:161)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:68)
>>>> at
>>>>
>>>> org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:84)
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
>>>>
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:45)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
>>>>
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
>>>>
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
>>>>
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>>> at
>>>>
>>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
>>>> at
>>>> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:659)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:632)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:167)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:162)
>>>>
>>>>
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:97)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:116)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:384)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>>>>
>>>>
>>>> at
>>>>
>>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>>>>
>>>>
>>>> at
>>>>
>>>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:189)
>>>>
>>>> at org.apache.camel.spring.Main.doStart(Main.java:152)
>>>> at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>> at
>>>>
>>>> org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:156)
>>>>
>>>>
>>>> ... 1 more
>>>>
>>>> Anyone has any idea? I'll start debugging CXF shortly, now waiting for
>>>> package downloads.
>>>>
>>>> Thanks
>>>>
>>>> S. Ali Tokmen
>>>> savas-ali.tokmen@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
>>>>
>>>>
>>>>
>>>> Willem Jiang a écrit :
>>>>
>>>>> Please try the last verion of Camel 1.5.1-snapshot or Camel
>>>>> 2.0-snapshot.
>>>>> I just fixed some bus related issue in camel-cxf component.
>>>>>
>>>>> Willem
>>>>>
>>>>> S. Ali Tokmen wrote:
>>>>>
>>>>>
>>>>>> Hello, Willem
>>>>>>
>>>>>> The cxf:bus approach would be exactly what I need, but when I
>>>>>> enable it
>>>>>> I have the impression Camel-CXF ignores all of it. Did you try out
>>>>>> anything similar?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> S. Ali Tokmen
>>>>>> savas-ali.tokmen@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
>>>>>>
>>>>>>
>>>>>>
>>>>>> Willem Jiang a écrit :
>>>>>>
>>>>>>> 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.tokmen@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
>>>>>>>>> <sa...@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.tokmen@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
>>>
>>>
>>>
>>>
>>>
>>
>
>
Re: Definining interceptors in camel-cxf
Posted by "S. Ali Tokmen" <sa...@bull.net>.
Hello
I think I've found the real cause of this problem:
1. At line 81, the WSDL Service Factory does a:
definition =
getBus().getExtension(WSDLManager.class).getDefinition(url);
2. The "bus" we have there is the one defined in our beans.xml file,
therefore a CXFBusImpl
3. The "extensions" field of that bus only has one
BusApplicationContext and no WSDLManager
4. Therefore, the getExtension returns null
To fix it, I think we need to spring-import the CXF extensions.
http://www.nabble.com/Need-clarification-on-cxf-servlet.xml-config-file.-td19598828.html
tells me there's a cxf-all.xml import that improts everything.
I'll keep you updated
S. Ali Tokmen
savas-ali.tokmen@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
S. Ali Tokmen a écrit :
> Hello
>
> I also have this impression :) I've tried with a simpler, CXF-only
> example, and it still does the exact same exception!
>
> The only thing I do it to add the following in the beans.xml file:
>
> <!-- !!! Enabling this results in a NPE !!! -->
> <cxf:bus>
> <cxf:outInterceptors>
> <ref bean="LoggingOutInterceptor"/>
> </cxf:outInterceptors>
> </cxf:bus -->
>
> I'm pretty sure I'm forgetting something, just cannot see what.
>
> All source codes are available on the following SVNs:
>
>
> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/wss-propagation-parent
>
> revision 16259 for the CXF-only version
> svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
> revision 16258 for CXF + CAMEL
>
> Versions used are CAMEL 1.5.0 and CXF 2.1.3.
>
> Cheers
>
> S. Ali Tokmen
> savas-ali.tokmen@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
>
>
>
> Willem Jiang a écrit :
>> Hi,
>>
>> Can you send me your test case, and which version of camel are you
>> using?
>> It's looks like a cxfEndpoint configuration issue.
>>
>> Willem
>> S. Ali Tokmen wrote:
>>
>>> Hello again
>>>
>>> I now have a very annoying exception:
>>>
>>> java.lang.NullPointerException
>>> at
>>>
>>> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
>>>
>>> at
>>>
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:311)
>>>
>>>
>>> at
>>>
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:408)
>>>
>>>
>>> at
>>>
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:189)
>>>
>>>
>>> at
>>>
>>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
>>>
>>>
>>> at
>>>
>>> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
>>>
>>> at
>>>
>>> org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:161)
>>>
>>>
>>> at
>>>
>>> org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:68)
>>> at
>>>
>>> org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
>>>
>>>
>>> at
>>>
>>> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:84)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>> at
>>>
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>>
>>> at
>>>
>>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
>>>
>>>
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>> at
>>>
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>>
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:45)
>>> at
>>>
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>>>
>>> at
>>>
>>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
>>>
>>>
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>> at
>>>
>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>> at
>>>
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>>
>>> at
>>>
>>> org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
>>>
>>>
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>> at
>>>
>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>> at
>>>
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>>
>>> at
>>>
>>> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
>>>
>>>
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>> at
>>>
>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>>> at
>>>
>>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>>>
>>> at
>>>
>>> org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
>>> at
>>> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>> at
>>>
>>> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
>>>
>>>
>>> at
>>>
>>> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:659)
>>>
>>>
>>> at
>>>
>>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:632)
>>>
>>>
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:167)
>>>
>>>
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:162)
>>>
>>>
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:97)
>>>
>>>
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:116)
>>>
>>>
>>> at
>>>
>>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>>>
>>>
>>> at
>>>
>>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>>>
>>>
>>> at
>>>
>>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>>>
>>>
>>> at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275)
>>>
>>>
>>> at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
>>>
>>>
>>> at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:384)
>>>
>>>
>>> at
>>>
>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>>>
>>>
>>> at
>>>
>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>>>
>>>
>>> at
>>>
>>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:189)
>>>
>>> at org.apache.camel.spring.Main.doStart(Main.java:152)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>> at
>>>
>>> org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:156)
>>>
>>>
>>> ... 1 more
>>>
>>> Anyone has any idea? I'll start debugging CXF shortly, now waiting for
>>> package downloads.
>>>
>>> Thanks
>>>
>>> S. Ali Tokmen
>>> savas-ali.tokmen@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
>>>
>>>
>>>
>>> Willem Jiang a écrit :
>>>
>>>> Please try the last verion of Camel 1.5.1-snapshot or Camel
>>>> 2.0-snapshot.
>>>> I just fixed some bus related issue in camel-cxf component.
>>>>
>>>> Willem
>>>>
>>>> S. Ali Tokmen wrote:
>>>>
>>>>
>>>>> Hello, Willem
>>>>>
>>>>> The cxf:bus approach would be exactly what I need, but when I
>>>>> enable it
>>>>> I have the impression Camel-CXF ignores all of it. Did you try out
>>>>> anything similar?
>>>>>
>>>>> Thanks
>>>>>
>>>>> S. Ali Tokmen
>>>>> savas-ali.tokmen@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
>>>>>
>>>>>
>>>>>
>>>>> Willem Jiang a écrit :
>>>>>
>>>>>> 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.tokmen@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
>>>>>>>> <sa...@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.tokmen@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
>>
>>
>>
>>
>>
>
Re: Definining interceptors in camel-cxf
Posted by "S. Ali Tokmen" <sa...@bull.net>.
Hello
I also have this impression :) I've tried with a simpler, CXF-only
example, and it still does the exact same exception!
The only thing I do it to add the following in the beans.xml file:
<!-- !!! Enabling this results in a NPE !!! -->
<cxf:bus>
<cxf:outInterceptors>
<ref bean="LoggingOutInterceptor"/>
</cxf:outInterceptors>
</cxf:bus -->
I'm pretty sure I'm forgetting something, just cannot see what.
All source codes are available on the following SVNs:
svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/wss-propagation-parent
revision 16259 for the CXF-only version
svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas4
revision 16258 for CXF + CAMEL
Versions used are CAMEL 1.5.0 and CXF 2.1.3.
Cheers
S. Ali Tokmen
savas-ali.tokmen@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
Willem Jiang a écrit :
> Hi,
>
> Can you send me your test case, and which version of camel are you using?
> It's looks like a cxfEndpoint configuration issue.
>
> Willem
> S. Ali Tokmen wrote:
>
>> Hello again
>>
>> I now have a very annoying exception:
>>
>> java.lang.NullPointerException
>> at
>>
>> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
>> at
>>
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:311)
>>
>> at
>>
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:408)
>>
>> at
>>
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:189)
>>
>> at
>>
>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
>>
>> at
>>
>> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
>> at
>>
>> org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:161)
>>
>> at
>> org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:68)
>> at
>>
>> org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
>>
>> at
>> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:84)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>>
>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
>>
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:45)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
>> at
>>
>> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
>>
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>>
>> org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
>>
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>>
>> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
>>
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
>> at
>> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
>> at
>> org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
>> at
>> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
>>
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:659)
>>
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:632)
>>
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:167)
>>
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:162)
>>
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:97)
>>
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:116)
>>
>> at
>>
>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>>
>> at
>>
>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>>
>> at
>>
>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>>
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275)
>>
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
>>
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:384)
>>
>> at
>>
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>>
>> at
>>
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>>
>> at
>>
>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:189)
>> at org.apache.camel.spring.Main.doStart(Main.java:152)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>>
>> org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:156)
>>
>> ... 1 more
>>
>> Anyone has any idea? I'll start debugging CXF shortly, now waiting for
>> package downloads.
>>
>> Thanks
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@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
>>
>>
>>
>> Willem Jiang a écrit :
>>
>>> Please try the last verion of Camel 1.5.1-snapshot or Camel 2.0-snapshot.
>>> I just fixed some bus related issue in camel-cxf component.
>>>
>>> Willem
>>>
>>> S. Ali Tokmen wrote:
>>>
>>>
>>>> Hello, Willem
>>>>
>>>> The cxf:bus approach would be exactly what I need, but when I enable it
>>>> I have the impression Camel-CXF ignores all of it. Did you try out
>>>> anything similar?
>>>>
>>>> Thanks
>>>>
>>>> S. Ali Tokmen
>>>> savas-ali.tokmen@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
>>>>
>>>>
>>>>
>>>> Willem Jiang a écrit :
>>>>
>>>>
>>>>> 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.tokmen@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
>>>>>>> <sa...@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.tokmen@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
>>>>>>>>
>
>
>
>
>
Re: Definining interceptors in camel-cxf
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
Can you send me your test case, and which version of camel are you using?
It's looks like a cxfEndpoint configuration issue.
Willem
S. Ali Tokmen wrote:
> Hello again
>
> I now have a very annoying exception:
>
> java.lang.NullPointerException
> at
>
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
> at
>
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:311)
>
> at
>
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:408)
>
> at
>
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:189)
>
> at
>
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
>
> at
>
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
> at
>
> org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:161)
>
> at
> org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:68)
> at
>
> org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
>
> at
> org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:84)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
> at
>
> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
>
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:45)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
> at
>
> org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
>
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
> at
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
> at
>
> org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
>
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
> at
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
> at
>
> org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
>
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
> at
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
> at
> org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
> at
> org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
> at
> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
> at
>
> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
>
> at
>
> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:659)
>
> at
>
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:632)
>
> at
>
> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:167)
>
> at
>
> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:162)
>
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
> at
>
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:97)
>
> at
>
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:116)
>
> at
>
> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>
> at
>
> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>
> at
>
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>
> at
>
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275)
>
> at
>
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
>
> at
>
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:384)
>
> at
>
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>
> at
>
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>
> at
>
> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:189)
> at org.apache.camel.spring.Main.doStart(Main.java:152)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
> at
>
> org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:156)
>
> ... 1 more
>
> Anyone has any idea? I'll start debugging CXF shortly, now waiting for
> package downloads.
>
> Thanks
>
> S. Ali Tokmen
> savas-ali.tokmen@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
>
>
>
> Willem Jiang a écrit :
>> Please try the last verion of Camel 1.5.1-snapshot or Camel 2.0-snapshot.
>> I just fixed some bus related issue in camel-cxf component.
>>
>> Willem
>>
>> S. Ali Tokmen wrote:
>>
>>> Hello, Willem
>>>
>>> The cxf:bus approach would be exactly what I need, but when I enable it
>>> I have the impression Camel-CXF ignores all of it. Did you try out
>>> anything similar?
>>>
>>> Thanks
>>>
>>> S. Ali Tokmen
>>> savas-ali.tokmen@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
>>>
>>>
>>>
>>> Willem Jiang a écrit :
>>>
>>>> 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.tokmen@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
>>>>>> <sa...@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.tokmen@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
>
Re: Definining interceptors in camel-cxf
Posted by "S. Ali Tokmen" <sa...@bull.net>.
Hello again
I now have a very annoying exception:
java.lang.NullPointerException
at
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:311)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:408)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:189)
at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
at
org.apache.camel.component.cxf.CxfProducer.createClientFromClientFactoryBean(CxfProducer.java:161)
at
org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:68)
at
org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:74)
at
org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:84)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
at
org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:45)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:64)
at
org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:249)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
at
org.apache.camel.processor.DelegateProcessor.doStart(DelegateProcessor.java:68)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
at
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:54)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:42)
at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:53)
at
org.apache.camel.impl.DefaultConsumer.doStart(DefaultConsumer.java:85)
at
org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
at
org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:421)
at
org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:659)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:632)
at
org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:167)
at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:162)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:97)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:116)
at
org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
at
org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275)
at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:384)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:189)
at org.apache.camel.spring.Main.doStart(Main.java:152)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
at
org.ow2.jonas.camel.server.CamelWrapper$CamelThread.run(CamelWrapper.java:156)
... 1 more
Anyone has any idea? I'll start debugging CXF shortly, now waiting for
package downloads.
Thanks
S. Ali Tokmen
savas-ali.tokmen@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
Willem Jiang a écrit :
> Please try the last verion of Camel 1.5.1-snapshot or Camel 2.0-snapshot.
> I just fixed some bus related issue in camel-cxf component.
>
> Willem
>
> S. Ali Tokmen wrote:
>
>> Hello, Willem
>>
>> The cxf:bus approach would be exactly what I need, but when I enable it
>> I have the impression Camel-CXF ignores all of it. Did you try out
>> anything similar?
>>
>> Thanks
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@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
>>
>>
>>
>> Willem Jiang a écrit :
>>
>>> 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.tokmen@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
>>>>> <sa...@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.tokmen@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
Re: Definining interceptors in camel-cxf
Posted by Willem Jiang <wi...@gmail.com>.
Please try the last verion of Camel 1.5.1-snapshot or Camel 2.0-snapshot.
I just fixed some bus related issue in camel-cxf component.
Willem
S. Ali Tokmen wrote:
> Hello, Willem
>
> The cxf:bus approach would be exactly what I need, but when I enable it
> I have the impression Camel-CXF ignores all of it. Did you try out
> anything similar?
>
> Thanks
>
> S. Ali Tokmen
> savas-ali.tokmen@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
>
>
>
> Willem Jiang a écrit :
>> 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.tokmen@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
>>>> <sa...@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.tokmen@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
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>>
>>
>>
>
>
Re: Definining interceptors in camel-cxf
Posted by "S. Ali Tokmen" <sa...@bull.net>.
Hello, Willem
The cxf:bus approach would be exactly what I need, but when I enable it
I have the impression Camel-CXF ignores all of it. Did you try out
anything similar?
Thanks
S. Ali Tokmen
savas-ali.tokmen@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
Willem Jiang a écrit :
> 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.tokmen@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
>>> <sa...@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.tokmen@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
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>
>
>
>
>
Re: Definining interceptors in camel-cxf
Posted by Willem Jiang <wi...@gmail.com>.
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.tokmen@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
>> <sa...@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.tokmen@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
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
Re: Definining interceptors in camel-cxf
Posted by "S. Ali Tokmen" <sa...@bull.net>.
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.tokmen@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
> <sa...@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.tokmen@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
>>
>>
>>
>>
>
>
>
>
Re: Definining interceptors in camel-cxf
Posted by Pawel Jasinski <pa...@gmail.com>.
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
<sa...@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.tokmen@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
>
>
>