camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "S. Ali Tokmen" <savas-ali.tok...@bull.net>
Subject Re: Definining interceptors in camel-cxf
Date Tue, 20 Jan 2009 17:28:27 GMT
  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
>>>>> <savas-ali.tokmen@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 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message