Re: Mocking SQL results in a route

2014-06-12 Thread Claus Ibsen
Hi The weave methods of advice with has all kinds of addFirst / addList, replace et all you can use http://camel.apache.org/advicewith.html On Thu, Jun 12, 2014 at 6:48 PM, Matt Raible wrote: > > On Jun 12, 2014, at 10:14 AM, Matt Raible wrote: > >> OK, I got that to work by using @UseAdviceWit

Re: Camel 2.12.1 : How to send Http post with an attachment using ProducerTemplate

2014-06-12 Thread Claus Ibsen
Hi A good idea is to check the unit tests of the components. Maybe you can find some sample code there. For http try look in https://github.com/apache/camel/tree/master/components/camel-http/src/test/java/org/apache/camel/component/http and https://github.com/apache/camel/tree/master/components/

RE: Camel configuration to pick up file from Shared location and remote file location

2014-06-12 Thread sakchakravarthi
I have two scenarios 1. Need to access Shared location in remote machine. 2. Need to access file in remote file system (other than FTP) Thanks Ravi -- View this message in context: http://camel.465427.n5.nabble.com/Camel-configuration-to-pick-up-file-from-Shared-location-and-remote-file-loca

RE: Camel configuration to pick up file from Shared location and remote file location

2014-06-12 Thread Ravindra.Godbole
Ajit What do you mean by Remote File Location. Is it on different machine which has to be accessed thru FTP/SFTP ? Please elaborate. From: sakchakravarthi [ajit.kalyan.chakravar...@gmail.com] Sent: Friday, June 13, 2014 10:59 AM To: users@camel.apache.org

Camel configuration to pick up file from Shared location and remote file location

2014-06-12 Thread sakchakravarthi
HI All I am new to Camel SOA. Can any one help me in configuring from end point to pick a file with specific file name from shared file location and also from remote file location. Thanks Ajit -- View this message in context: http://camel.465427.n5.nabble.com/Camel-configuration-to-pick-up-fil

AW: Logical Units of Work

2014-06-12 Thread jhm
I did a sample. Jan /** * user@camel.a.o (2014-06-12): * * I have a CSV file with structured data in it: * * F1,xxx,,xxx,xxx * F2,XXX,XXX * F2,XXX,XXX * F1,xxx,,xxx,xxx * F2,XXX,XXX * F2,XXX,XXX * F2,XXX,XXX * * There is a logical connection between the rows starting * with F1

Re: Best suitable architecture using Camel

2014-06-12 Thread Willem Jiang
Even camel-core which the full EIP implementation is just about 2M jar, you can use it as library, it doesn’t mean you have to embed it in you application. It really dependents on your use case: If you want to change and deploy the camel route repeatedly, you may not want to use camel in a embe

Re: Publishing webservices in camel

2014-06-12 Thread Willem Jiang
The key value that we can republish the service in camel is for wrapping the real web service by adding some new enhancement feature such as content base routing, load balance, failover etc. If you just want to publish a web service with the implementation, please go ahead in straight way  by u

Re: Documentation bug at http://camel.apache.org/json.html

2014-06-12 Thread Willem Jiang
Thanks for pointing 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 (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On June 13, 2014 at 7:20:20 AM, md97212 (m...@qwiz

Documentation bug at http://camel.apache.org/json.html

2014-06-12 Thread md97212
This example has a typo, should be the HEIGHT field that is missing As of Camel 2.10 When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. First create one or more marker classes. public cla

Publishing webservices in camel

2014-06-12 Thread blay
Im very new to Camel. I´ve read some pages that say you can publish a Webservice with apache camel (using CXF). I have a noob doubt, ¿should the implementation of that webservice be in the same project as camel? -- View this message in context: http://camel.465427.n5.nabble.com/Publishing-webs

Best suitable architecture using Camel

2014-06-12 Thread blay
We're a defining an architecture for our company applications, so that architecture has to take care of integrations with other applications/systems. The first thing that came our mind was to centralize all integrations in an ESB (Mule), which would run in standalone mode. But new requirements appe

Camel 2.12.1 : How to send Http post with an attachment using ProducerTemplate

2014-06-12 Thread Shing Hing Man
Hi,  I tried to use producerTemplate to send a http post with an attached file.  ProducerTemplate template = context.createProducerTemplate();         Exchange exchange = template.send("http://localhost:8080/file";,                 new Processor() {                     public void process(Exc

Re: Get route information from JmsEndpoint

2014-06-12 Thread Christian Müller
Can you explain your requirements (not the solution you try to achirve). Best, Christian Am 20.05.2014 23:05 schrieb "rkjoshi2" : > Hi, > > I am creating a JMS route programatically by following code : > > > from("jms:queue:OUTBOUND_QUEUE?concurrentConsumers=5&messageListenerContainerFactoryRef=m

Re: Mocking SQL results in a route

2014-06-12 Thread Matt Raible
On Jun 12, 2014, at 10:14 AM, Matt Raible wrote: > OK, I got that to work by using @UseAdviceWith. Here's my @Before method that > sets everything up and returns SQL results: > > static List results = new ArrayList() {{ > add(new HashMap() {{ > put("fo

Re: Mocking SQL results in a route

2014-06-12 Thread Matt Raible
OK, I got that to work by using @UseAdviceWith. Here's my @Before method that sets everything up and returns SQL results: static List results = new ArrayList() {{ add(new HashMap() {{ put("foo", "bar"); }}); }}; @Bef

Re: Mocking SQL results in a route

2014-06-12 Thread Claus Ibsen
Hi @ EndpointInject does not match wildcards. Do this as I said before in my previous mail But as the SQL endpoint is dynamic calculated then its easier to use interceptSendToEndpoint and skip, as shown in the book on page 182 with the advice with. On Thu, Jun 12, 2014 at 4:47 PM, Matt Raible

Re: How to rename the file using spring DSL processed through FTP ?

2014-06-12 Thread kraythe .
There is a file name header you can set. CamelFileName. See http://camel.apache.org/ftp2.html *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: Logical Units of Work

2014-06-12 Thread kraythe .
You could use an aggregator to group the rows or use scatter gather (well gather since you are already scattered) EIP in order to correlate the rows. As for failing "in error" that rather depends on the error. If an exception is thrown that is not that hard. Gather all of the rows, split, process,

Re: autostart routes not working correctly.

2014-06-12 Thread kraythe .
First of all you are using a REALLY old version of Camel. So if it was a bug it has probably been long since fixed. Then next question is what is your route and how are you starting the context? *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable

Re: Mocking SQL results in a route

2014-06-12 Thread Matt Raible
Possibly. If I have the following annotations on my class: @MockEndpoints("sql:.*") @UseAdviceWith And I mock the SQL endpoint: @EndpointInject(uri = "mock:sql:*") MockEndpoint mockSql; Then I try to set the mocked endpoint's results: @Test public void testMockS

Logical Units of Work

2014-06-12 Thread AndyBell
Hi I've not used Camel for a number of years and now have a (to me) non-trivial task which I wonder if it can be done in Camel using standard camel component: I have a CSV file with structured data in it: F1,xxx,,xxx,xxx F2,XXX,XXX F2,XXX,XXX F1,xxx,,xxx,xxx F2,XXX,XXX F2,XXX,XXX F2,XXX,XXX The

Re: Mocking SQL results in a route

2014-06-12 Thread Claus Ibsen
Hi Is it the @AdviceWith you are looking for ? http://camel.apache.org/spring-testing.html On Thu, Jun 12, 2014 at 4:30 PM, Matt Raible wrote: > Is it possible to use adviceWith when using Spring/Camel's annotation > support? I was originally trying to use this method, but had to extend > Came

Re: Mocking SQL results in a route

2014-06-12 Thread Matt Raible
Is it possible to use adviceWith when using Spring/Camel's annotation support? I was originally trying to use this method, but had to extend CamelTestSupport and its context did not have my routes in it. On Jun 11, 2014, at 11:39 PM, Claus Ibsen wrote: > Hi > > You may want to use @MockEndpoi

Re: Mocking SQL results in a route

2014-06-12 Thread Matt Raible
This looks like exactly what I was looking for. However, it doesn't seem to work. If I set a breakpoint in the "process" method, it's never called in my unit test. Here's what my test currently looks like: @MockEndpoints("sql:.*") public class DrugRouteTests { @Autowired CamelCo

How to catch reply messages in InOut MEP?

2014-06-12 Thread Sven Bauhan
To explain my problem I provide the route in a diagram of my context component. It is composed by 2 main routes for the different message directions. My problem is now, that I have to inform the aggregator, when the message has left the route via the MESSAGE_OUT endpoint. When the message can n

How to rename the file using spring DSL processed through FTP ?

2014-06-12 Thread arvind
Hi All, I am using camel 2.9.2 and trying to rename the file . I Could append anything to the file as suffix using *move* parameter but found no way to change complete file name after processing . Below is the xml using to transfer the file through FTP

autostart routes not working correctly.

2014-06-12 Thread pbToe
Hope someone can help with this. I have an application with 1 route. When autostart is set to false, in the camel context, and start my application all does what I expect. 1 route that is not started. Then when I then start the route the route is started. Which again is what I expect. >From th

Re: CXF Endpoint accepts invalid SOAP-Envelope in POJO-Mode

2014-06-12 Thread yuncil
Doesn't have anobody an idea? Is there no option to make sure that the incoming message is a valid SOAP-Request? -- View this message in context: http://camel.465427.n5.nabble.com/CXF-Endpoint-accepts-invalid-SOAP-Envelope-in-POJO-Mode-tp5751971p5752195.html Sent from the Camel - Users mailing

Re: connectionFactory in jms component

2014-06-12 Thread Christian Müller
More details please... Best, Christian Am 21.05.2014 17:00 schrieb "rkjoshi2" : > Hi, > > Can I use only *messageListenerContainerFactoryRef* in jms component url > and > set *connectionFactory *in *MessageListenerContainer* created by my factory > class for consuming messages? > > Thanks & Regar