Re: Camel CXF - SOAP 1.1 vs SOAP 1.2

2014-03-04 Thread Willem Jiang
We need more information about how did you configure the camel-cxf endpoint.
I guess you were not using POJO data format, and you may need to update the 
camel-cxf endpoint to let it use SOAP 1.2 binding.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 4, 2014 at 10:05:05 PM, fs (mholla...@gmail.com) wrote:
>  
> Hi,
>  
> we have a SOAP 1.2 WSDL and a CXF endpoint configured based on that.  
>  
> Everything works fine when there are no exceptions in the integration  
> i.e.
> we get back a SOAP 1.2 response as supposed.
>  
> But when an exception occurs in the route, it seems that a soap  
> fault is
> returned - that is also fine except for the fact that the fault  
> is delivered
> on a SOAP 1.1 envelope. We would like to have the soap fault that  
> is based
> on the SOAP 1.2 version in this case.
>  
> Don't know why this is happening, but if anyone has an idea how  
> to proceed
> we'd really appreciate it a lot.
>  
> We are using ServiceMix 4.5.3 with Camel 2.10.7 and CXF 2.6.9  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-CXF-SOAP-1-1-vs-SOAP-1-2-tp5748285.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Using Camel properties

2014-03-04 Thread Willem Jiang
You may need to use some test editor to help you search the key from the 
resource file.
We don’t have validator tool in camel for design time check.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 5, 2014 at 12:45:52 AM, java kurious (javakuri...@gmail.com) wrote:
>  
> Hi All,
>  
> I am using camel properties component to read properties file:  
>  
> > class="org.apache.camel.component.properties.PropertiesComponent">  
> >  
> value="classpath:META-INF/spring/code-to-value.properties"/>  
>  
>  
>  
>  
> Everything works fine, except when I use a key that is not defined  
> in the
> properties file.
>  
>  
> ${properties:asdf}
>  
>  
>  
>  
> In that case I get an error similar to following :
>  
> org.apache.camel.RuntimeCamelException:
> java.lang.IllegalArgumentException: *Property
> with key [asdf] not found in properties from text: {{asdf}}*  
> at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1344)
>   
> at
> org.apache.camel.builder.ExpressionBuilder$76.evaluate(ExpressionBuilder.java:1733)
>   
> at
> org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:36)
>   
> at
> org.apache.camel.builder.SimpleBuilder.evaluate(SimpleBuilder.java:83)  
> at
> org.apache.camel.builder.ProcessorBuilder$4.process(ProcessorBuilder.java:103)
>   
> at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>   
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
>   
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
>   
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)  
>  
> What would be the right way to check if the key exists before using  
> it ?
>  
> Thanks
>  



Re: camel-example-cxf* (all CXF examples)

2014-03-02 Thread Willem Jiang
Hi David,

I forgot to mention that I was using JDK7 to run the test, and I didn’t endorse 
the Xerces lib.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 3, 2014 at 11:36:42 AM, David Parker (dfpar...@gmail.com) wrote:
>  
> Hi Willem,
>  
> appreciate you looking at this.
>  
> It is true - after I cleared away support XML jars, the projects  
> compiled &
> I can run them properly.
>  
> The root cause of the issue appears to be JDK 1.6 conflicting with  
> xerces
> libs, perhaps jaxb impl/api as well.
>  
> In future, I must keep an eye on which projects require supplemental  
> XML
> libraries; and, it will be interesting to see if this XML libs  
> continue to
> conflict in JDK 7+.
>  
> Thank you for guidance.
>  
> /Dev
>  
>  
>  
> On Sun, Mar 2, 2014 at 2:26 AM, Willem Jiang  
> wrote:
>  
> > I just tried to build the camel-example-cxf of camel-2.12.3,  
> I didn’t get
> > the error that you meet.
> > Can you remove the cxf jars from your maven repo to let the maven  
> download
> > a new version for you?
> >
> > --
> > Willem Jiang
> >
> > Red Hat, Inc.
> > Web: http://www.redhat.com
> > Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/)  
> > (English)
> > http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)  
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> >
> >
> > On March 1, 2014 at 4:40:03 PM, David Parker (dfpar...@gmail.com)  
> wrote:
> > >
> > > PS - using camel example rel 2.12.1 & rel 2.12.3
> > >
> > >
> > > On Sat, Mar 1, 2014 at 12:17 AM, David Parker
> > > wrote:
> > >
> > > > Camel experts,
> > > >
> > > > please point me in a helpful direction to resolve an issue  
> in
> > > ALL CXF
> > > > examples - there is a common wsdl2java failure at generate-sources  
> > > maven
> > > > phase; e.g.,
> > > >
> > > > [ERROR] Failed to execute goal
> > > > org.apache.cxf:cxf-codegen-plugin:2.7.10:wsdl2java  
> > > (generate-sources) on
> > > > project camel-example-cxf: Execution generate-sources  
> > > of goal
> > > > org.apache.cxf:cxf-codegen-plugin:2.7.10:wsdl2java  
> > > failed: A required class
> > > > was missing while executing
> > > > org.apache.cxf:cxf-codegen-plugin:2.7.10:wsdl2java:  
> > > org/apache/cxf/Bus
> > > > [ERROR] -  
> > > > [ERROR] realm = plugin>org.apache.cxf:cxf-codegen-plugin:2.7.10  
> > > >
> > > > Tactics tried already:
> > > >
> > > > - versions of Xerces-J-bin (2.11, 2.8)
> > > > - add cxf-codegen-plugin:2.7.10 bundle
> > > > - add cxf-bundle-jaxrs-2.7.10 dependency (access to org.apache.cxf.Bus) 
> > > >  
> > > > - invoke compile goal from STS 3.4.0 & cmd line Apache Maven  
> 3.1.1
> > > > - Alternative jars added to "endorsed" java dir as well as  
> project
> > > > libs.
> > > >
> > > > Helpful pointers appreciated!
> > > >
> > > > Regards,
> > > >
> > > > /Dev
> > > >
> > >
> >
> >
>  



Re: camel-example-cxf* (all CXF examples)

2014-03-02 Thread Willem Jiang
I just tried to build the camel-example-cxf of camel-2.12.3, I didn’t get the 
error that you meet.
Can you remove the cxf jars from your maven repo to let the maven download a 
new version for you?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 1, 2014 at 4:40:03 PM, David Parker (dfpar...@gmail.com) wrote:
>  
> PS - using camel example rel 2.12.1 & rel 2.12.3
>  
>  
> On Sat, Mar 1, 2014 at 12:17 AM, David Parker  
> wrote:
>  
> > Camel experts,
> >
> > please point me in a helpful direction to resolve an issue in  
> ALL CXF
> > examples - there is a common wsdl2java failure at generate-sources  
> maven
> > phase; e.g.,
> >
> > [ERROR] Failed to execute goal
> > org.apache.cxf:cxf-codegen-plugin:2.7.10:wsdl2java  
> (generate-sources) on
> > project camel-example-cxf: Execution generate-sources  
> of goal
> > org.apache.cxf:cxf-codegen-plugin:2.7.10:wsdl2java  
> failed: A required class
> > was missing while executing
> > org.apache.cxf:cxf-codegen-plugin:2.7.10:wsdl2java:  
> org/apache/cxf/Bus
> > [ERROR] -  
> > [ERROR] realm = plugin>org.apache.cxf:cxf-codegen-plugin:2.7.10  
> >
> > Tactics tried already:
> >
> > - versions of Xerces-J-bin (2.11, 2.8)
> > - add cxf-codegen-plugin:2.7.10 bundle
> > - add cxf-bundle-jaxrs-2.7.10 dependency (access to org.apache.cxf.Bus)  
> > - invoke compile goal from STS 3.4.0 & cmd line Apache Maven 3.1.1  
> > - Alternative jars added to "endorsed" java dir as well as project  
> > libs.
> >
> > Helpful pointers appreciated!
> >
> > Regards,
> >
> > /Dev
> >
>  



Re: camel-dropbox

2014-02-26 Thread Willem Jiang
The camel-dropbox component is not in the apache-camel official kit yet, so we 
don’t have document in the apache camel website. 

BTW, I didn’t see the exact error message when you use camel route to move the 
file from you dropbox to the local folder.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 26, 2014 at 7:41:58 PM, Mark.Nelson (mark.nelson...@gmail.com) 
wrote:
>  
> Hi,
>  
> I have some questions about the camel-dropbox component.
> 1- Does DropBox component have the notion of idempotency like  
> file
> component?
>  
> 2- I want to get all files the exist in my dropbox and save them in  
> my local
> Folder. I used this route but I get some issue:
>  
> >  
> uri="dropbox://get?accessToken=&clientIdentifier=&remotePath=/"  
> />
>  
>  
> 3- Do you have any documentation about camel-dropbox component  
> that can help
> me?
>  
> Many thanks
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-dropbox-tp5748012.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



[ANNOUNCE] Apache Camel 2.12.3 Released

2014-02-25 Thread Willem Jiang
The Apache Camel project [1] is a powerful open source integration framework 
based on known Enterprise Integration Patterns [2]. 

The Camel community announces the immediate availability of the new patch 
release camel-2.12.3. 

The artifacts are published and ready for you to download [3] either from the 
Apache mirrors or from the Central Maven repository. 
For more details please take a look at the release notes [4]. 

Many thanks to the Camel community for the hard work. 

[1] http://camel.apache.org/ 
[2] http://camel.apache.org/enterprise-integration-patterns.html 
[3] http://camel.apache.org/download.html 
[4] http://camel.apache.org/camel-2123-release.html 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





Re: http4 component to convert ANY page encoding into UTF-8

2014-02-17 Thread Willem Jiang
Camel converter can take the encoding into consideration when it converts an 
input stream into String. I think you can leverage that.
Now what we need to do is adding a feature[1] in camel-http component to setup 
the encoding header of the message if it can tell it from the Http header.

[1]https://issues.apache.org/jira/browse/CAMEL-7217 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 17, 2014 at 7:20:13 PM, gutsal.arsen (gutsal.ar...@softsky.com.ua) 
wrote:
>  
> I'm using http4 component. Different pages comes with different  
> encoding. I'd
> like to analyze either Content-Type header or meta/@http-equiv=Content-Type  
> encoding attribute and convert everything into default UTF-8.  
> How could I do
> that? Probably patch for http4 component is needed (we could  
> create it). It
> will be abit ugly to analyze http content in the patch, but I don't  
> see any
> other way to do so.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/http4-component-to-convert-ANY-page-encoding-into-UTF-8-tp5747424.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



RE: what does META-INF.cxf mean? in import-package of osgi

2014-02-17 Thread Willem Jiang
It’s camel-cxf bundles, CXF bus can take care of it, you don’t need to specify 
it in your application bundle.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 17, 2014 at 5:12:19 PM, nono (yan.w...@db-is.com) wrote:
>  
> on my karaf
> list|grep cxf , show below, which is higher than 2.6. so i dont  
> need
> META-INF.cxf anymore?
> camel-cxf-transport (2.9.0.fuse-70-084)
> camel-cxf (2.9.0.fuse-70-084)
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/what-does-META-INF-cxf-mean-in-import-package-of-osgi-tp5747356p5747419.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



RE: what does META-INF.cxf mean? in import-package of osgi

2014-02-16 Thread Willem Jiang
You to need to specify package import of "META-INF.cxf” if you use CXF 2.6.x.
CXF bus can look up the files itself since then.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 17, 2014 at 2:33:41 PM, Siano, Stephan (stephan.si...@sap.com) 
wrote:
>  
> Actually it means that there is a directory META-INF/cxf that  
> is exported from some CXF bundle. A spring based scenario needs  
> to include some of the files in there with the scenario bundle's  
> classloader, therefore this import package is needed. The maven  
> bundle plugin cannot find this reference automatically (because  
> it is not referenced as a class from within the beans.xml), so  
> an explicit import is required from the configuration (the *  
> will take care of all references the bundle plugin can detect  
> automatically).
>  
> -Original Message-
> From: nono [mailto:yan.w...@db-is.com]
> Sent: Samstag, 15. Februar 2014 21:05
> To: users@camel.apache.org
> Subject: what does META-INF.cxf mean? in import-package of  
> osgi
>  
>  
> com.microsoft.sqlserver.jdbc,
> META-INF.cxf,
> *
>  
>  
> does it mean under META-INF, there is a file called cxf which defined  
> imported packages?
>  
>  
> Any hints?
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/what-does-META-INF-cxf-mean-in-import-package-of-osgi-tp5747356.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



RE: Confused with Camel in Spring/OSGI

2014-02-16 Thread Willem Jiang
Hi Franck,

Thanks for sharing these with us. This key to let Camel run with OSGi is inject 
the BundleContext rightly. Do you mind creating a simple patch with the test 
case to verify it? I’d be happy to review it and merge it to the master branch.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 17, 2014 at 1:58:54 AM, Mangin, Franck (franckman...@fico.com) 
wrote:
>  
> For anyone going through this thread in the future, Virgo is an  
> evolution of Spring DM. The BundleAware interface that camel-spring  
> is relying on has been moved into a different package in the embedded  
> Virgo version of Spring DM (somewhere under a blueprint package).  
>  
> The right approach then (which I have not tested) would be to create  
> a modified OsgiDefaultCamelContext that leverages that Virgo-specific  
> BundleAware interface. The OSGI detection in CamelNamespaceHandler  
> will have to be fixed accordingly 
> (Class.forName("org.apache.camel.osgi.CamelContextFactoryBean");  
> will fail).
>  
> Franck
>  
> -Original Message-
> From: Mangin, Franck [mailto:franckman...@fico.com]
> Sent: Thursday, February 13, 2014 6:55 AM
> To: users@camel.apache.org
> Subject: RE: Confused with Camel in Spring/OSGI
>  
> Thanks Willem, that clarifies things, I hadn't fully realized  
> that Spring DM is clearly distinct from spring.
>  
>  
>  
> I am a bit hesitant about bringing in Spring DM into the picture  
> for a couple reasons:
>  
> - Virgo comes with spring 3 installed (and uses it heavily), the  
> latest version of spring DM onMaven Central depends on spring  
> 2.5.6
>  
> - I am a bit concerned with spring DM / OSGI interactions messing  
> up internal Virgo spring wirings
>  
>  
>  
> I gave blueprint a try but Virgo ships with Gemini whereas the  
> Camel blueprint support has hard dependencies on Apache Aries...  
>  
>  
>  
> I think I can get the org.apache.camel.core.osgi.OsgiDefaultCamelContext  
> up and running: will that actually be useful without Spring DM  
> installed? Or is pretty much all the OSGI support in camel-spring  
> dependent on spring DM being deployed?
>  
> One example of what I would hope to achieve is to be able to register  
> / detect TypeConverters through OSGI mechanisms (classloaders  
> and/or registry)?
>  
>  
>  
> Thanks!
>  
> Franck
>  
>  
>  
> -Original Message-
> From: Willem Jiang [mailto:willem.ji...@gmail.com]
> Sent: Thursday, February 13, 2014 2:44 AM
> To: users@camel.apache.org
> Subject: RE: Confused with Camel in Spring/OSGI
>  
>  
>  
> Hi,
>  
>  
>  
> Current camel-spring are only tested with Spring-DM, camel-blueprint  
> could be an option for you if the Virgo server support the Blueprint  
> out of box, but you may not use the some advance features that spring  
> provides.
>  
>  
>  
>  
>  
> --
>  
> Willem Jiang
>  
>  
>  
> Red Hat, Inc.
>  
> Web: http://www.redhat.com
>  
> Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/)  
> (English)
>  
> http://jnn.iteye.com(http://jnn.javaeye.com/)  
> (Chinese)
>  
> Twitter: willemjiang
>  
> Weibo: 姜宁willem
>  
>  
>  
>  
>  
>  
>  
> On February 13, 2014 at 1:35:55 AM, Mangin, Franck (franckman...@fico.com)  
> wrote:
>  
> >
>  
> > Well, as far as I can tell (and I may definitely be missing something)  
>  
> > the state of OSGI support in camel-spring is in a pretty sorry  
> state
>  
> > of affair...
>  
> >
>  
> >
>  
> >
>  
> > camel-spring 2.12.2 depends on spring 3.1.0.RELEASE, but  
> it contains
>  
> > references to the BundleContextAware class which doesn't  
> seem to be
>  
> > supported anymore in spring 3.x. Trying to grab that class from  
> old
>  
> > org.springframework.osgi bundles doesn't help presumably  
> because
>  
> > nobody in spring 3 is paying attention to that interface anymore  
> so
>  
> > the injection of the bundle context doesn't happen.
>  
> >
>  
> >
>  
> >
>  
> > I tried to work around that by declaring my own CamelNamespaceHandler,  
>  
> > which registers my own CamelContextFactoryBean which obtains  
> the
>  
> > bundle context by other means.
>  
> >
>  
> > That however eventually fails because the org.apache.camel.core.osgi  
>  
> > p

Re: Jetty endpoint as ActiveMQ consumer

2014-02-13 Thread Willem Jiang
Hi,

I bet this page[1] can help you :)
[1] http://camel.apache.org/content-enricher.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 14, 2014 at 5:57:06 AM, scottdawson (sc.e.daw...@gmail.com) wrote:
>  
> Hello,
> I want to consume messages from an ActiveMQ queue using HTTP GET  
> via a Jetty
> endpoint. This will deploy:
>  
>  
>  
>  
>  
>  
> but the second "from" doesn't wait on the first "from", in other  
> words,
> messages are consumed from the queue as soon as they arrive, not  
> when the
> Jetty endpoint is called. (If I leave out the log line, I get an  
> error
> because "Route has no outputs".)
>  
> So, my basic question is... how do I invoke a consumer from another  
> consumer?
>  
> Thanks,
> Scott
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Jetty-endpoint-as-ActiveMQ-consumer-tp5747278.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Log component query

2014-02-12 Thread Willem Jiang
Hi,

The log component just log the message with the level that you set, it just as 
the common log.
If your log endpoint level is lower then the category configuration, the log 
message won’t appear. 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 13, 2014 at 4:56:33 AM, gilboy (josephoto...@gmail.com) wrote:
>  
> Hi
>  
> Assume in my route I have the following line:
> DEBUG*"/>  
>  
> Now assume in my application that I have configured the category  
> org.apache.camel.example to have a log level of *INFO*.
>  
> Is it the case that it will only be in the route where logging for  
> this
> category will be *DEBUG *and all logging for this category outside  
> this
> route will have a log level of *INFO*?
>  
> Thanks
> Joe
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Log-component-query-tp5747211.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Resume an Endpoint in a Route

2014-02-12 Thread Willem Jiang
It’s not a good idea, the custom processor blocks the whole camel route 
processor chain, which could introduce some performance issue.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 13, 2014 at 9:35:33 AM, eswar (easwaramoor...@gmail.com) wrote:
>  
>  
> more specifically, I am not sure if we can do something like this,  
> which is
> to resume the route after a delay. I am not able to use RoutingPolicy  
> as the
> time is a dynamic component and my routes are defined in the Spring  
> XML.
>  
> Processor(Exchange exchange) {
> exchange.setProperty(exchange.ROUTE_STOP, Boolean.TRUE);  
> Thread.currentThread().sleep(4000);
> System.out.println(" Restart the route ... ");
> exchange.setProperty(exchange.ROUTE_STOP, Boolean.FALSE);  
> }
>  
>  Restart the route ...
> [melRoute) thread #2 - vm://ssh] SedaConsumer WARN Error
> processing exchange. Exchange[file.1]. Caused by:
> [java.util.NoSuchElementException - null]
> java.util.NoSuchElementException
> at java.util.ArrayList$Itr.next(Unknown Source)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:77)  
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)  
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)  
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
>   
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
>   
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)  
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)  
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at
> org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291)
>   
> at
> org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200)  
> at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147)  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown  
> Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown  
> Source)
> at java.lang.Thread.run(Unknown Source)
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Resume-an-Endpoint-in-a-Route-tp5747151p5747208.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: how apache-cxf overwrites jaxws-ri

2014-02-12 Thread Willem Jiang
Hi,
Fuse ESB is using CXF for the JAXWS implementation by default.
If you want to jaws-ri from JDK, you need to hack the jre.properties to let 
Fuse ESB see the ri packages. I’m not sure if there is somebody did that before.



--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 12, 2014 at 6:40:31 PM, nono (yan.w...@db-is.com) wrote:
>  
> Dear all,
>  
> I am using a web service which using jaxws-ri instead of apache-cxf,  
>  
> but i deployed it into fuse-esb which has camel-cxf installed  
> by default
>  
> then i found out. apache-cxf is used during runtime in instead  
> of jaxws-ri,
> although i did not use camel-cxf in my bundle
>  
> how to avoid it?
> any hints are more than welcom!
>  
> Thanks!
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/how-apache-cxf-overwrites-jaxws-ri-tp5747175.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



RE: Confused with Camel in Spring/OSGI

2014-02-12 Thread Willem Jiang
Hi,

Current camel-spring are only tested with Spring-DM, camel-blueprint could be 
an option for you if the Virgo server support the Blueprint out of box, but you 
may not use the some advance features that spring provides.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 13, 2014 at 1:35:55 AM, Mangin, Franck (franckman...@fico.com) 
wrote:
>  
> Well, as far as I can tell (and I may definitely be missing something)  
> the state of OSGI support in camel-spring is in a pretty sorry  
> state of affair...
>  
>  
>  
> camel-spring 2.12.2 depends on spring 3.1.0.RELEASE, but it  
> contains references to the BundleContextAware class which  
> doesn't seem to be supported anymore in spring 3.x. Trying to  
> grab that class from old org.springframework.osgi bundles  
> doesn't help presumably because nobody in spring 3 is paying  
> attention to that interface anymore so the injection of the bundle  
> context doesn't happen.
>  
>  
>  
> I tried to work around that by declaring my own CamelNamespaceHandler,  
> which registers my own CamelContextFactoryBean which obtains  
> the bundle context by other means.
>  
> That however eventually fails because the org.apache.camel.core.osgi  
> package is not exported by camel-spring.
>  
>  
>  
> Looks like the smartest thing to do will be to give up on spring  
> configuration alltogether and create my own Camel context manually.  
>  
>  
>  
> There is a lot valuable code in org.apache.camel.core.osgi  
> and in org.apache.camel.osgi, it is too bad that it is apparently  
> only tested and working on karaf.
>  
> If someone know what the proper equivalent to BundleContextAware  
> is in spring 3 is I could provide a modified bean factory if that  
> is of interest.
>  
>  
>  
> Franck
>  
>  
>  
> -Original Message-
> From: Claus Ibsen [mailto:claus.ib...@gmail.com]
> Sent: Wednesday, February 12, 2014 3:29 PM
> To: users@camel.apache.org
> Subject: Re: Confused with Camel in Spring/OSGI
>  
>  
>  
> Hi
>  
>  
>  
> Camel works the best in Apache Karaf as its OSGi container.
>  
> That is what we use for development and testing.
>  
>  
>  
> There may be some caveats and issues running in Eclipse Virgo.  
>  
>  
>  
> If it does not matter for you which osgi container, then I suggest  
> to use Apache Karaf
>  
>  
>  
>  
>  
> On Wed, Feb 12, 2014 at 1:47 PM, franck102 >  
> wrote:
>  
> > I am trying to use Camel 2.12. in a Virgo server, using spring/OSGI  
>  
> > since Virgo's blueprint is based on Gemini.
>  
> >
>  
> > The context.xml file below sucessfully starts a camel context...  
>  
> > however breaking in the code shows that I am instantiating a  
>  
> > SpringCamelContext rather than a 
> > org.apache.camel.core.osgi.OsgiDefaultCamelContext.  
>  
> >
>  
> > It looks like I want the org.apache.camel.osgi.CamelContextFactoryBean  
>  
> > to create my camel context, but I just can't figure out how to  
> tell
>  
> > Spring to use that factory. I have read hundreds of posts about  
> camel,
>  
> > spring & OSGI and I just can't figure this out, any help would  
> be greatly appreciated!
>  
> >
>  
> > I am using maven and having dependencies on camel-core and camel-spring.  
>  
> > It looks like osgi support has been embedded into camel-spring,  
> and so
>  
> > I should not need or want dependencies on camel-core-osgi or  
> camel-osgi?
>  
> >
>  
> >
>  
> >  
>  
> >
>  
> > >  
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
>  
> > xsi:schemaLocation="
>  
> > http://www.springframework.org/schema/beans
>  
> > http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
>  
> > http://camel.apache.org/schema/spring
>  
> > http://camel.apache.org/schema/spring/camel-spring.xsd";>  
>  
> >
>  
> > >  
> > xmlns="http://camel.apache.org/schema/spring";>
>  
> > >  
> > uri="seda:mcedits?multipleConsumers=true"/>
>  
> >
>  
> >  
>  
> >  
>  
> >  
>  
> >  
>  
> >  
>  
> >  
>  
> >  
>  
> >  
>  
> >  
>  
> >
>  
> >  
>  
> >  
>  
> >
>  
> >
> 

Re: Resume an Endpoint in a Route

2014-02-12 Thread Willem Jiang
I think split the route into two route could be a better solution.
In this way you can get the full control of how and when put the messages into 
the DB.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 13, 2014 at 9:25:56 AM, eswar (easwaramoor...@gmail.com) wrote:
>  
> Thanks Andrzej, I think asynchronous delayer could be an option,  
> will try
> that. And yes Queues would be an overhead here.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Resume-an-Endpoint-in-a-Route-tp5747151p5747213.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Camel swallows Error

2014-02-12 Thread Willem Jiang
I think you need share us with your test case, it could be more easy for us to 
dig the issue.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 12, 2014 at 11:55:19 AM, Rural Hunter (ruralhun...@gmail.com) wrote:
>  
> 2.12.2
>  
> 于 2014/2/12 11:31, Willem Jiang 写道:
> > The default value is true,
> > BTW, which version of Camel are you using?
> >
> > --
> > Willem Jiang
> >
> > Red Hat, Inc.
> > Web: http://www.redhat.com
> > Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/)  
> (English)
> > http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)  
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> >
> >
>  
>  



Re: Camel swallows Error

2014-02-11 Thread Willem Jiang
The default value is true, 
BTW, which version of Camel are you using?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 12, 2014 at 10:49:53 AM, Rural Hunter (ruralhun...@gmail.com) wrote:
>  
> hmm...I didn't set it manually. Is that default to false?
>  
> 于 2014/2/12 10:21, Willem Jiang 写道:
> > I just checked the code and found an interesting thing.
> >
> > public class DefaultSpringErrorHandler implements ErrorHandler  
> {
> >
> > private final LoggingExceptionHandler handler;
> > private final boolean logStackTrace;
> >
> > public DefaultSpringErrorHandler(Class owner, LoggingLevel  
> level, boolean logStackTrace) {
> > this.handler = new LoggingExceptionHandler(owner, level);  
> > this.logStackTrace = logStackTrace;
> > }
> >
> > @Override
> > public void handleError(Throwable throwable) {
> > if (logStackTrace) {
> > handler.handleException("Execution of JMS message listener  
> failed", throwable);
> > } else {
> > handler.handleException("Execution of JMS message listener  
> failed. Caused by: [" + throwable.getMessage() + "]", null);  
> > }
> > }
> >
> > }
> >
> > I double you set the jms configure option errorHandlerLogStackTrace  
> to be false.
> > You can get the full stack trace if you set the option to true.  
> >
> > --
> > Willem Jiang
> >
> > Red Hat, Inc.
> > Web: http://www.redhat.com
> > Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/)  
> (English)
> > http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)  
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> >
> >
>  
>  



Re: Camel swallows Error

2014-02-11 Thread Willem Jiang
I just checked the code and found an interesting thing.

public class DefaultSpringErrorHandler implements ErrorHandler {

    private final LoggingExceptionHandler handler;
    private final boolean logStackTrace;

    public DefaultSpringErrorHandler(Class owner, LoggingLevel level, 
boolean logStackTrace) {
        this.handler = new LoggingExceptionHandler(owner, level);
        this.logStackTrace = logStackTrace;
    }

    @Override
    public void handleError(Throwable throwable) {
        if (logStackTrace) {
            handler.handleException("Execution of JMS message listener failed", 
throwable);
        } else {
            handler.handleException("Execution of JMS message listener failed. 
Caused by: [" + throwable.getMessage() + "]", null);
        }
    }

}

I double you set the jms configure option errorHandlerLogStackTrace to be false.
You can get the full stack trace if you set the option to true.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 11, 2014 at 4:17:21 PM, Rural Hunter (ruralhun...@gmail.com) wrote:
>  
> Sorry for late response. I was in vacation. I ran your test and  
> checked
> the stack trace output and found some difference with the one  
> I got
> problem.
>  
> Stacktrace with your test:
> org.apache.camel.CamelExecutionException: Exception occurred  
> during
> execution on the exchange: Exchange[Message: Hello World]  
> at
> org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1368)
>   
> at
> org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:283)  
> at
> org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:66)
>   
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
>   
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)  
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)  
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at
> org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291)
>   
> at
> org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200)  
> at
> org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147)  
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>   
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>   
> at java.lang.Thread.run(Thread.java:744)
> Caused by: java.lang.NoClassDefFoundError
> at org.apache.camel.util.ProcessorFail.process(ProcessorFail.java:26)  
> at
> org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
>   
> ... 11 more
>  
> It indicates the exception is thrown in DelegateSyncProcessor.  
> But in
> the error log of my problem, I found it's in DelegateAsyncProcessor.  
> I
> don't know in which case Camel uses DelegateSyncProcessor and  
> DelegateAsyncProcessor. Could that cause the different behavior?  
>  
> 2014-01-23 18:06:04 WARN Camel (camel-1) thread #0 -
> JmsConsumer[com.test.new]
> org.apache.camel.component.jms.EndpointMessageListener  
> - Execution of
> JMS message listener failed. Caused by
> : [org.apache.camel.CamelExecutionException - Exception  
> occurred during
> execution on the exchange: Exchange[JmsMessage[JmsMessageID:  
> ID:test-ubt-43737-1390470192665-1:1:5:1:1]]]
> org.apache.camel.CamelExecutionException: Exception occurred  
> during
> execution on the exchange: Exchange[JmsMessage[JmsMessageID:  
> ID:test-ubt-43737-1390470192665-1:1:5:1:1]]
> at
> org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1368)[camel-core-2.12.2.jar:2.12.2]
>   
> at
> org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:283)[camel-core-2.12.2.jar:2.12.2]
>   
> at
> org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:66)[camel-core-2.12.2.jar:2.12.2]
>   
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.2.jar:2.12.2]
>   
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.2.jar:2.12.2]
>   
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.2.jar:2.12.2]
>  

Re: Camel Stomp Component with Spring DSL

2014-02-10 Thread Willem Jiang
If you want use Spring DSL you need to include the camel-spring into your class 
path.
Camel component API is pluggable, it has nothing to do with the Spring DSL, you 
just need to specify the right URI to let camel context load the camel-stomp 
endpoint for you.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 11, 2014 at 2:54:26 PM, Ed Spree (edward_sp...@cable.comcast.com) 
wrote:
>  
> Hi all,
>  
> I looked on the stomp component page on the Camel website and really  
> would
> like to use the capability to have the messages posted to the ActiveMQ  
> broker from a web service converted to a message that follows  
> the STOMP
> protocol. In reading the page and doing further research, it  
> appears that
> there is not much discussion regarding using this feature with  
> Spring DSL.
>  
> So I have a few questions...
> 1) Is it possible right now with the latest version of Camel (2.12.2)  
> for a
> Spring DSL implementation to use the Camel Stomp component?  
> 2) If it is possible, what libraries would I need to import into  
> ActiveMQ/Camel in order to accomplish this task?
>  
> Thanks for the help,
> Ed Spree
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-Stomp-Component-with-Spring-DSL-tp5747056.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: akka-camel jetty producer: getting exception which I am not able to catch

2014-02-10 Thread Willem Jiang
Hi,

It looks like a akka actor logging issue, instead of camel apache issue.
Please ask this question in akka user mailing list.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 11, 2014 at 2:10:39 PM, rajvaibhav (rajvaibhav@gmail.com) wrote:
>  
> Use case: I have a REST endpoint which is developed with Spray  
> Routing. It
> receives requests from clients and for some services it calls  
> another REST
> service which is hosted on another server. After receiving response  
> from
> remote REST service it does some processing and returns the result  
> back to
> the client.
>  
> Implementation: can be found at
> https://github.com/rajvaibhav/akka-camel-producer-example.git  
>  
> I am getting "Internal server error" after calling
> http://localhost:8080/ping. I am not able to trace the Exception  
> or the
> cause. Probably I am not able to configure akka-camel properly.  
> The
> application is running properly if I remove the askakka-camel  
> Producer code
> from the application.
>  
> Please help me find the issue. I also need help in how to log any  
> uncaught
> exception in an actor.
>  
> Any help appreciated!
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/akka-camel-jetty-producer-getting-exception-which-I-am-not-able-to-catch-tp5747061.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: CXF component attachment support for POJO not implemented as specified

2014-02-07 Thread Willem Jiang
It makes sense, I just filled a JIRA[1] for it.

[1]https://issues.apache.org/jira/browse/CAMEL-7181

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 8, 2014 at 9:35:48 AM, yirco (netswengin...@yahoo.com) wrote:
>  
> Hi,
>  
> the CXF description states:
>  
> http://camel.apache.org/cxf.html#CXF-AttachmentSupport  
>  
>  
> Attachment Support
>  
> "/POJO Mode:
>  
> Attachments are propagated to Camel message's attachments  
> since 2.1. So, it
> is possible to retreive attachments by Camel Message API
>  
> DataHandler Message.getAttachment(String id)/"
>  
> However, /org.apache.camel.component.cxf.DefaultCxfBinding/  
> explicitly
> excludes attachments propagation for POJOs. This makes processing  
> legacy
> SOAP with attachments more difficult.
>  
> I suggest easing the condition for POJOs that do not use MTOM:  
>  
> if dataFormat is POJO and properties.mtom-enabled is false,  
> propagate the
> attachments into and from the camel Exchange.
>  
> Thank you.
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/CXF-component-attachment-support-for-POJO-not-implemented-as-specified-tp5746952.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Camel 2.12 : MongoDB - pre-existing indexes being dropped when using "dynamicity"

2014-01-29 Thread Willem Jiang
Hi,

If you don’t know the collection, can you just skip the setting of collection?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 29, 2014 at 5:36:20 PM, mads64738 (ma...@yakatak.com) wrote:
>  
> Willem.Jiang wrote
> > Hi,
> >
> > You can find more information about the change in this JIRA[1]  
> > [1]https://issues.apache.org/jira/browse/CAMEL-6000  
>  
> Hi Willem,
>  
> Many thanks for your reply. I've reviewed the ticket and sort-of  
> understand
> the intent of the change.
>  
> However, it doesn't make sense to me that, when I apply the
> 'dynamicity=true' parameter on a pre-existing collection  
> with pre-existing
> indexes, that for a 'findall', the first thing I see on the database  
> is a
> call to drop the indexes.
>  
> I am using the 'dynamicity=true' to be able to programmatically  
> switch
> between my Mongo collections by setting the collections header.  
> If this is
> not the intent of this flag, your thoughts would be appreciated.  
>  
> Best regards, Madhu.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-2-12-MongoDB-pre-existing-indexes-being-dropped-when-using-dynamicity-tp5746575p5746592.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: camel-cxf , return complex type object problem

2014-01-29 Thread Willem Jiang
Hi nono,

I just ran a test with a simple echo invocation.
                        // Get the parameter list
                        List parameter = in.getBody(List.class);
                        // Get the operation name
                        String operation = 
(String)in.getHeader(CxfConstants.OPERATION_NAME);
                        Object result = operation + " " + 
(String)parameter.get(0);
                        // Put the result back as a Array
                        Object[] results = new Object[]{result};
                        exchange.getOut().setBody(results);

May be you can share your stack trace and test case here.

 
新春快乐!

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 29, 2014 at 6:03:01 PM, nono (yan.w...@db-is.com) wrote:
>  
> Hi Willem,
>  
> sorry. i tried again. does not work for me
> could you please post your workable sample test here?
>  
> Thanks!
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-cxf-return-complex-type-object-problem-tp5746478p5746595.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Running camel Route in multiple threads

2014-01-29 Thread Willem Jiang
Basically when you start the camel route, camel will build up a processor chain 
to process the message, this processor chain is invoked from the “from” 
endpoint.
As the camel timer component cannot fire the invocation in multiple threads at 
the same time, you need to take advantage of camel asyn API[1] and thread 
DSL[1] to let other thread keep doing the invocation of the process chains.

[1]http://camel.apache.org/async.html

-- 
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 29, 2014 at 9:21:17 PM, Tarun Kumar (agrawal.taru...@gmail.com) 
wrote:
>  
> Hi,
>  
> I want to run my camel route in multiple threads.
>  
>  
>  
>  
>  
>  
>  
> Is there any way i can run same route in multiple threads. basically  
> same
> route execute parallely in multiple threads.
>  
> Thanks,
> Tarun
>  



Re: camel-cxf , return complex type object problem

2014-01-29 Thread Willem Jiang
Hi,

I just did a simple test, setting the result into an Object Array works as 
expect.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 29, 2014 at 2:49:25 PM, nono (yan.w...@db-is.com) wrote:
>  
> Hi
> It worked with List , but failed with Array.
>  
>  
> ArrayList pls = new ArrayList();
> for (String s : names) {
> Person p = new Person();
> p.setName(s);
> pls.add(p);
> }
> ArrayList wrapperList = new ArrayList();
> wrapperList.add(pls);
> Object[] objs = new Object[]{pls};
> exchng.getOut().setBody(objs);
> // exchng.getOut().setBody(wrapperList);
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-cxf-return-complex-type-object-problem-tp5746478p5746573.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Camel 2.12.2 crashes on activemq restart

2014-01-29 Thread Willem Jiang
This warning messages are expected. 
Does the camel route work again when the ActiveMQ server
 is back online ?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 29, 2014 at 3:36:27 PM, Rural Hunter (ruralhun...@gmail.com) wrote:
>  
> Hi,
>  
> My route is quite simple:
> from(REQUEST_QUEUE).process(processor1).process(processor2).process(processor3).to(COMPLETE_QUEUE)
> REQUEST_QUEUE and COMPLETE_QUEUE are both activemq queues.  
> It runs fine
> normaly. But when I restart activmq, I found my Camel application  
> just
> exited with this log:
>  
> 2014-01-29 15:23:02 WARN Camel (camel-1) thread #0 -
> JmsConsumer[queue.request]
> org.apache.camel.component.jms.DefaultJmsMessageListenerContainer  
> -
> Setup of JMS message listener invoker failed for destination  
> 'queue.request' - trying to recover. Cause: java.io.EOFException  
> 2014-01-29 15:23:02 WARN Camel (camel-1) thread #2 -
> JmsConsumer[queue.complete]
> org.apache.camel.component.jms.DefaultJmsMessageListenerContainer  
> -
> Setup of JMS message listener invoker failed for destination  
> 'queue.complete' - trying to recover. Cause: java.io.EOFException  
> 2014-01-29 15:23:02 ERROR Camel (camel-1) thread #2 -
> JmsConsumer[queue.complete]
> org.apache.camel.component.jms.DefaultJmsMessageListenerContainer  
> -
> Could not refresh JMS Connection for destination 'queue.complete'  
> -
> retrying in 5000 ms. Cause: Could not connect to broker URL:
> tcp://localhost:61616. Reason: java.net.ConnectException:  
> Connection
> refused.
> 2014-01-29 15:23:02 ERROR Camel (camel-1) thread #0 -
> JmsConsumer[queue.request]
> org.apache.camel.component.jms.DefaultJmsMessageListenerContainer  
> -
> Could not refresh JMS Connection for destination 'queue.request'  
> -
> retrying in 5000 ms. Cause: Could not connect to broker URL:
> tcp://localhost:61616. Reason: java.net.ConnectException:  
> Connection
> refused.
>  
> I tried to use failover broker url(failover:tcp://localhost:61616)  
> but
> same thing happened. I also tried to use jms component instead  
> of
> activemq component but still got the same result.
>  



Re: Camel 2.12 : MongoDB - pre-existing indexes being dropped when using "dynamicity"

2014-01-28 Thread Willem Jiang
Hi,

You can find more information about the change in this JIRA[1]
[1]https://issues.apache.org/jira/browse/CAMEL-6000

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 29, 2014 at 9:31:53 AM, mads64738 (ma...@yakatak.com) wrote:
>  
> Hello,
>  
> Over the last 15 months, we have been successfully operating  
> one of our
> platforms using Camel 2.9.1/2.10.1. Recently, we have upgraded  
> each of our
> processes to use Camel 2.12.2, and in the main, this has been a  
> very
> straightforward process.
>  
> Unfortunately, we have observed some unexpected behaviour  
> within one of our
> processes, on two routes which interact with MongoDB, when using  
> the
> "dynamicity=true" flag - our indexes are being dropped!
>  
> Here is an example of what we're seeing - our routes are externally  
> configured using a properties file:
>  
> route.database.contentcollection.findall={{database.root}}&collection=collection&operation=findAll&dynamicity=true
>   
> route.database.contentcollection.update={{database.root}}&collection=collection&operation=update&dynamicity=true
>   
>  
> To note, "collection" does not exist, it is replaced within our  
> route with a
> computed collection (code sample):
>  
> bean( contentLink, ContentLink.GET_CONTENT_COLLECTION_NAME  
> ).
> setHeader( "CamelMongoDbCollection", body() ).
> bean( contentLink, ContentLink.CREATE_OTHER_DOCUMENT_QUERY  
> ).
> to( "{{route.database.contentcollection.findall}}" ).  
>  
> Within the MongoDB logs, we are seeing this:
>  
> Tue Jan 28 22:22:35 [conn42] query content.feedcontent query:  
> { _id:
> ObjectId('5217d372300420b0c1218750') } ntoreturn:1 idhack:1  
> reslen:4668 0ms
> Tue Jan 28 22:22:35 [conn42] run command content.$cmd { deleteIndexes:  
> "matchinfo", index: "*" }
> Tue Jan 28 22:22:35 [conn42] CMD: dropIndexes content.matchinfo  
> Tue Jan 28 22:22:35 [conn42] command content.$cmd command:  
> { deleteIndexes:
> "matchinfo", index: "*" } ntoreturn:1 reslen:106 0ms
> Tue Jan 28 22:22:35 [conn42] query content.matchinfo query:  
> { ... query is
> here... } reslen:20 80ms
>  
> "matchinfo" is computed by the bean.
>  
> If I set the route to use "collection=matchinfo" directly, without  
> any
> "dynamicity", the database query behaves as intended, as per  
> this example:
>  
> Tue Jan 28 22:23:29 [conn47] query content.feedcontent query:  
> { _id:
> ObjectId('5217d372300420b0c1218750') } ntoreturn:1 idhack:1  
> reslen:4668 0ms
> Tue Jan 28 22:23:30 [conn47] query content.matchinfo query:  
> { ... query is
> here... } reslen:20 88ms
>  
>  
> Using Camel 2.9.1/2.10.1, we do not experience this problem.  
> Using the
> grepcode website and comparing "MongoDbEndpoint.java" code  
> with a pre-2.12.x
> version, I can see there is new code within the "initializeConnection()"  
> which calls "ensureIndex". This appears to be controlled via  
> a parameter
> "collectionIndex".
>  
> 'ensureIndex' issues a command to drop the index, irrespective  
> of whether
> there are subsequent parameters set up an index.
>  
> I've attempted to add "&collectionIndex=" to set this to an 'empty'  
> value,
> but this does not appear to override the 'ensureIndex' call.  
>  
> Has anyone else experienced this behaviour? Are there any additional  
> parameters we should set on the routes with dynamicity to stop  
> this
> behaviour (or revert to pre 2.12.x behaviour)?
>  
> Any thoughts or assistance would be greatly appreciated.
>  
> Best regards, Madhu.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-2-12-MongoDB-pre-existing-indexes-being-dropped-when-using-dynamicity-tp5746575.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: camel-cxf , return complex type object problem

2014-01-28 Thread Willem Jiang
Yes, you are right.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 28, 2014 at 7:24:46 PM, nono (yan.w...@db-is.com) wrote:
>  
> you mean i need to do something like this?
>  
> ArrayList wraplist=new new ArrayList();
> wraplist.add(fileList );
> exchng.getOut().setBody( wraplist);
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-cxf-return-complex-type-object-problem-tp5746478p5746531.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Queries on jetty server

2014-01-26 Thread Willem Jiang
Current we don’t have camel-tomcat component, if you want to implement it 
yourself, you can take a look at the code of camel-jetty component. Basically 
you just need to replace the start stop jetty server code with tomcat.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 27, 2014 at 1:15:20 PM, bijoy (bijoy.chaudh...@gmail.com) wrote:
>  
> I understood that using servlet component we can deploy services  
> onto any
> servlet container.
>  
> But I want to use camel to handle tomcat instance just like it does  
> for
> jetty using camel:jetty component. Using camel I want to start/stop  
> tomcat
> and also want to get logs/statuses from tomcat. I guess with camel:bean  
> component we can start/stop tomcat service through some scripts  
> but how to
> get statuses of tomcat routed back to camel. Actually I want to  
> use camel as
> controller layer to control all transactions/tasks.
>  
> Is it somehow easily achievable?
>  
> Regards,
> Bijoy
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Queries-on-jetty-server-tp5746394p5746483.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Camel versus Spring Integration

2014-01-26 Thread Willem Jiang
Please check out the answer[1] in the stack overflow.

[1]http://stackoverflow.com/questions/3034054/when-to-use-spring-integration-vs-camel

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 26, 2014 at 5:25:27 PM, davidrobert (davidrfi...@gmail.com) wrote:
>  
> We are building an application which reads from a database, transforms  
> into
> XML, and then places messages onto a topic for an external system.  
> For this
> use case, would there be any reasons to favour Camel over Spring  
> Integration? Also, in general, what advantages, if any, does  
> Camel have over
> Spring Integration?
>  
> A related question: for development using Spring projects such  
> as Batch,
> Data and XD, how seamless would it be to use Camel with these technologies,  
> in comparison to Spring Integration.
> Thanks
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-versus-Spring-Integration-tp5746477.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: camel-cxf problem exception

2014-01-25 Thread Willem Jiang
Hi,

I don’t found the getPDFs operation for the SEI.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 11, 2014 at 4:15:46 PM, nono (yan.w...@db-is.com) wrote:
>  
> Dear all,I encounter a camel-cxf 's cxf:bean problemit seems  
> , it works with
> return type as pojo but failed with ListI got example at karaf  
> like Below.
> Could anyone give some hints?Thanks in advance!WARNING: Interceptor  
> for
> {http://ws.foo.com/}FileServiceService#{http://ws.fuse.emerald.dbis.com/}getPDFs
>   
> has thrown exception, unwinding noworg.apache.cxf.interceptor.Fault  
> at
> org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:107)
>   
> at
> org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
>   
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>   
> at
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
>   
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:26Below
>   
> are my blueprint and example
> code##define  
> web service Endpoint //define route , using cxf:bean , the real  
> web service will be implemented by com.foo.camel.FileProcessor  
> public class FileProcessor implements Processor { @Override  
> public
> void process(Exchange exchng) throws Exception { //
> ... it works with return type as pojo but failed with List  
> // List fileList = results;
> exchng.getOut().setBody( fileList ); } catch (Exception e)  
> {
> throw new FileNotFoundException("Something goes wrong in  
> "
> +this.getClass().getName(), e); } }}// proxy web serivce,  
> cxf:bean
> refers to itimport javax.jws.WebMethod;import javax.jws.WebParam;import  
> javax.jws.WebResult;import javax.jws.WebService;import  
> java.util.List;/** *
> */@WebServicepublic class FileService { /** * Web service operation  
> */ @WebMethod(operationName = "getfile") @WebResult(name  
> = "file")
> public ReceivedPDF getfile(@WebParam(name = "fileName")  
> String fileName)
> throws Exception{ //TODO write your implementation code here:  
> return null; } /** * Web service operation */
> @WebMethod(operationName = "getfiles") @WebResult(name  
> = "files")
> public List getfiles(@WebParam(name = "fileNames") List fileNames)  
> throws
> Exception{ return null; } }
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-cxf-problem-exception-tp5745851.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  



Re: Apache Camel v2.12 | CXF Component | Basic Authentication | Web Service

2014-01-24 Thread Willem Jiang
FYI, I just add two new options (username, password)[1] to the CXF URI.
You can setup URI for basic authentication information.

[1]https://issues.apache.org/jira/browse/CAMEL-7145

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 24, 2014 at 3:28:27 PM, manchandap (manchan...@yahoo.com) wrote:
>  
> Was able to get this working by adding the following code to the  
> Route
> Builder. I am using Java DSL:
>  
> Map properties = new HashMap();  
>  
> AuthorizationPolicy authPolicy = new AuthorizationPolicy();  
> authPolicy.setAuthorizationType(HttpAuthHeader.AUTH_TYPE_BASIC);  
> authPolicy.setUserName(USERNAME);
> authPolicy.setPassword(PWD);
> authPolicy.setAuthorization("true");
>  
> //properties.put(AuthorizationPolicy.class.getName(),  
> authPolicy);
>  
> properties.put("org.apache.cxf.configuration.security.AuthorizationPolicy",  
> authPolicy);
>  
> CxfEndpoint myCxfEp = (CxfEndpoint)getContext().getEndpoint("cxf://");  
> myCxfEp.setProperties(properties);
>  
> Thanks and Regards
> P Manchanda
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-v2-12-CXF-Component-Basic-Authentication-Web-Service-tp5746233p5746435.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Looking to determine where Camel can help us

2014-01-21 Thread Willem Jiang
Hi,

You can have a look at the camel cxf examples[1] which can address some of your 
concern.
BTW, CXF support the SOAP and REST at the same time.

[1]http://camel.apache.org/cxf-example.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 20, 2014 at 10:39:54 PM, metazone (metazon...@gmail.com) wrote:
>  
> - I was going to develop a pub/sub EventListener where, when a  
> business logic
> object needed to send notification ot other systems, it would  
> do so by
> publishing & listeners (java objects - Adapters) would get the  
> notification.
> The Adapters would transform the msg (and potentially read from  
> db) and then
> make the call - using REST, SOAP-based (JAX-WS, JAXB), etc. Can  
> Apache
> Camel provide much value-added in the implementation here?  
> - Our app will be using existing SOAP-based web services (which  
> may have a
> RESTful interface) + we're exposing our services as both SOAP  
> and REST.
> - Can we get a single interface defined for a service and then switch  
> easily
> between REST, JMS, SOAP-based calls w/ minimal code (let engine  
> do it for
> us)?
> - Does Camel's transform help that much - e.g. parsing the msg  
> doesn't seem
> to be a big deal but ...
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Looking-to-determine-where-Camel-can-help-us-tp5746251.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Apache Camel v2.12 | CXF Component | Basic Authentication | Web Service

2014-01-21 Thread Willem Jiang
Hi,

If you set the cxfEndpoint property in a processor, it’s a setting of runtime.
As the CxfProducer is created during the camel context start the route, the 
cxfEndpoint’s property is not updated.

My suggestion is you set the cxfEndpoint property in the route builder 
configure method instead of a processor. 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 20, 2014 at 2:12:21 PM, P Manchanda (manchan...@yahoo.com) wrote:
>  
> Respected Camel Experts,
>  
> I am trying to access a web service that requires basic authentication.  
> I am able to access using the CXF's JaxWsDynamicClientFactory.  
> The code piece for auth looks like:
>  
> JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();  
> Client client = dcf.createClient(ID_WSDL);
>  
> HTTPConduit conduit= (HTTPConduit) client.getConduit();  
> AuthorizationPolicy authorization = conduit.getAuthorization();  
> authorization.setUserName(USERNAME);
> authorization.setPassword(PWD);
>  
> conduit.setAuthorization(authorization);
>  
>  
> However, when I try to use Camel's CXF component to access the  
> same Web Service I get 401 Unauthorized error, since Camel is  
> not sending the authentication information to the Web Service.  
>  
> My route looks like:
>  
> from("file://c:/test?fileName=request.txt&noop=true").routeId("myrouteId")  
> .process(processor)
> .to(cxf)
> .to("log:{body}");
>  
> In my processor, I am setting the credentials as follows:
>  
> Map properties = new HashMap();  
>  
> AuthorizationPolicy authPolicy = new AuthorizationPolicy();  
> authPolicy.setAuthorizationType(HttpAuthHeader.AUTH_TYPE_BASIC);  
> authPolicy.setUserName(USERNAME);
> authPolicy.setPassword(PWD);
>  
> properties.put("org.apache.cxf.configuration.security.AuthorizationPolicy",  
> authPolicy);
> myEndpoint.setProperties(properties);
>  
> myEndpoint is CXFEndpoint, retrieved from Exchange.
>  
> Am I missing something or something wrong here.
>  
> ___
> Thks & brgds
> P Manchanda
> Mobile: +91-9911152374
>  



Re: Questions about cxfrs

2014-01-21 Thread Willem Jiang

On January 22, 2014 at 5:14:40 AM, David (wakarima...@gmail.com) wrote:
> > When my route attempts to invoke Service2, the URI is set to:  
> http://localhost:8080/service2/service2path/service1/service1path,  
> where
> service1/service1path is configured in my.Service1. I'm also  
> not sure why
> I'm providing a serviceClass for rsClient. I thought maybe it  
> was going to
> instantiate my service, but that doesn't seem to be the case.  
>  

If you routing the response of first service to second service, you may need to 
clean up the CamelHttpPath message header.

-- 
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem




Re: camel activemq, POJO producer is null

2014-01-19 Thread Willem Jiang
You can put the bean definition into the Blueprint file which holds 
camelContext definition.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 18, 2014 at 9:54:59 PM, m.mcinness1 (m.mcinne...@gmail.com) wrote:
>  
> Thanks, Claus, for lending an ear to these very basic questions.  
> I really
> appreciate the help.
>  
> Do I need to reference the activemq bean in my > class="com.foo.MyBean" />? 
> Does MyBean need to be instantiated  
> in any
> special way?
>  
> Is there, perhaps, a fully-working example bundle out there  
> that I could
> refer to?
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-activemq-POJO-producer-is-null-tp5746075p5746203.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Splitter with parallelProcessing and exectorService for each Exchange being split

2014-01-19 Thread Willem Jiang
The executorService of Splitter is set when splitter definition creates the 
processor.
So the exectorService per Splitter processor not per each exchange.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 20, 2014 at 5:21:11 AM, hshicx (hs-...@hicxsolutions.com) wrote:
>  
> Hi,
>  
> I am wondering if the executorService (configured using execuotServiceRef)  
> is shared among the different Exchanges being split using the  
> same route. I
> am aware that execuotServiceRef will look up for a
> *ThreadPoolProfileSupport* in the Registry if an exectorService  
> with the
> same id is not found in the regisrty and create a new executorService.  
> I am
> not sure about the behavior of the ThreadPoolProfileSupport  
> however. Does
> it create a new executorService for each Exchange being split  
> (which what I
> want) or one executorService per route which is then shared by  
> all
> Exchanges?
>  
> Thanks a lot,
> Hs
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Splitter-with-parallelProcessing-and-exectorService-for-each-Exchange-being-split-tp5746223.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Camel XMPP and ActiveMQ

2014-01-19 Thread Willem Jiang
You can find more information here[1][2]

[1]http://camel.apache.org/xmpp.html
[2]http://camel.apache.org/jms.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 20, 2014 at 5:47:55 AM, gadido30 (gadid...@gmail.com) wrote:
>  
> Hi All,
>  
> I want to connect ActiveMQ and StandAlone Camel,
> Dose Camel with XMPP send messages two way , I mean send and receive  
> from
> xmpp server?
>  
>  
> I will be glad for simple guide how to connect between camel and  
> ActiveMQ?
>  
> Best Regards
> Gadi
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-XMPP-and-ActiveMQ-tp5746225.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Moving Objects between Active MQ queues using Camel Routes

2014-01-15 Thread Willem Jiang
Did you put the Student.class into the class path of camel context?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 16, 2014 at 2:06:05 PM, contactreji (contactr...@gmail.com) wrote:
>  
> Hi
> I am trying to move contents of one queue to another queue.
>  
> The source queue contains Java object.
>  
> My came route is as follows
> *
>  
>  
>  
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
> xmlns:amq="http://activemq.apache.org/schema/core";
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd  
> http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd  
> http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd";>  
>  
>  
> > class="org.apache.activemq.camel.component.ActiveMQComponent">  
> > />
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> *
>  
>  
> It OBJECT.QUEUE1 contains an object of class Student.
>  
>  
> *
> Student.java Class
> -
>  
> package com.queueshifter.camel.activemq.queueshifter;  
>  
> import java.io.Serializable;
>  
> import javax.xml.bind.annotation.XmlAccessorType;
> import javax.xml.bind.annotation.XmlAttribute;
> import javax.xml.bind.annotation.XmlElement;
> import javax.xml.bind.annotation.XmlRootElement;
>  
>  
> @XmlAccessorType
> @XmlRootElement
> public class Student implements Serializable{
>  
> //@XmlElement
> String name;
>  
> //@XmlElement
> int rollNo;
> public String getName() {
> return name;
> }
> public void setName(String name) {
> this.name = name;
> }
> public int getRollNo() {
> return rollNo;
> }
> public void setRollNo(int rollNo) {
> this.rollNo = rollNo;
> }
>  
> }
>  
> *
>  
>  
> I get following error while running the routes.
>  
> Any ideas will be very helpful
>  
> Cheers
> Reji
>  
>  
> *
> [0 - JmsConsumer[OBJECT.QUEUE2]] EndpointMessageListener  
> WARN
> Execution of JMS message listener failed. Caused by:
> [org.apache.camel.RuntimeCamelException - Failed to extract  
> body due to:
> javax.jms.JMSException: Failed to build body from content.  
> Serializable
> class not available to broker. Reason: java.lang.ClassNotFoundException:  
> com.poc.camel.jaxb.Student. Message: ActiveMQObjectMessage  
> {commandId = 7,
> responseRequired = true, messageId =
> ID:D-113043114-56208-1389845707678-3:1:1:1:3, originalDestination  
> =
> queue://OBJECT.QUEUE, originalTransactionId = null, producerId  
> =
> ID:D-113043114-56208-1389845707678-3:1:1:1, destination  
> =
> queue://OBJECT.QUEUE2, transactionId = null, expiration  
> = 0, timestamp =
> 1389845710753, arrival = 0, brokerInTime = 1389851883384,  
> brokerOutTime =
> 1389851883384, correlationId = null, replyTo = null, persistent  
> = true, type
> = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId  
> =
> null, compressed = false, userID = null, content =
> org.apache.activemq.util.ByteSequence@12cd7ba, marshalledProperties  
> =
> org.apache.activemq.util.ByteSequence@106fe2b, dataStructure  
> = null,
> redeliveryCounter = 0, size = 0, properties = {firedTime=Thu  
> Jan 16 09:45:09
> IST 2014, breadcrumbId=ID-D-113043114-56207-1389845706616-0-1,  
> CamelJmsDeliveryMode=2}, readOnlyProperties = true, readOnlyBody  
> = true,
> droppable = false}]
> org.apache.camel.RuntimeCamelException: Failed to extract  
> body due to:
> javax.jms.JMSException: Failed to build body from content.  
> Serializable
> class not available to broker. Reason: java.lang.ClassNotFoundException:  
> com.poc.camel.jaxb.Student. Message: ActiveMQObjectMessage  
> {commandId = 7,
> responseRequired = true, messageId =
> ID:D-113043114-56208-1389845707678-3:1:1:1:3, originalDestination  
> =
> queue://OBJECT.QUEUE, originalTransactionId = null, producerId  
> =
> ID:D-113043114-56208-1389845707678-3:1:1:1, destination  
> =
> queue://OBJECT.QUEUE2, transactionId = null, expiration  
> = 0, timestamp =
> 1389845710753, arrival = 0, brokerInTime = 1389851883384,  
> brokerOutTime =
> 1389851883384, correlationId = null, replyTo = null, persistent  
> = true, type
> = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId  
> =
> null, compressed = false, userID = null, content =

Re: Setting a soap action on SoapJaxbDataFormat

2014-01-15 Thread Willem Jiang
The soap header value is taken from the message object, I don’t think you can 
set the soap header from the message header directly.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 16, 2014 at 2:58:36 PM, gangaaloori (ganga.alo...@gmail.com) wrote:
>  
> Hi Willem,
>  
> I understand that soap headers and http headers are different  
> but my
> question is, is it possible to set soap header values using
> soapjaxbdataformat?
>  
> Thanks,
> Ganga
>  
>  
>  
> -
> Thanks,
> Ganga Aloori
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Setting-a-soap-action-on-SoapJaxbDataFormat-tp5665112p5746017.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: As of Today twitter requires SSL - is it a setting for Camel Twitter component?

2014-01-14 Thread Willem Jiang
Which version of Camel are you using?
I just checked the code, the default setting of usingSSL of Twitter4j 3.0.5 is 
true.
Current camel-twitter component doesn’t have API to set usingSSL, I just filled 
a JIRA[1] to provide that option and enable the SSL by default.

[1]https://issues.apache.org/jira/browse/CAMEL-7134

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 15, 2014 at 9:19:47 AM, heregear (e...@heregear.com) wrote:
>  
> Hi.
>  
> Is there a way to enable SSL for Camel Twitter component?
>  
> FYI: as of today Twitter is requiring SSL connections. The Camel  
> Twitter
> component no longer works, and I can't see a way to enable ssl.  
>  
> Twitter4j directly works, and I've validated this by scrapping  
> my use of
> using it directly both with and without ssl enabled...without  
> it enabled,
> connection is refused 403, every time...
>  
> Thanks.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/As-of-Today-twitter-requires-SSL-is-it-a-setting-for-Camel-Twitter-component-tp5745967.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: netty + dataformat + exchange headers guidance needed

2014-01-12 Thread Willem Jiang
Normally DataFormat marshall and unmarshall don’t take the exchange header into 
consideration.
If your customer DataFormat does some work on the exchange header, you need to 
set the transferExchange option to be true.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 12, 2014 at 2:43:35 AM, Joan Picanyol i Puig (lists-ca...@biaix.org) 
wrote:
>  
> Hi,
>  
> We are integrating with a server which speaks an ASCII (but not  
> line)
> based request-reply protocol over TCP sockets. Basic communication  
> with
> a custom dataformat & netty looks OK and we'd like now to use a unique  
> counter which is sent over the wire for all requests to verify  
> received
> replies.
>  
> Our test route looks like
>  
> from("direct:a").marshal().custom("mydf")
> .to("netty:tcp://192.168.100.24:30303?encoder=#be&decoder=#bd&sync=true&requestTimeout=1000").
>   
> .unmarshal().custom("mydf").to("log:result");
>  
> We have tried is setting the counter as an exchange header in
> DataFormat.marshal() and validate it in DataFormat.unmarshal()  
> but it is
> coming as null.
>  
> We are ovbisouly misunderstanding what an Exchange is in this  
> setup,
> could anyone give some clues?
>  
> tks
> --
> pica
>  



Re: Camel cxf with basic authentication

2014-01-07 Thread Willem Jiang
It could be difficult to access the wsdl if you don’t setup the http conduit 
for it.

You can setup the by setting the CxfEndpoint property like this

CxfEndpoint cxfEndpoint = camelContext.getEndpoint(“cxf:xxx”);
// set the authentication information
Map properties = new HashMap();
  
org.apache.cxf.configuration.security.AuthorizationPolicy authPolicy = new 
AuthorizationPolicy();
authPolicy.setUserName(username);
authPolicy.setPassword(password);
properties.put(AuthorizationPolicy.class.getName(), authPolicy);

cxfEndpoint.setProperties(properties);    

from(“xxx”).to(cxfEndpoint);


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 7, 2014 at 7:10:44 PM, akshattandon (akshat@gmail.com) wrote:
>  
> Thanks Jiang for the response
>  
> can you please provide the java dsl code to achieve the same as  
> we don't use
> spring .
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-cxf-with-basic-authentication-tp5745620p5745666.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: CXF : Camel 2.12.2 : Karaf 3.0.0 : Soap-Timeout

2014-01-07 Thread Willem Jiang
Hi Thomas,

If the route can work in Karaf 2.3.3 instead of Karaf 3.0.0.
I think it’s bug of PaxWeb which provide the Servlet OSGi service.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 8, 2014 at 3:36:38 AM, Freihalter Thomas 
(thomas.freihal...@my-box.de) wrote:
>  
> Hello guys,
>  
> I am using Karaf 3.0.0 and Camel 2.12.2
>  
> If I send a Soap-Envelope to Jetty, the response
> contains a '8000' before the Soap-Envelope.
>  
> What does this mean and how can I avoid this?
> SoapUi (and my jQuery-Client) is running into timeout.
>  
> With Karaf 2.3.3 everything is okay (no '8000').
>  
> That's my route:
>  
>  
>  
>  
>  
> I guess this is related to the response-size, because a mirroring  
> response works (no '8000'):
>  
>  
>  
>  
>  
>  
> best regards
> Thomas
>  
>  
> SoapUi Http-Log:
>  
> >> "POST /cxf/XmlTransfer HTTP/1.1[\r][\n]"
> >> "Accept-Encoding: gzip,deflate[\r][\n]"
> >> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
> >> "SOAPAction: ""[\r][\n]"
> >> "Content-Length: 846[\r][\n]"
> >> "Host: localhost:8181[\r][\n]"
> >> "Connection: Keep-Alive[\r][\n]"
> >> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"  
> >> "[\r][\n]"
> >> "> >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";  
> >> xmlns:ns="http://xmltransfer.util.com";>[\n]" "
> >> [\n]" " [\n]" "
> >> [\n]" " ...[\n]"  
> >> " ?[\n]"
> >> " [\n]"
> >> " [\n]"
> >> " "
> << "HTTP/1.1 200 OK[\r][\n]"
> << "Content-Type: text/xml;charset=UTF-8[\r][\n]"
> << "Transfer-Encoding: chunked[\r][\n]"
> << "Server: Jetty(8.1.14.v20131031)[\r][\n]"
> << "[\r][\n]"
> << "8000[\r][\n]"
> << "> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>...  
> << ""  
> << "[\r][\n]"
>  
>  
>  



Re: Camel cxf with basic authentication

2014-01-06 Thread Willem Jiang
You can add below lines into the spring configuration file

http://cxf.apache.org/configuration/security";
  xmlns="http://cxf.apache.org/transports/http/configuration";>
  
     myuser
     mypasswd
     Basic
  


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 6, 2014 at 6:50:52 PM, Akshat Tandon (akshat@gmail.com) wrote:
>  
> Hi All,
>  
> I'm new to Apache Camel and CXF,
>  
> I'm trying to create a route for querying a remote WS which requires  
> Basic
> Authentication and to specify the SoapAction header.
>  
> I was able to achieve the same using camel http component but i  
> needed the
> same with camel cxf in java dsl .
>  
>  
> Example the sample url is
>  
> https://demo017.service-now.com/u_ntq001.do?WSDL
>  
> username/password ==> admin/admin
>  
> Can anyone guide us in fixing the same
>  
>  
> *Thanks and RegardsAkshat Tandon*
>  



Re: Is there a way to debug in Eclipse Groovy scripts in Camel-Language component?

2014-01-05 Thread Willem Jiang
Hi,

I’m not sure if you can debug the Groovy scripts with CamelContext in Eclipse.
But I think you can debug the scripts by using Groovy Eclipse plugin.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 6, 2014 at 6:58:11 AM, bocamel (johnz...@gmail.com) wrote:
>  
> Using groovy scripts in Camel Language component
> (uri="language://groovy:resource:classpath:x.groovy")  
> turned out to be a
> very powerful and flexible way to add business logic into a production  
> Camel
> route. One can do just about anything in the groovy scripts without  
> having
> to rebuild the application. But such scripts cannot be debugged  
> easily in
> Eclipse, it seems. Does anyone know a way to step through such  
> groovy
> scripts in Eclipse? Thanks for any help!
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Is-there-a-way-to-debug-in-Eclipse-Groovy-scripts-in-Camel-Language-component-tp5745570.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Master Slave Camel-ActiveMQ

2014-01-02 Thread Willem Jiang
There is one shortcoming of the Zookeeper policy, the route is started before 
the route policy get a chance to stop the consumer.

If you are using JBoss Fuse, you can try to camel master component[1], it just 
starts the master component at the first place.

[1]https://access.redhat.com/site/documentation/en-US/JBoss_Fuse/6.0/html/EIP_Component_Reference/files/Master.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 3, 2014 at 9:43:13 AM, Preethi (preethi.krishna...@gmail.com) wrote:
>  
> I have been trying to use zookeeper but it looks like the camel  
> route on the
> slave, which is subscribing to the IBM MQ,still runs. I could  
> see the
> exception below when I start the slave.
>  
> Cause: JMSWMQ0026: Failed to subscribe to topic '#/#/ITEM/MAINT'  
> using
> MQSUB.; nested exception is com.ibm.mq.MQException: JMSCMQ0001:  
> WebSphere MQ
> call failed with compcode '2' ('MQCC_FAILED') reason '2429'  
> ('MQRC_SUBSCRIPTION_IN_USE').
>  
> This means that the slave is connecting the IBM MQ even with the  
> zookeeper
> route policy enabled. Is there a way I can have a single route running  
> at a
> time among multiple similar routes?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Master-Slave-Camel-ActiveMQ-tp5745360p5745453.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Getting ClassCastException in Camel route while handling response containing java.util.List

2014-01-02 Thread Willem Jiang
No, you don’t need to change the signature.
When you set the response result into the message body, you need to wrap the 
result into a List just like this

List books ...
List resultList = new ArrayList();
resultList.add(books);
exchange.getOut().setBody(resultList);

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 2, 2014 at 8:45:33 PM, sanjbh (san...@gmail.com) wrote:
>  
> Willem,
>  
> I tried changing the signature to List> getBooks();  
> but that
> didn't work. So I tried creating a wrapper class that wraps the  
> List
> and named it Books and changed the method to Books getBooks().  
> But still I
> am getting the ClassCastException as follows:
>  
> org.apache.cxf.interceptor.Fault: org.test.cxfws.domain.Book  
> cannot be cast
> to org.test.cxfws.domain.Books
>  
> Thanks.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Getting-ClassCastException-in-Camel-route-while-handling-response-containing-java-util-List-tp5745393p5745434.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: How can I call a web service with no parameters via a producerTemplate?

2014-01-02 Thread Willem Jiang

As you set the invocation parameter as POJO list, you need to set the 
dataFormate to be POJO.
Because camel-cxf default data format is POJO, removing the endpointUri option 
of dataFormat should work for you.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 2, 2014 at 5:51:07 PM, viral.patel69 (viral.pa...@algorhythm.co.in) 
wrote:
>  
> Done Required changes still have some issue.
> String endpointUri=
> "cxf://http://localhost:8081/buzzor-service/services/ApplicationService?";  
> +
> "wsdlURL=http://localhost:8081/buzzor-service/services/ApplicationService?wsdl&";
>   
> +
> "serviceName={http://service.application.buzzor.atpl.com}ApplicationService&"; 
>  
> +
> "portName={http://service.application.buzzor.atpl.com}ApplicationServiceHttpPort&";
>   
> + "dataFormat=MESSAGE";
>  
> Exchange exchange = template.request(endpointUri, new Processor()  
> {
> public void process(final Exchange exchange) {
> List oList = new ArrayList();
> oList.add("Hello");
> exchange.getIn().setBody(oList);
> exchange.getIn().setHeader(CxfConstants.OPERATION_NAME,  
> "getApplication");
> exchange.getIn().setHeader(CxfConstants.OPERATION_NAMESPACE,  
> "http://service.application.buzzor.atpl.com";);
> exchange.getIn().setHeader(Exchange.FILE_NAME, "testFile");  
> exchange.getIn().setHeader("requestObject",
> new DefaultCxfBinding());
> SOAPMessage message = processSOAP(exchange);
> System.out.println(message);
>  
> }
> });
>  
>  
> *Now i got an same error
>  
> org.apache.camel.InvalidPayloadException: No body available  
> of type:
> java.io.InputStream but has value: [Hello] of type: java.util.ArrayList  
> on:
> Message: [Hello]. Caused by: No type converter available to  
> convert from
> type: java.util.ArrayList to the required type: java.io.InputStream  
> with
> value [Hello]. Exchange[Message: [Hello]]. Caused by:
> [org.apache.camel.NoTypeConversionAvailableException  
> - No type converter
> available to convert from type: java.util.ArrayList to the  
> required type:
> java.io.InputStream with value [Hello]]*
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-can-I-call-a-web-service-with-no-parameters-via-a-producerTemplate-tp4806257p5745425.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Getting ClassCastException in Camel route while handling response containing java.util.List

2014-01-02 Thread Willem Jiang
You need to put the Book List into another List, as camel-cxf use list to hold 
the response for handling the InOut parameters.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 1, 2014 at 8:10:26 PM, sanjbh (san...@gmail.com) wrote:
>  
> I have a Camel route exposed as a CXF web service. This is a bottom  
> up web
> service and has an operation like so:
>  
> List getBooks();
>  
> The CXF endpoint is defined as:
>  
> > address="http://localhost:9045/bookservice";
> serviceClass="org.test.cxfws.service.BookDBService">  
>  
>  
> The operation queries a list of books and returns it to the caller.  
> The
> Camel route looks like this:
>  
>  
>  
>  
>  
> ${header.operationName} == 'getBooks'  
>  
>  
>  
>  
>  
>  
>  
> After running the route, I am getting the following exception:  
>  
> *org.apache.cxf.interceptor.Fault: org.test.cxfws.service.Book  
> cannot be
> cast to java.util.List *at
> org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:117)
>   
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
>   
> at
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
>   
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
>   
> ...
>  
> *Caused by: java.lang.ClassCastException: org.test.cxfws.service.Book  
> cannot
> be cast to java.util.List at
> *org.test.cxfws.service.GetBooksResponse_WrapperTypeHelper1.createWrapperObject(Unknown
>   
> Source) at
> org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:101)
>   
>  
> I can see that the getBooks method from the bean wsImpBean is executed  
> and
> the result being returned at the end of the choice block inside  
> the route:
>  
> [ qtp1653072092-14] outboundSoapResponse INFO Exchange[ExchangePattern:  
> InOut, BodyType: java.util.ArrayList, Body:
> [org.test.cxfws.service.Book@63f1858b, org.test.cxfws.service.Book@5769bf0,  
> org.test.cxfws.service.Book@2df7ac5d, org.test.cxfws.service.Book@5f55253e,  
> org.test.cxfws.service.Book@4f003a57]]
>  
> Can someone help me to understand why the ClassCastException.  
>  
> Thanks.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Getting-ClassCastException-in-Camel-route-while-handling-response-containing-java-util-List-tp5745393.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: How can I call a web service with no parameters via a producerTemplate?

2014-01-02 Thread Willem Jiang
Please use exchange.getIn() instead of exchange.getOut() in the process method.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 2, 2014 at 4:14:40 PM, viral.patel69 (viral.pa...@algorhythm.co.in) 
wrote:
>  
> Dear,
>  
> I also want to call third party web service using camel but i am  
> unable to
> call.
>  
> I have tried two things
>  
> First is:Creating SOAP String manually.
>  
> Exchange exchange = template.request(endpointUri, new Processor()  
> {
> public void process(final Exchange exchange) throws Exception  
> {
>  
> exchange.getIn()
> .setBody(
> "> xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\";>"  
> + "> xmlns:ns1=\"http://service.application.buzzor.atpl.com\";>"  
> + "> xmlns=\"http://service.application.buzzor.atpl.com\";>hello  
> world"
> + "");  
>  
> }
> });
> return exchange;
>  
> This code will call Web Service but instead of creating manually  
> string when
> i have tried bellow code for calling web service it will give an  
> error
>  
> String url =
> "cxf://http://localhost:8081/buzzor-service/services/ApplicationService?";  
> +
> "wsdlURL=http://localhost:8081/buzzor-service/services/ApplicationService?wsdl&";
>   
> +
> "serviceName={http://service.application.buzzor.atpl.com}ApplicationService&"; 
>  
> +
> "portName={http://service.application.buzzor.atpl.com}ApplicationServiceHttpPort&";
>   
> + "dataFormat=MESSAGE";
> Exchange exchange = template.request(url, new Processor()  
> {
> public void process(final Exchange exchange) {
>  
> exchange.getOut().setBody("Hello");
> exchange.getOut().setHeader(CxfConstants.OPERATION_NAME,  
> "getApplication");
> exchange.getOut().setHeader(CxfConstants.OPERATION_NAMESPACE,  
> "http://service.application.buzzor.atpl.com";);
> exchange.getOut().setHeader(Exchange.FILE_NAME, "testFile");  
> exchange.getOut().setHeader("requestObject",
> new DefaultCxfBinding());
>  
> }
> });
> return exchange;
>  
>  
> *Exception is "org.apache.camel.InvalidPayloadException:  
> No body available
> of type: java.io.InputStream on: Message: [Body is null]. Caused  
> by: No type
> converter available to convert from type: null to the required  
> type:
> java.io.InputStream with value null. Exchange[Message: Hello].  
> Caused by:
> [org.apache.camel.NoTypeConversionAvailableException  
> - No type converter
> available to convert from type: null to the required type:
> java.io.InputStream with value null]"*
>  
> Can any one help me to resolved my problem.
>  
> Thanks in Advance.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-can-I-call-a-web-service-with-no-parameters-via-a-producerTemplate-tp4806257p5745421.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: CXF SOAP web service - Basic Authentication - username password

2014-01-01 Thread Willem Jiang
Can I have a look at your camel route?
It looks like the Karaf Servlet transport doesn’t put username and password 
into the message context.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 2, 2014 at 4:39:51 AM, Sheck, Jacob (jacob.sh...@windlogics.com) 
wrote:
>  
> I have configured a CXF web service using blueprint, with wsdl2java  
> and it works well.
> > />
> I would like to add http basic authentication, when working with  
> jetty I can get the username and password from the camel headers,  
> and pass the values through my authentication bean. The web service  
> used by cxf and camel in karaf does not expose the username and  
> password this way.
>  
> Could anyone explain, or direct me to an example, of how to get  
> the basic authentication http request header values from a request  
> to a cxf web service in karaf?
>  
> Thank You
> Jacob Sheck
>  
> 
>  
> CONFIDENTIALITY NOTICE: This e-mail message is for the sole  
> use of the intended recipient(s) and may contain confidential  
> and privileged information. Any unauthorized review, use,  
> disclosure or distribution of any kind is strictly prohibited.  
> If you are not the intended recipient, please contact the sender  
> via reply e-mail and destroy all copies of the original message.  
> Thank you.
>  



Re: Trying to consume SOAP WS with UTF-8 content, getting "Invalid UTF-8 middle byte 0x3c"

2014-01-01 Thread Willem Jiang
Hi,

You can set the Content-Type through the request message context like this
public void process(final Exchange exchange) {
                Map requestContext = new HashMap();
                requestContext.put("Content-Type", 
"application/soap+xml;charset=UTF-8");
                exchange.getIn().setHeader(“RequestContext" , requestContext);
                
                exchange.getIn().setBody("http://schemas.xmlsoap.org/soap/envelope/\";>"
                                 + "http://cxf.component.camel.apache.org/\";>"
                                 + "http://cxf.component.camel.apache.org/\";>hello world"
                                 + "");
            }

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 1, 2014 at 10:25:30 PM, jannecamel (jann...@iki.fi) wrote:
>  
> I dug a little deeper. I activated cxf component's loggingFeatureEnabled  
> property. Seems that the response from the WS is encoded with  
> ISO-8859-1:
>  
> request:
>  
> 014-01-01 16:10:01,055 | INFO | ler-ura_Worker-1 | UraPort  
> | 132 - org.apache.cxf.cxf-api - 2.6.8 | Outbound Message
> ---
> ID: 1
> Address: http://localhost:8080/integraatiot-ws-1.0-SNAPSHOT/UraImpl  
> Content-Type: text/xml
> Headers: {Accept=[*/*],
> breadcrumbId=[ID-vagrant-lubuntu-quantic-42829-1388585068316-7-3],  
> fireTime=[Wed Jan 01 16:10:00 EET 2014], jobDetail=[JobDetail  
> 'DEFAULT.quartz-endpoint82': jobClass:
> 'org.apache.camel.component.quartz.CamelJob isStateful:  
> false isVolatile:
> false isDurable: false requestsRecovers: false],
> jobInstance=[org.apache.camel.component.quartz.CamelJob@3d722847],  
> jobRunTime=[-1], mergedJobDataMap=[org.quartz.JobDataMap@509f17b6],  
> nextFireTime=[Wed Jan 01 16:11:00 EET 2014], refireCount=[0],  
> scheduledFireTime=[Wed Jan 01 16:10:00 EET 2014],
> scheduler=[org.quartz.impl.StdScheduler@236312f7], trigger=[Trigger  
> 'Camel.uraDelegoinnitJob': triggerClass: 'org.quartz.CronTrigger  
> isVolatile: false calendar: 'null' misfireInstruction: 0  
> nextFireTime: Wed
> Jan 01 16:11:00 EET 2014], triggerGroup=[Camel],
> triggerName=[uraDelegoinnitJob]}
> Payload:  
> > xmlns:ns3="http://eura2014.fi/ura/xsd/1.0";>
>  
> ...
>  
>  
>  
>  
> response:
>  
> 2014-01-01 16:15:01,019 | INFO | ault-workqueue-1 | UraPort  
> | 132 - org.apache.cxf.cxf-api - 2.6.8 | Inbound Message
> 
> ID: 6
> Response-Code: 200
> Encoding: ISO-8859-1
> Content-Type: text/xml;charset=ISO-8859-1
> Headers: {Content-Length=[2306], content-type=[text/xml;charset=ISO-8859-1],  
> Date=[Wed, 01 Jan 2014 14:15:01 GMT], Server=[Apache-Coyote/1.1]}  
> Payload: > 
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>somfoostuffkuvaus  
> jossa viimeinen merkki on skandiÄ
>  
> When I test the same WS with SoapUI, I get the response in UTF-8.  
>  
> Date Wed, 01 Jan 2014 12:47:22 GMT
> Content-Length 2306
> #status# HTTP/1.1 200 OK
> Content-Type application/soap+xml;charset=UTF-8
> Server Apache-Coyote/1.1
>  
> SoapUI seems to have preferences for "request properties / encoding"  
> and
> this results in http header
> "Content-Type:application/soap+xml;charset=UTF-8". And  
> this changes the
> actual WS to return UTF-8 instead of ISO-8859-1.
>  
> Can I configure camel / cxf component to request for UTF-8 encoding  
> as well?
> I could not find a quick param for that at
> http://camel.apache.org/cxf.html#CXF-Thedescriptionsofthedataformats  
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Trying-to-consume-SOAP-WS-with-UTF-8-content-getting-Invalid-UTF-8-middle-byte-0x3c-tp5745394p5745396.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: SOAP Web service Calling using camel.

2013-12-30 Thread Willem Jiang
Hi,

You can find a simple example here[1]

[1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 31, 2013 at 3:12:11 PM, viral.patel69 
(viral.pa...@algorhythm.co.in) wrote:
>  
> Dear Willem Jiang,
>  
> Still I am not able to call Web Service Please help me.
>  
> Thanks in Advance.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/SOAP-Web-service-Calling-using-camel-tp5745180p5745371.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Master Slave Camel-ActiveMQ

2013-12-30 Thread Willem Jiang
Hi,

You don’t need to let the Slave run when the Master is in charge. I think you 
can take a look at the camel-zookeeper[1].

[1]http://camel.apache.org/zookeeper.html#Zookeeper-ZooKeeperenabledRoutepolicy.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 31, 2013 at 9:45:04 AM, Preethi (preethi.krishna...@gmail.com) 
wrote:
>  
> Hi
>  
> We are trying to setup Master slave for ActiveMQ using camel-context.  
> Our
> current architecture is like this.
>  
>  
> 1. A camel route which subscribes to MQ topics (these MQ topics  
> are IBM
> topics).
> 2. This camel route then takes the message from the topic and transforms  
> it
> 3. The transformed message is saved in the database.
>  
> I have been trying to setup master slave but have not been successful  
> so
> far. This is what I'm doing
>  
> A.An instance of this application deployed on tomcat.
> B.The slave is just another instance of this same application.Please  
> note
> that the clientids and the subscriber names are the same on both  
> these
> instances. Hence the slave would give the following exception  
> , which is
> expected.
>  
> Cause: JMSWMQ0026: Failed to subscribe to topic '#/#/ITEM/MAINT'  
> using
> MQSUB.; nested exception is com.ibm.mq.MQException: JMSCMQ0001:  
> WebSphere MQ
> call failed with compcode '2' ('MQCC_FAILED') reason '2429'  
> ('MQRC_SUBSCRIPTION_IN_USE').
>  
>  
> We are using the default KahaDBPersistenceAdapter . The issue  
> here is that
> the slave container runs for few hours and just dies due to insufficient  
> java heap space.
> I was trying to configure the kahadb adapter to not poll every  
> 2-3 seconds ,
> which it seems to be doing , but haven't been successful so far.  
>  
> How do I configure the kahadb to poll during longer intervals  
> (say 5 mins)?
> Or are there any more options other than the kahadb for this Master  
> Slave
> setup?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Master-Slave-Camel-ActiveMQ-tp5745360.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Question about using message headers/Exchange properties and route testing

2013-12-30 Thread Willem Jiang
Hi,

I don’t think you need to use mock framework to mock the bean.
You can just write a simple bean which implement the bean’s interface to setup 
the message headers and exchange properties for you camel route.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 30, 2013 at 4:36:53 PM, Stephan Burkard (sburk...@gmail.com) wrote:
>  
> Hi Camel users
>  
> To process arbitrary logic in my Camel routes, I use simple bean  
> calls.
> That is fine because I can test all these pieces of logic with standard  
> unit tests.
>  
> However, often the bean calls produce results that are saved  
> in the message
> header (if I need to save it for later) or Exchange properties  
> (if it is
> only needed in the current route).
>  
> So my bean methods often look like this:
> public void setDocumentGuid(@Headers Map  
> headers);
>  
> The header-map is passed to add new headers, the method is simply  
> called
> with "bean(bean, method)" in the route.
>  
> My problem arised in the route tests where I mock away the whole  
> bean. I
> can mock the method call, but I cannot add entries to the header-  
> or
> property-maps. So if the header or property entry is expected  
> later in the
> route, it fails.
>  
> Therefore I moved to bean methods like this:
> public String setDocumentGuid();
>  
> The header-map is no more needed, since the header value is returned  
> and
> the method is called with "setHeader(headerKey, bean(bean,  
> method)" in the
> route. Now I can return whatever I like from the mock.
>  
> But the problem returns if
>  
> #1: I have multiple values or objects I would like to save. I cannot  
> return
> them in the method (without creating a "transport object" or  
> returning a
> map), so I need to add them to the headers or properties in the method,  
> but
> then they are not existing when I mock the method call.
>  
> #2: I would like to test a subroutes (direct:) that is expecting  
> Exchange
> properties from the parent route. I cannot easily set these properties  
> for
> the tests of the subroute (I probably could by injecting a processor  
> for
> the test that sets them, but the most simple test would become  
> quite
> complex).
>  
> I would like to only test the correct message flow with route tests  
> and
> therefore mock away all beans (that are already tested with unit-tests),  
> but since my beans set message headers or properties they are  
> like a
> route-extension and needed to execute the route correctly.  
>  
> Am I missing a basic Camel concept? How do you draw the line between  
> route
> with headers/properties and "external" components like beans?  
>  
> Thanks for any help
> Stephan
>  



Re: writing a csv file

2013-12-26 Thread Willem Jiang
Hi,

Can you show us the code of calypsox.reports.CsvReportsHandler?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 27, 2013 at 3:26:04 AM, keepcl123 (keepcl...@gmail.com) wrote:
>  
> Hi,
>  
> I want to read a csv file from the file directory into a java bean,  
> do some
> work on the data (a List) and then save the data to a new csv file.  
>  
> I mange to do the first part (unmarshal) , but I don't know how to  
> do the
> part of writing the file after I finished my work on it (marshal  
> ).
> Here is my code , but I get en exception on the marshal part : "can  
> not
> convert from a String to a Map"
>  
>  
> > class="calypsox.reports.CsvReportsHandler" />
> > id="report1">
> > location="BLLresources/reports.properties" />
>  
>  
> > uri="file:{{report1.incoming.directory}}?preMove={{report1.inprogress.directory}}&move=
> >   
> {{report1.done.directory}}&moveFailed={{report1.failed.directory}}"  
> />
>  
>  
>  
> > />
>  
>  
>  
>  
> > />
>  
>  
>  
> Can you help ?
> Thx
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/writing-a-csv-file-tp5745260.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: SOAP Web service Calling using camel.

2013-12-26 Thread Willem Jiang
For the SOAP fault, it looks there are something wrong with the request message.
I guess you put the request into a file, so I want to know how do you generate 
the request?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 26, 2013 at 4:58:52 PM, viral.patel69 
(viral.pa...@algorhythm.co.in) wrote:
>  
> Dear Willem,
>  
> First of all Thanks for reply.
>  
> I have done some example using Java DSL.
>  
> from("file:d:\\input?noop=true")
> .marshal()
> .string()
>  
> .to("cxf://http://192.168.2.66:8081/buzzor-service/services/ApplicationService?";
>   
> +
> "wsdlURL=http://192.168.2.66:8081/buzzor-service/services/ApplicationService?wsdl&";
>   
> +
> "serviceName={http://service.application.buzzor.atpl.com}ApplicationService&"; 
>  
> +
> "portName={http://service.application.buzzor.atpl.com}ApplicationServicePortType&";
>   
> + "defaultOperationName=getApplication&"
> + "dataFormat=MESSAGE").process(new Processor() {
>  
> @Override
> public void process(Exchange arg0) throws Exception {
> InputStream io = (InputStream) arg0.getIn().getBody();
> // char c;
> StringBuffer ssf = new StringBuffer();
> BufferedReader reader = new BufferedReader(
> new InputStreamReader(io, "UTF-8"));
> int charT = -1;
>  
> while ((charT = reader.read()) != -1) {
> ssf.append((char) charT);
> }
> System.out.println(ssf);
>  
> }
> });
>  
> Using this code web service getting called by at server side it  
> will throw
> an error.
>  
> *Error is org.codehaus.xfire.fault.XFireFault: There must  
> be a method name
> element.*
>  
> Can you help me to resolve this error.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/SOAP-Web-service-Calling-using-camel-tp5745180p5745233.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: SOAP Web service Calling using camel.

2013-12-24 Thread Willem Jiang
If you can build the soap request by yourself, you can just use camel-http 
component to send a request without using a client.

Otherwise you can wsdl2java (from CXF) to generate a client for you.

You can find some example here[1]

[1]http://camel.apache.org/cxf.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 23, 2013 at 7:13:43 PM, viral.patel69 
(viral.pa...@algorhythm.co.in) wrote:
>  
> Dear All,
>  
> Without creating client can it be possible to call web method  
> of web
> service.
>  
> I have a Web Service deployed, WSDL for same has been given bellow  
>  
> > xmlns:tns="http://service.application.buzzor.atpl.com";  
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/";  
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";  
> xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/";  
> xmlns:soap12="http://www.w3.org/2003/05/soap-envelope";  
> targetNamespace="http://service.application.buzzor.atpl.com";>  
>  
> > attributeFormDefault="qualified" elementFormDefault="qualified"  
> targetNamespace="http://service.application.buzzor.atpl.com";>  
>  
>  
>  
>  
>  
>  
> > type="xsd:string"/>
>  
>  
>  
>  
>  
>  
> > element="tns:getApplicationResponse">
>  
>  
>  
>  
>  
>  
> > message="tns:getApplicationRequest">
> > message="tns:getApplicationResponse">  
>  
>  
> > type="tns:ApplicationServicePortType">
> > transport="http://schemas.xmlsoap.org/soap/http"/>
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> > binding="tns:ApplicationServiceHttpBinding">
> > location="http://192.168.2.66:8081/buzzor-service/services/ApplicationService"/>
> >   
>  
>  
>  
>  
> As you see in WSDL i need to call getApplication() method.
>  
> I am new in camel, and in example i found how to expose your web service  
> using camel. but i need a example sample code which will call this  
> web
> service using JAVA DSL.
>  
> Please help me
>  
> Thanks in Advance.
>  
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/SOAP-Web-service-Calling-using-camel-tp5745180.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: camel-zookeeper: ZooKeeperProducer does implement doStop()

2013-12-20 Thread Willem Jiang
Hi Klaus, 

Thanks for your contribution, I’m reviewing your patch. 
It will be commit to the camel repo shortly. 


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 20, 2013 at 4:33:16 PM, Klaus Schroeder (klasc...@gmail.com) wrote:
>  
> Hi
> the ZooKeeperProducer class does not stop/close the Zookeeper  
> connections
> properly when stopped. After closing the Camel context, the  
> connection
> threads still remain active.
> I fixed this and pushed to github:
> https://github.com/klauss42/camel/commit/491e07dbb941818b00fec9cfa256931e78dd480a
>   
> and
> https://github.com/klauss42/camel/commit/65fde427ce531f239d24dc367cb460a0cb36d319
>   
>  
> Please integrate in one of the next Camel releases
> thanks
> Klaus
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-zookeeper-ZooKeeperProducer-does-implement-doStop-tp5745096.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: camel-zookeeper: Allow multiple Zookeeper servers in endpoint

2013-12-20 Thread Willem Jiang
Hi Klaus,

Thanks for your contribution, I’m reviewing your patch.
It will be commit to the camel repo shortly.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 20, 2013 at 4:33:09 PM, Klaus Schroeder (klasc...@gmail.com) wrote:
>  
> Hi
> I have fixed a minor issue in the camel-zookeeper component to  
> allow
> connecting to a cluster of Zookeeper servers by using the comma-separated  
> syntax in the endpoint string. I pushed the change to github:  
> https://github.com/klauss42/camel/commit/7f22df2cdf8da4ada20017e57259ee2967b95908
>   
>  
> Would be nice if the change could be integrated in one of the next  
> Camel
> releases
>  
> thanks
> Klaus
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-zookeeper-Allow-multiple-Zookeeper-servers-in-endpoint-tp5745095.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Camel Jetty component and overlapping urls when a consumer

2013-12-19 Thread Willem Jiang
Current Camel Jetty component doesn’t support to share the Jetty component 
across bundle.
So I think if you put two bundles which use the same port into OSGi container, 
you will Socket bind error.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 20, 2013 at 4:17:09 AM, samslara (samsl...@yahoo.com) wrote:
>  
> Hello,
> I have a question about the behavior of the jetty component when  
> in an
> OSGi environment (such as in ServiceMix). If I have two bundles  
> each with a
> camel context where one has a route such as:
>  
>  
> ...
>  
> and the other has a route such as:
>  
>  
> ...
>  
> and I call the container with
>  
> http://:8080/application1/a/b/c
>  
> Because of the overlapping url but with the second route being  
> more specific
> will this request go to the 2nd route, the 1st route, randomly  
> to either or
> will something else occur?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-Jetty-component-and-overlapping-urls-when-a-consumer-tp5745068.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Camel FTP consumer + socketFactory not work correctly

2013-12-18 Thread Willem Jiang
Thanks for pointing that out. I just updated the code of FtpsEndpoint.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 19, 2013 at 1:46:53 AM, alexey-s (alex...@mail.ru) wrote:
>  
> Hi, Willem
>  
> Thanks for the correction of an error.
> Exactly the same error there FtpsEndpoint.
>  
>  
> Aleksey
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-FTP-consumer-socketFactory-not-work-correctly-tp5744716p5745005.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Camel FTP consumer + socketFactory not work correctly

2013-12-18 Thread Willem Jiang
I just filled a JIRA[1] for it and committed a quick fix for it.

[1] https://issues.apache.org/jira/browse/CAMEL-7077

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 18, 2013 at 1:12:54 AM, alexey-s (alex...@mail.ru) wrote:
>  
> Hi
>  
> Add JUnit test for remove paramenters from FtpClient
>  
> FromFtpClientSoTimeout3Test.java
>  
>  
> Aleksey
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-FTP-consumer-socketFactory-not-work-correctly-tp5744716p5744955.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Soap Fault Unmarshal

2013-12-17 Thread Willem Jiang
Can you show me your camel route?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 18, 2013 at 3:48:04 PM, bilalalp (syme...@gmail.com) wrote:
>  
> I'm using Spring DSL and I dont use ProducerTemplate. I have also  
> catch block
> but i doesn't catch anything about webservice fault message.  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Soap-Fault-Unmarshal-tp5744949p5744978.html 
>  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Soap Fault Unmarshal

2013-12-17 Thread Willem Jiang
Camel will turn the Soap Fault message into an Exception.
I’m not sure how do you call the web service, but if you use 
ProducerTemplate[1] you can get an exception from the exchange just like this

Exception exception = exchange.getException();

If you have a camel route to call the service, you can handle the exception by 
using the ErrorHandler[2]

[1]http://camel.apache.org/producertemplate.html
[2]http://camel.apache.org/error-handler.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 17, 2013 at 10:46:19 PM, bilalalp (syme...@gmail.com) wrote:
>  
> Hi everyone, I have a problem about soap:fault. When i call a web  
> service, it
> returns a default soap fault message. In camel side, how can i  
> convert it to
> an object? Here is an example fault:
>  
>  
>  
>  
>  
> soapenv:Server
> My fault string...
>  
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Soap-Fault-Unmarshal-tp5744949.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Camel Cxf Failover causes leak memory on periodic http requests

2013-12-17 Thread Willem Jiang
Hi,

It not easy to upgrade the camel version in the service.
You can using Main[1] or camel:run maven plugin[2] to start your route.
It could more easy to verify if the memory leak issue still there.
[1]http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html
[2]http://camel.apache.org/camel-run-maven-goal.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 17, 2013 at 5:39:03 PM, LORENZA Adnan (adnan.lore...@gmail.com) 
wrote:
>  
> Hi Willem,
>  
> Thanks for this quick answer.
> My camel component is deployed on a jbi servicemix-fuse-3.5-00.  
> If I upgrade my component to Camel 2.12 do you think that I can deploy  
> it
> on servicemix 3.4 or servicemix-fuse-3.5-00 ?
> Thanks
>  
>  
>  
> On Tue, Dec 17, 2013 at 10:27 AM, Willem Jiang wrote:  
>  
> > Hi,
> > Your camel version is quite old (it is about two years old), and  
> we don’t
> > provide community support for that version.
> > Can you try to run the test with some latest released Camel ?
> >
> > --
> > Willem Jiang
> >
> > Red Hat, Inc.
> > Web: http://www.redhat.com
> > Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/)  
> > (English)
> > http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)  
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> >
> >
> > On December 17, 2013 at 5:03:01 PM, LORENZA Adnan (adnan.lore...@gmail.com) 
> >  
> > wrote:
> > >
> > > Hi,
> > >
> > > I developed a camel cxf component that is configured to failover  
> > > to
> > > alternate addresses in case of connections /availability  
> failures.
> > > The camel component is a simple timer that sends every second  
> > > a request to
> > > a webservice.
> > >
> > > The camel route is the following :
> > >
> > > public void configure() throws Exception {
> > >
> > >
> > > from("timer:timerRetrieveAvailableJobs?fixedRate=true&period=1000")  
> > > .setBody(constant(getRequestMessage())
> > > .setHeader(CxfConstants.OPERATION_NAME,
> > > constant("getAvailableJobs"))
> > >
> > >
> > .to("cxf:bean:cxfJobsWsEndpoint?synchronous=true&loggingFeatureEnabled=true");
> >   
> > >
> > > }
> > >
> > > private String getRequestMessage(){
> > > //Build the right request
> > > ...
> > > }
> > >
> > > The camel-context.xml configures the clustering failover  
> > > as below :
> > > ...
> > > > serviceClass="net.jobs.ws.myPTServiceClass" address="  
> > > http://localhost/myservice/JobWS";>
> > >
> > >
> > >
> > > > class="org.apache.cxf.clustering.SequentialStrategy">  
> > >
> > >
> > > http://server1/JobWS
> > > http://server2/JobWS
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > ...
> > >
> > > After a few hours, a dump of JVM memory shows that some objects  
> > > of CXF
> > > (org.apage.cxf.) are created and remain in the memory.  
> > > They are not
> > > accessible by the GC. Their number continues to grow and causes  
> > > a memory
> > > leak after a long term :
> > >
> > > command : jmap -histo:live 25698 | grep cxf
> > > 8: 90660 9428640
> > > [Lorg.apache.cxf.phase.PhaseInterceptorChain$InterceptorHolder;  
> > > 20: 135989 3263736
> > > org.apache.cxf.phase.PhaseInterceptorChain$InterceptorHolder  
> > > 22: 45328 2900992 org.apache.cxf.message.MessageImpl  
> > > 24: 45330 2175840
> > > org.apache.cxf.phase.PhaseInterceptorChain
> > > 25: 22664 1994432 org.apache.cxf.message.ExchangeImpl  
> > > 33: 45328 1087872
> > > org.apache.cxf.phase.PhaseInterceptorChain$PhaseInterceptorIterator  
> > > 36: 22664 906560
> > > org.apache.cxf.clustering.FailoverTargetSelector$InvocationContext  
> > > 40: 22664 725248
> > > org.apache.cxf.helpers.LoadingByteArrayOutputStream$1  
> > > 41: 45328 725248 org.apache.cxf.binding.soap.SoapMessage  
> > > 46: 22664 543936
> > > org.apache.cxf.message.MessageContentsList
> > > 51: 22664 362624
> > > org.apache.cxf.helpers.LoadingByteArrayOutputStream  
> > > 52: 22664 362624
> > > org.apache.cxf.clustering.FailoverTargetSelector$InvocationKey  
> > >
> > > I tried the same test without failover configuration and I  
> was
> > > surprised :
> > > the component continues to work without memory problem. The  
> > > objects above
> > > are collected and removed by the GC.
> > > It seems that the classes that implement the clustering failover  
> > > retain
> > > created objects and prevent their removal.
> > >
> > > The test has been done on the following configurations :
> > >
> > > * apache-servicemix-3.4.0, cxf 2.4.4, camel 2.8.3
> > >
> > > * apache-servicemix-3.5.0-fuse-00-00, cxf 2.2.11, camel  
> > > 2.5
> > >
> > > Any help will be appreciated.
> > > Thanks
> > >
> > > Regards
> > > Adnan
> > >
> >
> >
>  



Re: "serviceClass must be specified" error in ServiceMix

2013-12-17 Thread Willem Jiang
It could be more straight is you choice to use camel-jetty.
The camel route just routing the request and response and doesn’t change the 
message content.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 17, 2013 at 4:50:30 PM, madusanka (madusankabalasoor...@gmail.com) 
wrote:
>  
> still the issue is there? I also want to proxy a RESTful service  
> developed in
> CXF. Can I use or should I have to use jetty?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/serviceClass-must-be-specified-error-in-ServiceMix-tp5744904p5744925.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Camel Cxf Failover causes leak memory on periodic http requests

2013-12-17 Thread Willem Jiang
Hi,
Your camel version is quite old (it is about two years old), and we don’t 
provide community support for that version.
Can you try to run the test with some latest released Camel ?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 17, 2013 at 5:03:01 PM, LORENZA Adnan (adnan.lore...@gmail.com) 
wrote:
>  
> Hi,
>  
> I developed a camel cxf component that is configured to failover  
> to
> alternate addresses in case of connections /availability failures.  
> The camel component is a simple timer that sends every second  
> a request to
> a webservice.
>  
> The camel route is the following :
>  
> public void configure() throws Exception {
>  
>  
> from("timer:timerRetrieveAvailableJobs?fixedRate=true&period=1000")  
> .setBody(constant(getRequestMessage())
> .setHeader(CxfConstants.OPERATION_NAME,
> constant("getAvailableJobs"))
>  
> .to("cxf:bean:cxfJobsWsEndpoint?synchronous=true&loggingFeatureEnabled=true");
>   
>  
> }
>  
> private String getRequestMessage(){
> //Build the right request
> ...
> }
>  
> The camel-context.xml configures the clustering failover  
> as below :
> ...
> > serviceClass="net.jobs.ws.myPTServiceClass" address="  
> http://localhost/myservice/JobWS";>
>  
>  
>  
> > class="org.apache.cxf.clustering.SequentialStrategy">  
>  
>  
> http://server1/JobWS
> http://server2/JobWS
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> ...
>  
> After a few hours, a dump of JVM memory shows that some objects  
> of CXF
> (org.apage.cxf.) are created and remain in the memory.  
> They are not
> accessible by the GC. Their number continues to grow and causes  
> a memory
> leak after a long term :
>  
> command : jmap -histo:live 25698 | grep cxf
> 8: 90660 9428640
> [Lorg.apache.cxf.phase.PhaseInterceptorChain$InterceptorHolder;  
> 20: 135989 3263736
> org.apache.cxf.phase.PhaseInterceptorChain$InterceptorHolder  
> 22: 45328 2900992 org.apache.cxf.message.MessageImpl
> 24: 45330 2175840
> org.apache.cxf.phase.PhaseInterceptorChain
> 25: 22664 1994432 org.apache.cxf.message.ExchangeImpl
> 33: 45328 1087872
> org.apache.cxf.phase.PhaseInterceptorChain$PhaseInterceptorIterator  
> 36: 22664 906560
> org.apache.cxf.clustering.FailoverTargetSelector$InvocationContext  
> 40: 22664 725248
> org.apache.cxf.helpers.LoadingByteArrayOutputStream$1  
> 41: 45328 725248 org.apache.cxf.binding.soap.SoapMessage  
> 46: 22664 543936
> org.apache.cxf.message.MessageContentsList
> 51: 22664 362624
> org.apache.cxf.helpers.LoadingByteArrayOutputStream  
> 52: 22664 362624
> org.apache.cxf.clustering.FailoverTargetSelector$InvocationKey  
>  
> I tried the same test without failover configuration and I was  
> surprised :
> the component continues to work without memory problem. The  
> objects above
> are collected and removed by the GC.
> It seems that the classes that implement the clustering failover  
> retain
> created objects and prevent their removal.
>  
> The test has been done on the following configurations :
>  
> * apache-servicemix-3.4.0, cxf 2.4.4, camel 2.8.3
>  
> * apache-servicemix-3.5.0-fuse-00-00, cxf 2.2.11, camel  
> 2.5
>  
> Any help will be appreciated.
> Thanks
>  
> Regards
> Adnan
>  



Re: Jetty vs Http components

2013-12-16 Thread Willem Jiang
http component is missing the consumer (server) part which jetty component has.
camel-jetty component producer (client) also provides async processing API.
If you want to build a proxy, you need to use camel-jetty component.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 17, 2013 at 6:22:57 AM, madusanka (madusankabalasoor...@gmail.com) 
wrote:
>  
> Hi,
>  
> what is the difference between jetty and http components. Which  
> is more
> suitable to proxy an Axis2 web service?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Jetty-vs-Http-components-tp5744899.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: "serviceClass must be specified" error in ServiceMix

2013-12-16 Thread Willem Jiang
You need to specify the dataformat option this time, as the default POJO 
dataformat need you to specify the serviceClass option.
The configuration should be

http://localhost:9090/cxf-proxy" 
endpointName="tns:HelloServicePort" 
serviceName="tns:HelloService" 
wsdlURL="etc/HelloService.wsdl" 
xmlns:tns="http://www.example.org/HelloService"/> 

http://camel.apache.org/schema/spring";> 

http://localhost:8080/cxf-service/services/HelloService?dataformat=MESSAGE"/>
 
 
 
 
 
 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 17, 2013 at 10:13:14 AM, madusanka (madusankabalasoor...@gmail.com) 
wrote:
>  
> My configuration
>  
> > address="http://localhost:9090/cxf-proxy";
> endpointName="tns:HelloServicePort"
> serviceName="tns:HelloService"
> wsdlURL="etc/HelloService.wsdl"
> xmlns:tns="http://www.example.org/HelloService"/>
>  
>  
>  
> >  
> uri="http://localhost:8080/cxf-service/services/HelloService"/>  
>  
>  
>  
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/serviceClass-must-be-specified-error-in-ServiceMix-tp5744904p5744905.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Configuration to use camel salesforce component

2013-12-15 Thread Willem Jiang
We don’t have the salesforce share account. You need to have signup[1] first.
https://events.developerforce.com/signup

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 16, 2013 at 1:47:00 PM, shmahajan (shital_maha...@persistent.co.in) 
wrote:
>  
> Thanks Claus.I will take a look at test code.
>  
> To establish conectivity with salesforce, do i need to make any  
> configurartion in my salesforce account?
>  
> Is any sample account provided by camel to test salesforce connectivity  
> similar to what is done for twitter?
> I am new to camel as well as salesforce. so donot know exaclty how  
> to
> proceed?
>  
> Regards
> Shital
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Configuration-to-use-camel-salesforce-component-tp5744779p5744816.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: IBM MQ

2013-12-15 Thread Willem Jiang
You can call the IBM MQ API in your bean.
Or you can configure the JMSComponent[1] by setting up the connection for the 
remote IBM MQ.

[1]http://camel.apache.org/jms.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 16, 2013 at 4:33:40 AM, keepcl123 (keepcl...@gmail.com) wrote:
>  
> I have a spring context application.
> I want to use camel in order to send a text message from a bean in  
> my
> application to a remote IBM MQ.
> can someone give me an example?
>  
> Thx
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/IBM-MQ-tp5744802.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: building camel : disable camel-manual

2013-12-12 Thread Willem Jiang


I just filled a JIRA[1] for it.
I think we could skip that by using the profile fastinstall.

[1]https://issues.apache.org/jira/browse/CAMEL-7065 
--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 11, 2013 at 7:50:54 PM, lb (lburgazz...@gmail.com) wrote:
>  
> Hi,
> I'm trying to build camel behind a corporate firewall and the  
> build fails
> for camel-manual:
>  
> [INFO] --- exec-maven-plugin:1.2.1:java (generate-manual)  
> @ camel-manual ---
> java.net.ConnectException: Connection timed out: connect  
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native  
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>   
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>   
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)  
> at
> sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
>   
> at
> sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
>   
> at java.security.AccessController.doPrivileged(Native  
> Method)
> at
> sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
>   
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
>   
> at
> org.apache.camel.manual.ManualGenerator.grabBodyContent(ManualGenerator.java:163)
>   
> at
> org.apache.camel.manual.ManualGenerator.run(ManualGenerator.java:59)  
> at
> org.apache.camel.manual.ManualGenerator.main(ManualGenerator.java:187)  
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
> Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
>  
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)  
> at java.lang.Thread.run(Thread.java:744)
>  
> How can I turn off camel-manual module? I've used mvn install  
> -Pfastinstall
> as suggested by the building page con camel's website but it looks  
> like the
> camel-manual is still taken into account.
>  
> Thx,
> Luca
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/building-camel-disable-camel-manual-tp5744596.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Unknown Host Exception when using Twitter Endpoint

2013-12-12 Thread Willem Jiang
I just have a quick look at the Twitter4j[1] which is used by camel-twitter.
 You can either to use system properties(-Dtwitter4j.http.proxyHost, 
-Dtwitter4j.http.proxyPort) or twitter4j.properties.

http.proxyHost=your.proxy.host
http.proxyPort=8080

[1]http://twitter4j.org/en/faq.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 7:15:35 PM, Goyal, Arpit (arpit.go...@sap.com) wrote:
>  
> Hi,
>  
> Is there a way to set Proxy Host & Proxy Port in Twitter Endpoint.  
> I am getting Unknown Host Exception when trying to access in landscape  
> which has proxy server configured.
>  
> Is this known issue?
>  
> Regards,
> Arpit
>  
> Error Log:
> Endpoint[twitter://timeline/mentions?accessToken=[s]&accessTokenSecret=[s]&consumerKey=[s]&consumerSecret=[s]&delay=60&type=polling].
>   
> Will try again at next poll. Caused by: [twitter4j.TwitterException  
> - api.twitter.com]
> twitter4j.TwitterException: api.twitter.com
> at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:177)  
> ~[na:na]
> at 
> twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)  
> ~[na:na]
> at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:81)  
> ~[na:na]
> at twitter4j.TwitterImpl.get(TwitterImpl.java:1929) ~[na:na]  
> at twitter4j.TwitterImpl.getMentionsTimeline(TwitterImpl.java:111)  
> ~[na:na]
> at 
> org.apache.camel.component.twitter.consumer.timeline.MentionsConsumer.pollConsume(MentionsConsumer.java:38)
>   
> ~[na:na]
> at 
> org.apache.camel.component.twitter.consumer.TwitterConsumerPolling.poll(TwitterConsumerPolling.java:65)
>   
> ~[na:na]
> at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
>   
> [bundlefile:2.12.2-sap-01-SNAPSHOT]
> at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
>   
> [bundlefile:2.12.2-sap-01-SNAPSHOT]
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown  
> Source) [na:1.7.0_17]
> at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown  
> Source) [na:1.7.0_17]
> at java.util.concurrent.FutureTask.runAndReset(Unknown  
> Source) [na:1.7.0_17]
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown
>   
> Source) [na:1.7.0_17]
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
>   
> Source) [na:1.7.0_17]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown  
> Source) [na:1.7.0_17]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown  
> Source) [na:1.7.0_17]
> at java.lang.Thread.run(Unknown Source) [na:1.7.0_17]
> Caused by: java.net.UnknownHostException: api.twitter.com  
> at java.net.AbstractPlainSocketImpl.connect(Unknown Source)  
> ~[na:1.7.0_17]
> at java.net.PlainSocketImpl.connect(Unknown Source) ~[na:1.7.0_17]  
> at java.net.SocksSocketImpl.connect(Unknown Source) ~[na:1.7.0_17]  
> at java.net.Socket.connect(Unknown Source) ~[na:1.7.0_17]  
> at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)  
> ~[na:1.7.0_17]
> at sun.net.NetworkClient.doConnect(Unknown Source) ~[na:1.7.0_17]  
> at sun.net.www.http.HttpClient.openServer(Unknown Source)  
> ~[na:1.7.0_17]
> at sun.net.www.http.HttpClient.openServer(Unknown Source)  
> ~[na:1.7.0_17]
> at sun.net.www.protocol.https.HttpsClient.(Unknown  
> Source) ~[na:1.7.0_17]
> at sun.net.www.protocol.https.HttpsClient.New(Unknown  
> Source) ~[na:1.7.0_17]
> at 
> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown
>   
> Source) ~[na:1.7.0_17]
> at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown  
> Source) ~[na:1.7.0_17]
> at 
> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown 
>  
> Source) ~[na:1.7.0_17]
> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown  
> Source) ~[na:1.7.0_17]
> at java.net.HttpURLConnection.getResponseCode(Unknown  
> Source) ~[na:1.7.0_17]
> at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown  
> Source) ~[na:1.7.0_17]
> at twitter4j.internal.http.HttpResponseImpl.(HttpResponseImpl.java:34)  
> ~[na:na]
> at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:141)  
> ~[na:na]
> ... 16 common frames omitted
>  



Re: building camel : disable camel-manual

2013-12-12 Thread Willem Jiang
FYI, I figured a way[1] to disable generate manual call when using fastinstall 
profile.
Please check out the latest master code for verification :)

[1]https://issues.apache.org/jira/browse/CAMEL-7065 


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 10:03:23 PM, lb (lburgazz...@gmail.com) wrote:
>  
>  
> I forgot to mention that the proxy need authentication so http.proxyHost  
> and
> http.proxyPort are not enough :-(
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/building-camel-disable-camel-manual-tp5744596p5744681.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: First CamelSpringTestSupport unit test - AdviceWith - No consumers available on endpoint

2013-12-12 Thread Willem Jiang
You need to make sure the original route is started before using the template 
to send the request.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 5:55:34 PM, richie.rivi...@gmail.com 
(richie.rivi...@gmail.com) wrote:
>  
> Hi,
>  
> Yes i think you may have missed the first part of the post where  
> I describe
> the original route. It definitely has a from(“direct:itemExport”).  
>  
> So you think it can't find the route?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/First-CamelSpringTestSupport-unit-test-AdviceWith-No-consumers-available-on-endpoint-tp5744656p5744661.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: DefaultCxfRsBinding only uses Exchange.getOut()

2013-12-12 Thread Willem Jiang
I will take care of it.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 1:36:19 AM, Sergey Beryozkin (sberyoz...@gmail.com) 
wrote:
>  
> Hi
> On 11/12/13 17:02, Dominik Amon wrote:
> > Hi Sergey,
> >
> > i created a JIRA ( https://issues.apache.org/jira/browse/CAMEL-7061  
> >  
> ).
> >
> Thanks
> >
> >
> >
> > Sergey Beryozkin-3 wrote
> >> What I'm not understanding yet is what kind of response you  
> actually get
> >> if IN message is checked ?
> >
> > The problem in my case is that the last action of the TryProcessor  
> is moving
> > the out message to the in message, thus setting the out message  
> to null.
> > Now when the CxfRsInvokers returnResponse method is called,  
> which populates
> > the response using the DefaultCxfRsBinding (calling
> > endpoint.getBinding().populateCxfRsResponseFromExchange(camelExchange,  
> > cxfExchange))the exchange looks like:
> >
> > Exchange
> > in : [MyPayload]
> > out : null
> >
> > and the DefaultCxfRsBinding currently only uses the out message  
> and if the
> > out message is null cxfrs returns the http response code 204.  
> >
> > When removing the block the exchange that arrives at  
> the
> > DefaultCxfRsBinding looks like:
> >
> > Exchange
> > in : [MyPayload]
> > out : [MyPayload]
> >
> > an everything is fine.
> >
> Clear, thanks
> >
> > Sergey Beryozkin-3 wrote
> >> I'm also slightly concerned that if if we have roots explicitly  
> checking
> >> for 204 (or indeed roots dealing with HTTP responses having  
> no actual
> >> body) then this patch might affect them ?
> >
> > Hmm, the Camel FAQ is saying that only using the in message should  
> be fine:
> > Camel FAQ
> >  
> >
> > But maybe in some circumstances it will affect some routes,  
> I have to think
> > about it.
> >
> Please do.
> >
> > Sergey Beryozkin-3 wrote
> >> May be, in case of CXF RS binding, checking IN should be optional,  
> >> example, if an exchange property is set allowing for it then  
> do it,
> >> otherwise not. What do you think ?
> >
> > Well, in my opinion it should in every case be consintent to the  
> > DefaultCxfBinding. If it is made optional which I think is not  
> a bad idea it
> > should be made optional for both DefaultCxfBinding and DefaultCxfRsBinding. 
> >  
> >
> Typical SOAP response will not be empty, may be only in advanced  
> WS-RM
> scenarios, so I guess it is very safe for the DefaultCxfBinding.  
>  
> That said, your patch is likely very safe, now that I think about  
> it, if
> we have routes with 204 or 302, etc, they won't have the response  
> body
> anyway, please think a bit more about such cases, but I guess your  
> patch
> would be good to go
>  
> Thanks, Sergey
> > Regards
> > Dominik
> >
> >
> >
> > --
> > View this message in context: 
> > http://camel.465427.n5.nabble.com/DefaultCxfRsBinding-only-uses-Exchange-getOut-tp5744605p5744622.html
> >   
> > Sent from the Camel - Users mailing list archive at Nabble.com.  
> >
>  
>  



Re: Archive files using apache camel

2013-12-12 Thread Willem Jiang
I’m not sure what you need to do to archive the files.
Can you elaborate your requirement?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 11:55:23 AM, Claire (claire.chanm...@newgens.com.sg) 
wrote:
>  
> Hi,
>  
> I wonder if there is a way to do archive files in camel. Once I translated  
> from my csv file into xml file, there will be many xml file. What  
> I would
> like to do is to do archive files (number of files to be archived  
> would
> depends on properties file).
>  
> Thank you much in advance.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Archive-files-using-apache-camel-tp5744649.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: First CamelSpringTestSupport unit test - AdviceWith - No consumers available on endpoint

2013-12-12 Thread Willem Jiang
You need to make sure there is route which has from(“direct:itemExport”) 
started first.



--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 5:19:11 PM, richie.rivi...@gmail.com 
(richie.rivi...@gmail.com) wrote:
>  
> Hi guys,
>  
> Thanks for the advice on a previous post asking about how to change  
> the
> route of an application for the purposes of testing. Since that  
> time I have
> gone and done some research into using adviceWith and given it  
> a go. It
> seems to be working for me but I'm getting an error whilst executing  
> the
> unit test and I'm not sure what it means.
>  
> I am trying to use adviceWith to replace the JPA select from the  
> database
> and just give camel an entity bean that I have created.
>  
> The error is 
>  
> Caused by:
> org.apache.camel.component.direct.DirectConsumerNotAvailableException:  
> No
> consumers available on endpoint: Endpoint[direct://itemExport].  
> Exchange[Message: ImportPayloadEntity[ id:999 ]
>  
> The original route in my application looks like this...
>  
> from("direct:itemExport")
> .routeId("itemExportMagento")
> .autoStartup("{{item.export.magento}}")
> .startupOrder(2)
> .shutdownRoute(ShutdownRoute.Defer)
> .errorHandler(deadLetterChannel("log:dead")
> .maximumRedeliveries(5)
> .retryAttemptedLogLevel(LoggingLevel.ERROR))
> .pollEnrich("jpa://org.apache.camel.auski.etl.entity.ImportPayloadEntity?consumer.namedQuery=queryImportPayloads&consumeDelete=false&delay=3000&consumeLockEntity=false")
>   
> .to("itemExportMagentoFromSourceHeaderProcessor")
> .to("bean:serviceBean?method=login")
> .to("itemExportMagentoFromLoginBodyProcessor")
> .split().method("splitterService","magentoUowSplit")  
> .to("itemExportMagentoActivityCodeProcessor")
>  
> and my unit test looks like this...
>  
> public class ItemExportMagentoRouteTest extends CamelSpringTestSupport  
> {
> @Override
> protected AbstractApplicationContext createApplicationContext()  
> {
> return new
> ClassPathXmlApplicationContext("META-INF/spring/camel-context.xml");  
> }
> @Override
> public boolean isUseAdviceWith() {
> return true;
> }
> @Test
> public void testExportRoute() throws Exception {
> context.getRouteDefinition("itemExportMagento").adviceWith(context,  
> new
> AdviceWithRouteBuilder() {
> @Override
> public void configure() throws Exception {
> weaveByType(PollEnrichDefinition.class).remove();
> }
> });
> context.startRoute("itemExportMagento");
>  
> ImportPayloadEntity importPayloadEntity = new ImportPayloadEntity();  
> importPayloadEntity.setId(new Long(999));
> importPayloadEntity.setFilename("MinderTest.xml");
>  
> Collection items = new ArrayList();  
> ItemEntity itemEntity = createItem(importPayloadEntity);  
> items.add(itemEntity);
> importPayloadEntity.setItems(items);
>  
> template.sendBody("direct:itemExport", importPayloadEntity);  
> }
>  
> I am using Camel 2.11.0. I'm thinking maybe it is something to  
> do with the
> way I'm doing template.sendBody("direct:itemExport", importPayloadEntity);  
> ?
>  
> Has anyone got any thoughts?
>  
> thanks
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/First-CamelSpringTestSupport-unit-test-AdviceWith-No-consumers-available-on-endpoint-tp5744656.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: building camel : disable camel-manual

2013-12-12 Thread Willem Jiang
It’s not maven proxy setting, you need to setup the proxy for Java Http URL 
connection[1]

[1]http://stackoverflow.com/questions/1432961/how-do-i-make-httpurlconnection-use-a-proxy

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 1:51:27 PM, lb (lburgazz...@gmail.com) wrote:
>  
> Proxy is properly configured and dependencies are downloaded  
> without problems. The only issue is with camel-manual.
>  
> —
> lb
>  
> On Wed, Dec 11, 2013 at 10:05 PM, Christian Müller
> wrote:
>  
> > You can also consider to configure your Maven proxy settings...  
> > Best,
> > Am 11.12.2013 12:50 schrieb "lb" :  
> >> Hi,
> >> I'm trying to build camel behind a corporate firewall and the  
> build fails
> >> for camel-manual:
> >>
> >> [INFO] --- exec-maven-plugin:1.2.1:java (generate-manual)  
> @ camel-manual
> >> ---
> >> java.net.ConnectException: Connection timed out: connect  
> >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native  
> >> Method)
> >> at
> >>
> >> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> >>   
> >> at
> >>
> >> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> >>   
> >> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)  
> >> at
> >>
> >> sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
> >>   
> >> at
> >>
> >> sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
> >>   
> >> at java.security.AccessController.doPrivileged(Native  
> Method)
> >> at
> >>
> >> sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
> >>   
> >> at
> >>
> >> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
> >>   
> >> at
> >>
> >> org.apache.camel.manual.ManualGenerator.grabBodyContent(ManualGenerator.java:163)
> >>   
> >> at
> >> org.apache.camel.manual.ManualGenerator.run(ManualGenerator.java:59)  
> >> at
> >> org.apache.camel.manual.ManualGenerator.main(ManualGenerator.java:187)  
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
> Method)
> >> at
> >>
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >>   
> >> at
> >>
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >>   
> >> at java.lang.reflect.Method.invoke(Method.java:606)  
> >> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)  
> >> at java.lang.Thread.run(Thread.java:744)
> >>
> >> How can I turn off camel-manual module? I've used mvn install  
> >> -Pfastinstall
> >> as suggested by the building page con camel's website but it  
> looks like the
> >> camel-manual is still taken into account.
> >>
> >> Thx,
> >> Luca
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >> http://camel.465427.n5.nabble.com/building-camel-disable-camel-manual-tp5744596.html
> >>   
> >> Sent from the Camel - Users mailing list archive at Nabble.com.  
> >>



Re: Reading file using camel

2013-12-12 Thread Willem Jiang
What’s your com.beans.readFile look like?
How do you inject it into the camel route?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 3:36:19 PM, Claire (claire.chanm...@newgens.com.sg) 
wrote:
>  
> Hi,
>  
> I have two files to convert from csv file to xml file and I also have  
> another file (properties or excel file) to lookup. So I would  
> like to read
> value from that excel file and convert my csv to xml file based  
> on those
> values. I did one java to read those value from that lookup table  
> file but I
> can't specify the file path location in my bean. Following is  
> the way I
> injected java in my bean.
>  
> *
>  
>  
> "D://workspace//data//sample_cfg.cfg"  
>  
> *
>  
> Following is my java to return filePath.
>  
> *public String readFile(String fPath){
> return fPath;
> }*
>  
> but I got error for calling like that. How can I achieve this approach?  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Reading-file-using-camel-tp5744653.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: building camel : disable camel-manual

2013-12-11 Thread Willem Jiang
We have some trouble when doing the release if enable the camel-manual module 
with profile. 
I’m not sure if we have time to revisit it again. 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 5:05:25 AM, Christian Müller 
(christian.muel...@gmail.com) wrote:
>  
> You can also consider to configure your Maven proxy settings...  
>  
> Best,
> Am 11.12.2013 12:50 schrieb "lb" :  
>  
> > Hi,
> > I'm trying to build camel behind a corporate firewall and the  
> build fails
> > for camel-manual:
> >
> > [INFO] --- exec-maven-plugin:1.2.1:java (generate-manual)  
> @ camel-manual
> > ---
> > java.net.ConnectException: Connection timed out: connect  
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native  
> > Method)
> > at
> >
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> >   
> > at
> >
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> >   
> > at java.lang.reflect.Constructor.newInstance(Constructor.java:526)  
> > at
> >
> > sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
> >   
> > at
> >
> > sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
> >   
> > at java.security.AccessController.doPrivileged(Native  
> Method)
> > at
> >
> > sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
> >   
> > at
> >
> > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
> >   
> > at
> >
> > org.apache.camel.manual.ManualGenerator.grabBodyContent(ManualGenerator.java:163)
> >   
> > at
> > org.apache.camel.manual.ManualGenerator.run(ManualGenerator.java:59)  
> > at
> > org.apache.camel.manual.ManualGenerator.main(ManualGenerator.java:187)  
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
> Method)
> > at
> >
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >   
> > at
> >
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >   
> > at java.lang.reflect.Method.invoke(Method.java:606)  
> > at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)  
> > at java.lang.Thread.run(Thread.java:744)
> >
> > How can I turn off camel-manual module? I've used mvn install  
> > -Pfastinstall
> > as suggested by the building page con camel's website but it  
> looks like the
> > camel-manual is still taken into account.
> >
> > Thx,
> > Luca
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> > http://camel.465427.n5.nabble.com/building-camel-disable-camel-manual-tp5744596.html
> >   
> > Sent from the Camel - Users mailing list archive at Nabble.com.  
> >
>  



Re: JPA @Consumed

2013-12-11 Thread Willem Jiang
Can you change the below to(“jpa…”) to pollEnrich(“jpa…”)?
In this way the @Cousumed can be called.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 6:05:43 AM, richie.rivi...@gmail.com 
(richie.rivi...@gmail.com) wrote:
> > .to("jpa://org.apache.camel.auski.etl.entity.ImportPayloadEntity?consumer.namedQuery=queryImportPayloads&consumeDelete=false&delay=3000&consumeLockEntity=false")
> >   
>  



Re: It should be document issue

2013-12-11 Thread Willem Jiang
Thanks for point that out, I just updated the wiki page for it.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 10:33:49 AM, xielei (xray2...@163.com) wrote:
>  
> Quartz2 Component  
>  
> "Configuring quartz.properties file" section
>  
> > class="org.apache.camel.component.quartz2.QuartzComponent">  
> > value="com/mycompany/myquartz.properties"/>
>  
>  
> The bean id shoud be "quartz2" !
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/It-should-be-document-issue-tp5744642.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



Re: Passing multiple parameters to CXF endpoint

2013-12-08 Thread Willem Jiang
You can use Spring to configure the CXF endpoint like this

http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:cxf="http://camel.apache.org/schema/cxf";
       xmlns:http-conf="http://cxf.apache.org/transports/http/configuration";
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/cxf 
http://camel.apache.org/schema/cxf/camel-cxf.xsd
       http://cxf.apache.org/transports/http/configuration 
http://cxf.apache.org/schemas/configuration/http-conf.xsd
       http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
    ">
 
   

   

   http://localhost:9000/CxfTimeoutTest/SoapContext/SoapPort";
    serviceClass="org.apache.hello_world_soap_http.Greeter”/>




The camel route can be 
from(“dirt:start”).to(“cxf:bean:sprintEndpoint”)

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 7, 2013 at 11:36:36 AM, trilochan237 
(kartheektrilochan...@gmail.com) wrote:
>
>Hi Willem,
>
>If i use the client program example from camel cxf examples and set the
>content type in HTTPClientPolicy,
>but could you please tell me how to set the same in Exchange type when
>calling the webservice by creating a CXFendpoint
>
>
>*CLient Program:-*
>
>JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>.
>.
>.
>Client client = ClientProxy.getClient(port);
>HTTPConduit http = (HTTPConduit) client.getConduit();
>HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>* httpClientPolicy.setContentType("application/soap+xml");*
>http.setClient(httpClientPolicy);
>
>...
>..
>client.retrieve(arg1,arg2,arg3);
>
>
>
>*Cxf Endpoint:-*
>
>from("direct:test").process(new Processor(){
>public void processor(Exchange exchange)
>{
>Object[] objectarray=new Object[3];
>.
>.
>.
>exchange.getOut().setBody(objarry);
>}
>}).to("cxf://http://10.103.91.55:/FinEdge-General/xrmServices/2011/Organization.svc?serviceClass=com.hcl.flsl.integration.msdn.crmwcf.IOrganizationService&defaultOperationName=Retrieve";)
>
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/Passing-multiple-parameters-to-CXF-endpoint-tp5744345p5744416.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: CXF EndPoint Vs Processor

2013-12-08 Thread Willem Jiang
It’s dependence on do you want to hold the reference of client invocation proxy 
and how do you prepare the request for invocation.
The processor way provides you a way to integrate the web service invocation 
code within camel route, you need to take care of everything yourself.
You don’t need create the web service proxy yourself if you use the cxf 
endpoint .


-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 7, 2013 at 11:42:41 AM, trilochan237 
(kartheektrilochan...@gmail.com) wrote:
>
>Hi,
>
>Can someone tell me which is the best approach for calling an external
>webservice?
>After going through the examples from camel website i got to know that a
>call can be made from the processor and also by creating a CXFEndpoint.
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/CXF-EndPoint-Vs-Processor-tp5744417.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: stupid pipeline question

2013-12-08 Thread Willem Jiang
Can you double check if the message body can be converted rightly?
I think you can enable the trace[1] and check the log to see what is wrong.

[1]http://camel.apache.org/tracer.html

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 7, 2013 at 7:21:33 AM, tapdur (tapdu...@gmail.com) wrote:
>
>hi all
>
>when i use a route with cxfEndpoint like this it works fine
>
>
>
>
>
>the to response is well returned in the grom response.
>
>however, if i want to insert a mapper before and/or after the to uri i lost
>the body, why ???
>
>
>
>
>
>
>
>>
>
>
>may i use transform ? to return a com.a.response to the from messasge ?
>
>
>thx a lot
>
>bruno
>
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/stupid-pipeline-question-tp5744415.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: Camel CXF in payload mode - received message does not contain body element

2013-12-05 Thread Willem Jiang
As your service class uses the Provider API, you can get the soap message body 
with POJO data format.
I don’t suggest you use the PAYLOAD data format this time.

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 6, 2013 at 4:28:26 AM, krzysztof (k.wilas...@gmail.com) wrote:
>
>Hi,
>
>I have problem with camel cxf in payload mode. CxfPayload object does not
>contain SOAP body element. I am using camel 2.11.0.
>
>I have defined cxf endpoint like this -
>
>>address="/Address"
>wsdlURL="wsdl/WSDL.wsdl"
>serviceClass="ServiceClass"
>serviceName="a:ServiceName"
>endpointName="a:EndpointName"
>xmlns:a="https://a.org/ws";
>loggingFeatureEnabled="true">
>
>
>
>
>
>My ServiceClass is like this:
>
>@WebServiceProvider(serviceName = "ServiceName")
>@ServiceMode(Service.Mode.PAYLOAD)
>public interface ServiceClass extends Provider {
>
>@Override
>Source invoke(Source source);
>}
>
>I have camel route with following fragment:
>
>from("cxf:bean:cxfEndpoint").to(processor)
>
>I am sending soap message like:
>
>
>>
>>
>
>
>>
>
>
>
>I have noticed that my requests are processed by various interceptors. One
>of them is DocLiteralInInterceptor. It adds element from my soap
>body(ns3:BodyElement) to MessageContentsList executing instruction -
>
>parameters.add(o);
>
>Later it is set as message content.
>
>Next interceptor is SoapHeaderInterceptor. It takes message content created
>in previous interceptor(DocLiteralInInterceptor) and after some processing
>adds ns1:Header1 to MessageContentList executing instruction -
>
>parameters.put(mpi, object);
>
>It replaces my body element from previous interceptor with header. When my
>message arrives to the processor CxfPayload object does not contain body
>element.
>
>What am I doing wrong?
>
>Thank you
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/Camel-CXF-in-payload-mode-received-message-does-not-contain-body-element-tp5744375.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: camel-rabbitmq

2013-12-05 Thread Willem Jiang
In camel we have a rule that message header can override the setting of 
endpoint.

When consumer receives the message, it puts some headers which key is start 
with “rabbitmq.”. As the producer always prefer the message header setting over 
the endpoint setting, the producer sends the message to general.queue. Then the 
consumer get a new message and route it to the producer. That could explain why 
you saw the camel keeps sending same message to the  general.queue.

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 6, 2013 at 12:34:57 AM, muthukumara...@gmail.com 
(muthukumara...@gmail.com) wrote:
>
>Thanks Willem for the quick response.
>
>Your suggestion resolved my issue. Can you please explain why this issue
>happened and how this fixed it?
>
>Thanks,
>Muthu
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/camel-rabbitmq-routing-issue-tp5744371p5744374.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: camel-rabbitmq

2013-12-05 Thread Willem Jiang
You need to remove the message header which is start with “rabbitmq.” just like 
this


 

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 5, 2013 at 11:19:29 PM, muthukumara...@gmail.com 
(muthukumara...@gmail.com) wrote:
>
>Hi
>
>I am using Camel 2.12.1 and Rabbitmq 3.2.1
>
>I have defined the following route in my spring config and every time I send
>a message to "general.topic" I would expect the message would end up in
>"scheduler.queue"
>
>But this doesn't happen it puts the message back to "general.queue" in a
>loop. I send only one message to "general.topic" it keeps putting the same
>message multiple times in the "general.queue" until I stop the Camel server.
>
>/
>
>
>>uri="rabbitmq://localhost/general.topic?queue=general.queue&routingKey=general.queue&exchangeType=topic&username=guest&password=guest&autoDelete=false&durable=true"
>/>
>>uri="rabbitmq://localhost/scheduler.topic?queue=scheduler.queue&routingKey=scheduler.queue&exchangeType=topic&username=guest&password=guest&autoDelete=false&durable=true"
>/>
>
>/
>
>If I change the "to" route as "/>uri="log:com.mycompany.order?level=INFO"/>/" 
>it logs the message properly in
>the log and only once.
>
>Any help or suggestions?.
>
>Thanks.
>Muthu
>
>
>
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/camel-rabbitmq-tp5744371.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: Passing multiple parameters to CXF endpoint

2013-12-05 Thread Willem Jiang
Hi,

You need set up the defaultOperationName option in the url if you don’t set the 
OperationName header on the message.

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 5, 2013 at 2:49:59 PM, trilochan237 
(kartheektrilochan...@gmail.com) wrote:
>
>Hi,
>Can anyone help in passing multiple parameters to the CXF endpoint which is
>expecting multiple parameters.
>
>from("direct:test1").process(new Processor() {
>
>@Override
>public void process(Exchange arg0) throws Exception {
>arg0.getOut().setBody("testmessage");
>
>}
>
>}).to("cxf://http://localhost:8085/FinEdge-General/xrmServices/2011/Organization.svc?serviceClass=com.hcl.flsl.integration.msdn.crmwcf.IOrganizationService";);
>
>Error I am facing is:
>
>et the wrong parameter size to invoke the out service, Expect size 3,
>Parameter size 1. Please check if the message body matches the CXFEndpoint
>POJO Dataformat request.
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/Passing-multiple-parameters-to-CXF-endpoint-tp5744345.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: Consuming SOAP web service using Camel

2013-12-04 Thread Willem Jiang
What kind of CXF data format do you use?
I doubt you may put a  tag there.


Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem


On Wed, Dec 4, 2013 at 7:45 PM, rameshbabu wrote:

>  Hi,
>
> I am trying to consuming the soap web service using camel.
>
>  
> 
>  // I am preparing request Object
> 
> 
>  <soapenv:Envelope
>
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
>
> xmlns:ser="http://www.sstdomain.com/service/">;
> <soapenv:Header/>
> <soapenv:Body>
>
> ${in.body};
> </soapenv:Body>
> </soapenv:Envelope>
> </soapenv:Envelope>
>   
> 
>
> 
> 
>
>
>  I am facing the following  issue.
>
>
>  org.apache.camel.RuntimeCamelException:
> org.apache.cxf.binding.soap.SoapFault: No namespace on "HTML" element. You
> must send a SOAP request.
> at
>
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1157)[88:org.apache.camel.camel-core:2.8.0.fuse-07-15]
> at
>
> org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:184)[93:org.apache.camel.camel-jms:2.8.0.fuse-07-15]
> at
>
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:110)[93:org.apache.camel.camel-jms:2.8.0.fuse-07-15]
> at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)[94:org.springframework.jms:3.0.5.RELEASE]
> at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)[94:org.springframework.jms:3.0.5.RELEASE]
> at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)[94:org.springframework.jms:3.0.5.RELEASE]
> at
>
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[94:org.springframework.jms:3.0.5.RELEASE]
> at
>
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[94:org.springframework.jms:3.0.5.RELEASE]
> at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)[94:org.springframework.jms:3.0.5.RELEASE]
> at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)[94:org.springframework.jms:3.0.5.RELEASE]
> at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)[94:org.springframework.jms:3.0.5.RELEASE]
> at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)[:1.6.0_27]
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.6.0_27]
> at java.lang.Thread.run(Thread.java:679)[:1.6.0_27]
> Caused by: org.apache.cxf.binding.soap.SoapFault: No namespace on "HTML"
> element. You must send a SOAP request.
> at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:109)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
> at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:141)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
> at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
> at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
> at
>
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:780)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
> at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1678)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
> at
>
> org.apache.cxf.transport.http.HTT

Re: Certificate issues when upgrading from 2.8 to 2.10

2013-12-03 Thread Willem Jiang
Hi,

Can you try to use the last Camel version to verify the if the issue is still 
there?
We upgraded the httpClient 4.x version several times.

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 3, 2013 at 3:28:50 AM, rouble (r.ou...@gmail.com) wrote:
>
>Camel Gurus,
>
>I am running Camel 2.8, and to proxy a https web service I use
>the following simple route:
>from("servlet:///proxyWebService/api/?matchOnUriPrefix=true")
>.process(myProcessor)
>
>.to("https4://realWebService:8443/api/?bridgeEndpoint=true&throwExceptionOnFailure=false");
>
>This worked great in Camel 2.8. In camel 2.10, I am getting a "Certificate
>not verified" error. I have not changed anything in my code. I register the
>same trust manager as before. I noticed in the camel logs that in 2.10,
>instead of using https4, it is using plain https. Also, instead of proxying
>a GET, it is changing it to a POST. For instance here is the relevant line
>with 2.8:
>*[ http-bio-443-exec-16] HttpProducer DEBUG
>Executing http GET method:
>https4://example.com/foo?bridgeEndpoint=true&throwExceptionOnFailure=true
>*
>and with 2.10:
>*[ http-bio-443-exec-20] HttpProducer DEBUG
>Executing http POST method: https://example.com/foo
>*
>
>My client code is the same for both cases. But I notice in 2.10 it is not
>using https4 and using https. This seems wrong.
>
>Here are some more logs from the failing 2.10 scenario:
>http-bio-443-exec-20] HttpProducer DEBUG
>Starting producer: Producer[https4://
>example.com/foo?throwExceptionOnFailure=true&bridgeEndpoint=true]
>[ http-bio-443-exec-20] ProducerCache DEBUG
>Adding to producer cache with key: Endpoint[https4://
>example.com/foo?throwExceptionOnFailure=true&bridgeEndpoint=true] fo
>r producer: Producer[https4://
>example.com/foo?throwExceptionOnFailure=true&bridgeEndpoint=true]
>[ http-bio-443-exec-20] DefaultErrorHandler DEBUG
>Redelivery enabled: false on error handler:
>DefaultErrorHandler[Producer[https4://
>example.com/foo?throwExceptionOnFailure
>=true&bridgeEndpoint=true]]
>[ http-bio-443-exec-20] HttpProducer DEBUG The
>uri used by http request is https://example.com/foo
>[ http-bio-443-exec-20] HttpProducer DEBUG No
>Content-Type provided for URL: https://example.com/foo with exchange:
>Exchange[Message: SNIPPED]
>[ http-bio-443-exec-20] HttpProducer DEBUG
>Executing http POST method: https://example.com/foo
>[ http-bio-443-exec-20] ThreadSafeClientConnManager DEBUG Get
>connection: {s}->https://example.com, timeout = 0
>[ http-bio-443-exec-20] ConnPoolByRoute DEBUG [{s}->
>https://example.com] total kept alive: 0, total issued: 0, total allocated:
>0 out of 200
>[ http-bio-443-exec-20] ConnPoolByRoute DEBUG No
>free connections [{s}->https://example.com][null]
>[ http-bio-443-exec-20] ConnPoolByRoute DEBUG
>Available capacity: 20 out of 20 [{s}->https://example.com][null]
>[ http-bio-443-exec-20] ConnPoolByRoute DEBUG
>Creating new connection [{s}->https://example.com]
>[ http-bio-443-exec-20] efaultClientConnectionOperator DEBUG
>Connecting to example.com
>[ http-bio-443-exec-20] DefaultClientConnection DEBUG
>Connection org.apache.http.impl.conn.DefaultClientConnection@14b66e7 closed
>[ http-bio-443-exec-20] DefaultClientConnection DEBUG
>Connection org.apache.http.impl.conn.DefaultClientConnection@14b66e7 shut
>down
>[ http-bio-443-exec-20] ThreadSafeClientConnManager DEBUG
>Released connection is not reusable.
>[ http-bio-443-exec-20] ConnPoolByRoute DEBUG
>Releasing connection [{s}->https://example.com][null]
>[ http-bio-443-exec-20] DefaultClientConnection DEBUG
>Connection org.apache.http.impl.conn.DefaultClientConnection@14b66e7 closed
>[ http-bio-443-exec-20] ConnPoolByRoute DEBUG
>Notifying no-one, there are no waiting threads
>[ http-bio-443-exec-20] DefaultErrorHandler DEBUG
>Failed delivery for (MessageId: ID-apigw-hcmf-ws1-45019-1385508799740-0-3
>on ExchangeId: ID-apigw-hcmf-ws1-45019-1385508799740-0-4). On delivery
>attempt: 0 caught: javax.net.ssl.SSLException: Certificate not verified.
>[ http-bio-443-exec-20] TestExceptionHandler INFO
>TestExceptionHandler.process()
>[ http-bio-443-exec-20] TestExceptionHandler INFO
>Error-Certificate not verified. Certificate not verified.
>[ http-bio-443-exec-20] TestExceptionHandler INFO
>StackTrace--
>javax.net.ssl.SSLException: Certificate not verified.
>at com.rsa.sslj.x.aE.b(Unknown Source)
>at com.rsa.sslj.x.aE.a(Unknown Source)
>at com.rsa.sslj.x.aE.a(Unknown Source)
>at com.rsa.sslj.x.aP.c(Unknown Source)
>at com.rsa.sslj.x.aP.a(Unknown Source)
>at com.rsa.sslj.x.aP.h(Unknown Source)
>at com.rsa.sslj.x.cz.startHandshake(Unknown Source)
>at
>org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:534)
>
>
>tia,
>rouble
>



Re: Persist headers when using cache

2013-12-03 Thread Willem Jiang
The message header value could not be Serializable and camel cannot decide 
which header need to be put into the cache, and if you put a map instance into 
the message header it could make the things worse. I think you can take 
advantage of the Camel TypeConverter[1] by apply your customer converter which 
can turn the message body with the header to be the object you want to set to 
the Cache.

[1]http://camel.apache.org/type-converter.html
-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 3, 2013 at 10:18:05 PM, shindito (atanas.shin...@gmail.com) wrote:
>
>I don't think that the persistence configuration influences how the cache
>component writes the exchanges into the cache.
>When performing add or update operations, the
>*org.apache.camel.component.cache.CacheProducer* class uses its
>createElementFromBody() method which takes the in message body from the
>exchange and creates a cache element from it. The message headers are not
>considered at all, thus the headers loss.
>
>Unfortunately, it seems that whether headers should be considered when
>creating the cache element is not customizable.
>
>*@Camel team*: what is you recommendation for this use case: we put some
>custom headers when creating a message and need them on the consumer side
>(after they have been sent to and consumed from the cache component)?
>One option would be to story the headers as part of the body before passing
>the message to the cache, and then extracting them back from it before the
>consumed message is passed to the processor, but will add overhead that we
>would like to avoid.
>
>Best regards,
>Atanas
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/Persist-headers-when-using-cache-tp5744069p5744244.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: Getting http status code from cxfrs in onException handler

2013-12-01 Thread Willem Jiang
Hi,

I just checked the code of CxfRsProducer, if you set the 
throwExceptionOnFailure to be true, you can only get the Http status code from 
the exception.
If you set the throwExceptionOnFailure option to be false, you can find the 
Http status code from the out message header with the key of 
“CamelHttpResponseCode”.

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On November 29, 2013 at 3:44:09 PM, Preben.Asmussen (p...@dr.dk) wrote:
>
>Hi
>
>I have a onException block where i want to handle
>org.apache.camel.component.cxf.CxfOperationException
>but only when the status is 404. other status codes should fail and
>rollback.
>
>The route is ->
>
>>uri="hubTopic:topic:CMS_CONTENT_HUB?clientId=NEWS&durableSubscriptionName=NEWS"
>/>
>
>
>org.apache.camel.component.cxf.CxfOperationException
>
>
>
>true
>
>
>
>>uri="cxfrs:bean:allnews?synchronous=true&throwExceptionOnFailure=true"/>
>
>
>the HttpExceptionInterpreter is kind of simple ->
>public static boolean is404(@ExchangeException CxfOperationException
>exception) {
>return exception.getStatusCode() == 404;
>}
>
>I would guess that I could avoid the bean, and that the http status code
>would be set on the exchange header (in or out) so that i could use the
>simple language to do something like out.header. == 404 in the
>onWhen.
>
>Is that possible ?
>
>There is no http status code on the in.header btw.
>
>I'm using Camel version 2.11.1
>
>Best,
>Preben
>
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/Getting-http-status-code-from-cxfrs-in-onException-handler-tp5744066.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: Persist headers when using cache

2013-12-01 Thread Willem Jiang
Can I have a look at your route?
I’m not sure how you did the persistent.

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On November 29, 2013 at 5:31:53 PM, marioradev (mario.ra...@softwareag.com) 
wrote:
>
>Hi there,
>
>We are using cache component to persist our messages. Before persisting and
>emitting we add some extra specific headers to the event/message that we use
>when it is received. However only the message body (payload) is persisted.
>We need also headers to be persisted. I have searched for some property that
>could specify that but could not find anything.
>
>Could this behaviour of cache component be handled/managed in some way? Is
>this behaviour done for some reason this way? Could you suggest us some
>solution about this problem - we could explicitly add headers to the body
>and serialize them but this is an expensive operation which should be done
>on both sides - from the emitter and consumer. Any other proposals?
>
>Regards, Mario.
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/Persist-headers-when-using-cache-tp5744069.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: StaxConverter throws NPE

2013-12-01 Thread Willem Jiang
I just submit a patch into master branch, please check it out and play with 
your application.

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On November 29, 2013 at 7:30:07 PM, sbo13 (sb...@gmx.de) wrote:
>
>Copy of CAMEL-7025  
>
>This issue only happens when running in weblogic:
>
>After updating to Camel 2.12.2 the method createXMLStreamReader(InputStream
>in, Exchange exchange) in staxConverter throws an NPE because of the missing
>charsetName.
>Comparing the class with the previous version I saw camel no longer falls
>back to the default charset.
>
>As a workaround I set the property Exchange.CHARSET_NAME on explicitly ->
>still the same error.
>
>Debugging the code I noticed that in
>org.apache.camel.impl.converter.BaseTypeConverterRegistry#convertTo line 98
>the exchange is not passed to the converter so I can neither use an explicit
>nor an implicit charset.
>
>Any workaround/fix would be greatly appreciated!
>
>see JIRA for Stacktrace
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/StaxConverter-throws-NPE-tp5744074.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: messaging between several apps tied with sso

2013-12-01 Thread Willem Jiang
Hi,

You may consider to use camel to build a proxy which can only access from the 
outside, then route the request to CXF services or the REST services. Now you 
just need to enable the single sign on on the proxy server (which should be 
same with the way you did with CXF service)

You can find some information about camel-cxf proxy here[1]

[1]http://camel.apache.org/cxf-proxy-example.html


-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On November 30, 2013 at 8:10:11 AM, fachhoch (fachh...@gmail.com) wrote:
>
>We have several java application tied using single sign on , each application
>has its own database.we are using cxf and rest services for any information
>one app needs from other .Using cxf the problem is web service can be
>accessed from anywhere and we have to add security and any app which wants
>to consume the service must provide security etc which is time consuming and
>every time its changed , clients must be reconfigured. As camel is kind of
>ESB , can it provide us a mecanisim for intercommunication between apps or I
>need a messaging system which is simple and easy to create and cannot be
>accessed from outside the network.please advice.
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/messaging-between-several-apps-tied-with-sso-tp5744094.html
>Sent from the Camel - Users mailing list archive at Nabble.com.  



<    2   3   4   5   6   7   8   9   10   11   >