Re: Definining interceptors in camel-cxf
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.tok...@bull.net Office: +33 4 76 29 76 19 GSM:+33 66 43 00 555 Bull, Architect of an Open World TM http://www.bull.com 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
Re: Definining interceptors in camel-cxf
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.tok...@bull.net Office: +33 4 76 29 76 19 GSM:+33 66 43 00 555 Bull, Architect of an Open World TM http://www.bull.com 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.tok...@bull.net Office: +33 4 76 29 76 19 GSM:+33 66 43 00 555 Bull, Architect of an Open World TM http://www.bull.com 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)
Re: restlet usage
Thanks much - not sure why I didn't notice that. I had been using restlet 1.0.11 instead of 1.1.1. Understood about the documentation. It's better to have something working with sparse documentation than to have it well documented and not working! P.Budzik wrote: nojonojo wrote: I'm possibly interested in working with camel-restlet (2.0, since it doesn't exist before then). First off, is there any documentation besides that on http://camel.apache.org/restlet.html the restlet component page ? I'm having two problems. The first is conceptual - the page that I linked above really doesn't describe how camel integrates with Restlet, it just shows a trivial Hello, world! level example. I can probably figure it out if I can get things working in general, but more documentation there would be helpful. This component is really fresh stuff delivered recently however I'm glad to see folks being interested in it. You're right, the documentation is sparse. I was going to extend that, but as usual there was no time :) I assure you anyway it works in a real project not only for hello world. You can count at least on me and William for working out your problem. Secondly, I can't get a (simpler) Hello world sample to work. At this point, I'm not interested in the authentication part. The following is the class that I'm using: Being new to Camel, I really don't know where to start. Seems that you have some dependency problem. Look at the excerpt from my libs: classpathentry kind=var path=M2_REPO/com/noelios/restlet/com.noelios.restlet/1.1.1/com.noelios.restlet-1.1.1.jar/ classpathentry kind=var path=M2_REPO/com/noelios/restlet/com.noelios.restlet.ext.simple/1.1.1/com.noelios.restlet.ext.simple-1.1.1.jar/ classpathentry kind=var path=M2_REPO/org/restlet/org.restlet/1.1.1/org.restlet-1.1.1.jar/ Do your versions match with that? It looks like the binding class is calling Form.getValuesMap() and the one on the classpath has a different signature. -- View this message in context: http://www.nabble.com/restlet-usage-tp21572086s22882p21585150.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: restlet usage
And remember we love contributions http://camel.apache.org/contributing.html So if you get some hands on experience with the component and how to use it. Then feel free to provide feedback either here in the forum or signup for edit rights to the wiki pages. On Wed, Jan 21, 2009 at 4:15 PM, nojonojo n0...@yahoo.com wrote: Thanks much - not sure why I didn't notice that. I had been using restlet 1.0.11 instead of 1.1.1. Understood about the documentation. It's better to have something working with sparse documentation than to have it well documented and not working! P.Budzik wrote: nojonojo wrote: I'm possibly interested in working with camel-restlet (2.0, since it doesn't exist before then). First off, is there any documentation besides that on http://camel.apache.org/restlet.html the restlet component page ? I'm having two problems. The first is conceptual - the page that I linked above really doesn't describe how camel integrates with Restlet, it just shows a trivial Hello, world! level example. I can probably figure it out if I can get things working in general, but more documentation there would be helpful. This component is really fresh stuff delivered recently however I'm glad to see folks being interested in it. You're right, the documentation is sparse. I was going to extend that, but as usual there was no time :) I assure you anyway it works in a real project not only for hello world. You can count at least on me and William for working out your problem. Secondly, I can't get a (simpler) Hello world sample to work. At this point, I'm not interested in the authentication part. The following is the class that I'm using: Being new to Camel, I really don't know where to start. Seems that you have some dependency problem. Look at the excerpt from my libs: classpathentry kind=var path=M2_REPO/com/noelios/restlet/com.noelios.restlet/1.1.1/com.noelios.restlet-1.1.1.jar/ classpathentry kind=var path=M2_REPO/com/noelios/restlet/com.noelios.restlet.ext.simple/1.1.1/com.noelios.restlet.ext.simple-1.1.1.jar/ classpathentry kind=var path=M2_REPO/org/restlet/org.restlet/1.1.1/org.restlet-1.1.1.jar/ Do your versions match with that? It looks like the binding class is calling Form.getValuesMap() and the one on the classpath has a different signature. -- View this message in context: http://www.nabble.com/restlet-usage-tp21572086s22882p21585150.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/
JmsExchange.getOut() loses the original JMS Message
When you get a JMS message initially, like: from(activemq:SomeQueue).to(someProcessor); the processor, someProcessor in this case, is invoked with a JmsExchange that has an in message and no out message (i.e. out = null). The in message is a JmsMessage, and that has the original JMS Message set in its jmsMessage property. So far so good. When the processor attempts to use the out of the JmsExchange something odd happens. Since out doesn't exist, it will be lazily created, but when this happens, the original JMS Message isn't transferred to the newly created JmsMessage object. The only way that the out would get the Message is if you manually set it or some representation of it in the body of the out JmsMessage. I'm not sure whether this is a bug, but it seems odd behavior at least. I observed the behavior in Camel 1.4, and the code doesn't seem to have changed in 1.5. The relevant code is below. JmsExchange.getOut(true): public JmsMessage getOut(boolean lazyCreate) { return (JmsMessage) super.getOut(lazyCreate); } delegates to DefaultExchange for lazy creation: public Message getOut(boolean lazyCreate) { if (out == null lazyCreate) { out = createOutMessage(); configureMessage(out); } return out; } which delegates back to JmsExchange for the create: protected JmsMessage createOutMessage() { return new JmsMessage(); } and then runs its own (DefaultMessage's) configure: protected void configureMessage(Message message) { if (message instanceof MessageSupport) { MessageSupport messageSupport = (MessageSupport)message; messageSupport.setExchange(this); } } It seems that JmsExchange should have a line added to its getOut(boolean) method like so: public JmsMessage getOut(boolean lazyCreate) { JmsMessage result = (JmsMessage) super.getOut(lazyCreate); result.setJmsMessage(((JmsMessage) getIn()).getJmsMessage()); return result; } -- View this message in context: http://www.nabble.com/JmsExchange.getOut%28%29-loses-the-original-JMS-Message-tp21586153s22882p21586153.html Sent from the Camel - Users mailing list archive at Nabble.com.
sql component with no parameters
From observing behavior and looking at the code of SqlProducer, it doesn't seem like it's possible to use a query with no binding parameters (and thus no body) with the SQL component. Is this true, or is there something that I'm missing? -- View this message in context: http://www.nabble.com/sql-component-with-no-parameters-tp21591819s22882p21591819.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Using Camel without lock-in? swap out ESB later?
On Wed, Jan 21, 2009 at 9:39 PM, hanasaki hanasaki-nab...@hanaden.com wrote: Any way to use Camel and later continue its use but swap out the ESB (servicemix) for another vendor? sonic? tibco? MQ? ActiveMQ? Yes Camel is light weight and designed to be embedded into an existing container, whatever type the container is. Camel can integrate with JMS brokers using standard JMS. It can run inside a J2EE container, web container, OSGi container, etc. etc. You might find a bit of informiton you need at the FAQ http://camel.apache.org/faq.html Thank you. -- View this message in context: http://www.nabble.com/Using-Camel-without-lock-in---swap-out-ESB-later--tp21591743s22882p21591743.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/