Re: Mina Synchronous Communication

2013-08-15 Thread Christian Müller
Can you share your decoder? What version do you use? Best, Christian Am 14.08.2013 08:14 schrieb "milltj" : > I have a client application that sends messages via a socket. For each > message it sends it requires a response. I have setup the Mina2 component > with a custom decoder to receive the

SetHeader thread ( route) safety !!?

2013-08-15 Thread Darwish
Hi , I have two route A and B , route A process message for ftp point and push it to AMQ queue after attaching actionId as header , route B pull that message and continue the processing as bellow : 101 202 The result is random , for individual me

Re: How to check that a file is empty

2013-08-15 Thread Bengt Rodehav
My original code that has been working for 2-3 years looks like this: *Predicate emptyFile = PredicateBuilder.toPredicate(SimpleLanguage.simple("${file:length} == 0")); interceptFrom().when(emptyFile).setHeader("recipient").simple("file://${file:parent}/skipped/${date:now:MMdd}").recipientLis

ExchangePatterns ?

2013-08-15 Thread Niels
Hey there, I've been playing around with the different ExchangePatterns but couldn't figure out 100% how they work. I'm assuming that ExchangePatterns are set on a Exchange based level. But during my investigation on the message headers I couldn't find the property for the ExchangePattern (I exa

Re: ExchangePatterns ?

2013-08-15 Thread Marco Westermann
Hi, for an explanation about exchange pattern have a look here: http://camel.apache.org/request-reply.html first of all I would set the exchange pattern as an argument on the to-element cause I think that makes the routes much more readable. Nevertheless I cannot find an error at your implem

Re: How to check that a file is empty

2013-08-15 Thread Claus Ibsen
Hi This is because you use the simple language "wrong" as you create an expression, and NOT a predicate. I have logged a ticket to improve on this, so you have static methods to easily create a predicate https://issues.apache.org/jira/browse/CAMEL-6639 On Thu, Aug 15, 2013 at 9:49 AM, Bengt Rode

RE: How can FTP Component connect to FTP Server via GXS Proxy

2013-08-15 Thread woopi
Hi, are you talking about the GXS box FTP Server from http://www.gxs.com/? I wasted some time to get the connection to GXS FTP working. Their ftp server uses a slightly different protocol called GMark III. To get the files downloaded you have to send the correct gmark III commands on the protoc

Re: ExchangePatterns ?

2013-08-15 Thread Niels
Thanks for the reply ;) It triggered me to enable tracing then I found the solution. Apperently when you have 2 http endpoints the exchange The consuming http endpoint would set the Exchange.HTTP_URI header and the producing http endpoint would use that URL instead of the URL defined on the comp

Re: How to check that a file is empty

2013-08-15 Thread Bengt Rodehav
Thanks Claus. I do believe that the "PredicateBuilder.toPredicate" method I use does take an expression as a parameter and returns a Predicate. Which method should I have used? /Bengt 2013/8/15 Claus Ibsen > Hi > > This is because you use the simple language "wrong" as you create an > expre

Re: How to check that a file is empty

2013-08-15 Thread Claus Ibsen
There should be non static methods on simple language to create a predicate. On Thu, Aug 15, 2013 at 1:43 PM, Bengt Rodehav wrote: > Thanks Claus. > > I do believe that the "PredicateBuilder.toPredicate" method I use does take > an expression as a parameter and returns a Predicate. Which method s

Re: Why can not get the data

2013-08-15 Thread Chris Wolf
Do you just need an Http server for unit testing? Maybe take a look at the class "HttpTestServer.java" in this directory in Git: https://fisheye6.atlassian.com/browse/camel-git/tests/camel-itest/src/test/java/org/apache/camel/itest/http On Wed, Aug 14, 2013 at 11:01 PM, yiwang wrote: > I rewrit

Re: How to check that a file is empty

2013-08-15 Thread Bengt Rodehav
OK - thanks. /Bengt 2013/8/15 Claus Ibsen > There should be non static methods on simple language to create a > predicate. > > On Thu, Aug 15, 2013 at 1:43 PM, Bengt Rodehav wrote: > > Thanks Claus. > > > > I do believe that the "PredicateBuilder.toPredicate" method I use does > take > > an e

wireTap: how to put a map in newExchangeBody?

2013-08-15 Thread PJ Walstroem
hello, I have a map with two entries which I would like to use as the new body in a wireTap .wireTap("log:foo").newExchangeBody(myMap).end() I managed doing this by writing a custom Expression, but there must be an easier way of doing this? .newExchangeBody(new Expression() { @Override public T

Re: wireTap: how to put a map in newExchangeBody?

2013-08-15 Thread Claus Ibsen
.wireTap("log:foo").newExchangeBody(constant(myMap)).end() On Thu, Aug 15, 2013 at 4:01 PM, PJ Walstroem wrote: > hello, > I have a map with two entries which I would like to use as the new body in a > wireTap > > .wireTap("log:foo").newExchangeBody(myMap).end() > > I managed doing this by writin

Re: Where can I find an example of specifying a custom resequence comparator in Spring

2013-08-15 Thread Claus Ibsen
Try the unit tests of camel-spring On Wed, Aug 14, 2013 at 5:37 PM, bocamel wrote: > I try to keep all my routes in Spring, but I cannot find any example about > how to define the following in Spring: > > .resequence(header("seqnum")).stream().capacity(500).timeout(1).comparator(myComparator)

Re: wireTap: how to put a map in newExchangeBody?

2013-08-15 Thread PJ Walstroem
great, thank you :-) -- View this message in context: http://camel.465427.n5.nabble.com/wireTap-how-to-put-a-map-in-newExchangeBody-tp5737340p5737343.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: SJMS component and IBM WebsphereMQ class cast error

2013-08-15 Thread nigel
Created JIRA CAMEL-6641 and attached a patch -- View this message in context: http://camel.465427.n5.nabble.com/SJMS-component-and-IBM-WebsphereMQ-class-cast-error-tp5737010p5737345.html Sent from the Camel - Users mailing list archive at Nabble.com.

Consuming Excel File with consumer template

2013-08-15 Thread skumar
Hi All, Can some one help me in using excel file with consumer template. I am trying it with a simple route for testing: file:${properties:inbound_home}/pgsl?include=SOCGEN_2Records.xls and loc

Re: Creating then starting a JMS consumer around another component

2013-08-15 Thread nigel
This is a common pattern I've seen before. It's not practical to have persistent queues/topics with each update to the database table being stored due to the transient nature of the consumer population (number of consumers is variable and their liveliness has no pattern). As Mark points out you nee

Re: Consuming Excel File with consumer template

2013-08-15 Thread skumar
For those who have the same issue I like to share the information that : I get rid of this bug by using this line InputStream body =consumer.receiveBody(endPointUri,2000,InputStream.class); and changing correspondingly on the ExcelParser class. thanks, -- View this message in context: http

Re: SetHeader thread ( route) safety !!?

2013-08-15 Thread Christian Müller
I cannot believe it. Can you provide an unit test which show this issue? Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/

Need help trying to pull from paged web api

2013-08-15 Thread Dale King
I am a newbie to Camel and am trying to set up Camel route(s) to tackle this situation. I want to update a local database with records that are made available through a web API and periodically pull in new records to the database. Unfortunately, the only API to access the records is a paged API w

Re: Can´t send mail using gmail smtp server using caml smtps component = javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

2013-08-15 Thread Christian Müller
The following test works for me: package org.apache.camel.component.mail; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; public class GMailProducerTest extends CamelTestSupport { @Test public void testProduer()

Re: How to add Vendor Specific Optional Parameter in CamelSmppOptionalParameters

2013-08-15 Thread Christian Müller
I'm afraid this is not possible right now, but it could be added. Feel free to log a JIRA and I will work on a patch. Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apac

MTOM message part not formatted correctly according to RFC 1341 using CRLFLF instead of CRLFCRLF

2013-08-15 Thread Clay
A .Net WCF client is throwing a parsing error on the MTOM message returned from our Camel endpoint. Looking at the message sent by Camel in WireShark, we see the header part is preceded by ”CRLFLF”, ”--”, ”boundary”, instead of ”CRLF”, ”--”, ”boundary”, which is not according to the RFC 1341 speci

Re: Why can not get the data

2013-08-15 Thread yiwang
hi: I have direct access to "http://localhost:8080/wms/query_all_handlover_note?type=source";. Can get the json data.I may not need an Http server for unit testing.I download the HttpTestServer.java,but have errors.If you feel the need,so how should I import which packages, normal operation of t

Re: Why can not get the data

2013-08-15 Thread yiwang
Hi: Add the corresponding jar package. Before the code changes for main.addRouteBuilder(new RouteBuilder() { public void configure() { from("jetty://http://localhost:8080/wms/query_all_handlover_note?type=source";) .to("file:d:/

Re: Why can not get the data

2013-08-15 Thread yiwang
began to visit "http://localhost:8080/wms/query_all_handlover_note?type=source"; ,The results are shown: {"total":"1","rows":[{"id":51,"noteNo":"43a43d88-4f7f-4364-ad22-cd2076964d7a","from_entry_type":"dd","from_entry_no":"dd","storage_name":"dianlan","model_number":"d1","number":"ed","unit":"d","e

Re: Where can I find an example of specifying a custom resequence comparator in Spring

2013-08-15 Thread Claus Ibsen
Hi This is actually not possible today so I logged a ticket https://issues.apache.org/jira/browse/CAMEL-6642 Thanks for bringing this to our attention. On Wed, Aug 14, 2013 at 5:37 PM, bocamel wrote: > I try to keep all my routes in Spring, but I cannot find any example about > how to define th