i am new to camel

2012-03-26 Thread shaharyar
hi i am newbie to camel.the guide is not to helpful for basic. i would be very thankful if any person guide me about a basic app whose basic purpose is to read an XML and write it to the file. Also please guide me about routes and proccessor. Thanks alot -- View this message in context: http://c

Re: i am new to camel

2012-03-26 Thread Claus Ibsen
Hi Welcome to the community. I suggest to read this article that talks what Camel is, and shows what it can do. http://java.dzone.com/articles/open-source-integration-apache Also chapter 1 of this book gives you introduction to Camel, and more details about the Camel concepts http://manning.com/

Mock testing route ends prematurely

2012-03-26 Thread Borut Bolčina
Hello, I am trying to test the number of messages and there is something I do not understand. The test ends successfully before the messages arrive at the mock endpoint. here is the test class: public class WeatherCurrentTest extends CamelTestSupport { @Override protected RouteBuilder createRou

Get routeId from Exchange / in Processor

2012-03-26 Thread Alex Anderson
Is it possible to get the ID of the current route from an Exchange, or to have the routeId provided to a processor/beanRef method as an argument?

Re: Headers disappearing in RoutingSlip

2012-03-26 Thread Alex Anderson
On 23 March 2012 16:33, Claus Ibsen wrote: > Hi > > You can use the tracer to help see where the headers dissappear > http://camel.apache.org/tracer > > And see this FAQ as well > http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html Thanks, Claus. This helped me debug to some e

Re: Get routeId from Exchange / in Processor

2012-03-26 Thread Claus Ibsen
Hi The Exchange itself has a getFromRouteId which returns the id of the route, that created the exchange. If you pass the exchange in multiple routes, you can get the current route via UnitOfWork -> getRouteContext -> Route -> Id. You can get the UoW from the exchange. This is likely to be impro

Re: Mock testing route ends prematurely

2012-03-26 Thread Claus Ibsen
Hi Its not really clear from your description what is your problem. I think you talk about that there is 9 messages, but after 5 messages it completes, but you want it to fail. Or something like that. The assertion will complete when the expectations is satisfied. In your case thats when 5 messa

Re: multiple from endpoints and jmx console

2012-03-26 Thread Claus Ibsen
Hi This is currently a limitation. What version of Camel do you use? On Thu, Mar 22, 2012 at 9:58 PM, surya wrote: > Hi, > > While monitoring camel app using Jconsole I observed that when we use > multiple endpoints in from() to create multiple routes..like below: > > from("jms:route1","direct:

Re: i am new to camel

2012-03-26 Thread shaharyar
thanx alot for your kind help.I hope this will help me -- View this message in context: http://camel.465427.n5.nabble.com/i-am-new-to-camel-tp5594434p5594726.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Passing post parameter as body in the cxfrs call.

2012-03-26 Thread atg roxx
HI Team, Could anyone please reply to this. Many thanks in advance. --cheers, atg roxx On Fri, Mar 23, 2012 at 5:05 PM, atg roxx wrote: > Hi Team, > > I have a unusually requirement. > > I have to send a request xml to a restful service as as body generated > from POST parameter. > > I am u

Re: Get routeId from Exchange / in Processor

2012-03-26 Thread Alex Anderson
Thanks, this (temporarily) solves my missing header issues :¬) On 26 March 2012 12:24, Claus Ibsen wrote: > Hi > > The Exchange itself has a getFromRouteId which returns the id of the > route, that created the exchange. > > If you pass the exchange in multiple routes, you can get the current > ro

Re: Mock testing route ends prematurely

2012-03-26 Thread Borut Bolčina
Hello, Dne 26. marec 2012 11:29 je Claus Ibsen napisal/-a: > Hi > > Its not really clear from your description what is your problem. > > I think you talk about that there is 9 messages, but after 5 messages > it completes, but you want it to fail. > Or something like that. > Exactly. > > The

Configuring endpoint programmatically

2012-03-26 Thread Borut Bolčina
Hello again, The File component can be configured with some options, I am interested in "noop=true". What can be done by: from("file:src/test/resources?fileName=myFile.xml&noop=true") is what I want to do it with code: String fileName = "src/test/resources/myFile.xml"; Endpoint endpoint = new F

How to handle attachments in JMS message

2012-03-26 Thread Stefan Burkard
Hi all Camels DefaultMessage has an attachment map and CXFs message also knows attachments. But a JMS message does not know about attachments. I have an mtom-enabled SOAP service that sends an object along with file attachments (mtom to serialize attachments as binary data instead of base64). I c

Re: Configuring endpoint programmatically

2012-03-26 Thread Claus Ibsen
Hi Just use the setters on the file endpoint FileEndpoint endpoint = ... endpoint.setNoop(true); On Mon, Mar 26, 2012 at 1:16 PM, Borut Bolčina wrote: > Hello again, > > The File component can be configured with some options, I am interested in > "noop=true". What can be done by: > > from("fil

Re: Configuring endpoint programmatically

2012-03-26 Thread Borut Bolčina
It felt like a solution, but still fails. The file is moved one level lower to src/test/resources/.camel folder just like before. @Test public void testNumberOfWeatherStations() throws Exception { MockEndpoint mock = getMockEndpoint("mock:meteo1"); mock.expectedMessageCount(9); mock.setAssertPer

Re: Configuring endpoint programmatically

2012-03-26 Thread Borut Bolčina
It's the route that one is testing that matters. I added the noop option to: from("file:src/test/resources?noop=true") and then in the test method it does not matter how one constructs the endpoint. So it boils down to: @Test public void testNumberOfWeatherStations() throws Exception { MockEndp

Re: How to handle attachments in JMS message

2012-03-26 Thread Claus Ibsen
Hi The JMS data model is - body - headers / properties You can read how Camel maps to this from the Camel JMS wiki page http://camel.apache.org/jms And JMS have limitations what data type you can send, especially for its properties. So for attachments, you must transfer that in a way that is su

How to register a datasource, on configure() method or constructor of a RoutBuilder ?

2012-03-26 Thread sekaijin
Hello, I can not run camel-jdbc in java. I defines a route with camel-blueprint, via a road builder (not in XML) because I know the road to be built when bundle start. when starting the bundle, I read a database that contains definitions of endpoints. with there informations, I build the road. wh

Re: Throttling: maximumRequestsPerPeriod problem

2012-03-26 Thread garrydias
These namespaces are already declared. The browser you´re using probably hides the namespace declarations. If you right click my attached xml and choose "Show Source Code" (or something like, depending on your browser) the namespace will be shown. I´ll checkout your test and post the results. tha

Re: How to handle attachments in JMS message

2012-03-26 Thread David Karlsen
Doesn't the ws-spec cover this in some way? As JMS is one possible transport? 2012/3/26 Claus Ibsen : > Hi > > The JMS data model is > - body > - headers / properties > > You can read how Camel maps to this from the Camel JMS wiki page > http://camel.apache.org/jms > > And JMS have limitations wha

Re: RESTful web service support from Camel

2012-03-26 Thread Sergey Beryozkin
Hi, Forwarding to the users list. On 26/03/12 15:36, Zemin Hu wrote: Hi, I have couple of RESTful web service that I want to use Camel as integration point. I had a brief review for restlet which is supposed to be the solution, but from I have seen, it's not straight forward to use: 1. straight

Re: How to handle attachments in JMS message

2012-03-26 Thread Christian Schneider
I guess you can use SOAP and MTOM with JMS (have not tried it though). The question is how big your attachment is and if it would be better to transport it outside JMS Christian Am 26.03.2012 16:11, schrieb David Karlsen: Doesn't the ws-spec cover this in some way? As JMS is one possible tran

Re: Configuring endpoint programmatically

2012-03-26 Thread Claus Ibsen
On Mon, Mar 26, 2012 at 2:23 PM, Borut Bolčina wrote: > It's the route that one is testing that matters. I added the noop option to: > > from("file:src/test/resources?noop=true") > This is a consumer which "pickup the files". And the noop option is only for the consumer. > and then in the test

Re: Passing post parameter as body in the cxfrs call.

2012-03-26 Thread atg roxx
Hi Team, I got the solution for ti. its simple we have to exchange.getIn().setHeader(Exchange.HTTP_METHOD, "POST"); exchange.getIn().setHeader(Exchange.CONTENT_TYPE ,"application/x-www-form-urlencoded"); exchange.getOut().setBody("Xml="+ exchange.getIn().getBody()); --Regard

Apache >> Camel >> Missing Headers

2012-03-26 Thread sambardar
When i am routing a message from endpoint to a "bean", i can't access the headers i set. Is this the way it works ? -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Missing-Headers-tp5595800p5595800.html Sent from the Camel - Users mailing list archive at Nabble.com

Re: Passing post parameter as body in the cxfrs call.

2012-03-26 Thread Christian Müller
Good to know you found a solution which works for you. I want to respond to your mail later, because I didn't understood what you was trying to do. Now, I understood... ;-) Best, Christian On Mon, Mar 26, 2012 at 6:39 PM, atg roxx wrote: > Hi Team, > > I got the solution for ti. > > its simple

Re: Apache >> Camel >> Missing Headers

2012-03-26 Thread David Karlsen
Yes you can. you can annotate the arguments with @Header to wire them in - or use the expression language/beanbinding 2012/3/26 sambardar : > When i am routing a message from endpoint to a "bean", i can't access the > headers i set. Is this the way it works ? > > -- > View this message in context:

Re: How to register a datasource, on configure() method or constructor of a RoutBuilder ?

2012-03-26 Thread Christian Müller
If you are talking about unit testing, simply override the "createRegistry()" method as in [1]. If you are talking about the real application, simply define the datasource in your spring xml and use the endpoint uri "jdbc:". Look at [2] and [3] for an example. [1] https://svn.apache.org/repos/asf

Re: Throttling: maximumRequestsPerPeriod problem

2012-03-26 Thread Christian Müller
Yes, I missed this... Could you also remove the following definitions because you don't use it: Best, Christian On Mon, Mar 26, 2012 at 4:10 PM, garrydias wrote: > These namespaces are already declared. The browser you´re using probably > hides the namespace declarations. If you right click

Re: Apache >> Camel >> Missing Headers

2012-03-26 Thread sambardar
The issue i found was that in one of the beans i modify the body of the message. After that the header is lost. But if i set back the header in the same bean where i modify the body, then header is propogated. I did e.getOut.setHeaders(e.getIn().getHeaders()) it works after i do this -- View thi

Re: Apache >> Camel >> Missing Headers

2012-03-26 Thread Claus Ibsen
On Mon, Mar 26, 2012 at 7:25 PM, sambardar wrote: > The issue i found was that in one of the beans i modify the body of the > message. After that the header is lost. But if i set back the header in the > same bean where i modify the body, then header is propogated. I did > > e.getOut.setHeaders(e.

Re: Apache >> Camel >> Missing Headers

2012-03-26 Thread sambardar
Thanks. I went through it and was very helpful in understanding what was happening. -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Missing-Headers-tp5595800p5595971.html Sent from the Camel - Users mailing list archive at Nabble.com.

Apache >> Camel >> Aggregation EIP

2012-03-26 Thread sambardar
How can we configure multiple headers in the correlationExpression for aggregate EIP? Currently I have dictionary Can i specify multiple headers as the co-relation key ? -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Aggregation-EIP-tp5596001p5596001.html Sen

CXFRS and Processing

2012-03-26 Thread GPRSLyons
Gents- Thanks much for the help so far. I am trying to do some processing on my CXFRS route before it goes back to the browser, but the body becomes null after I process. I modified an example to demonstrate my issue. In https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test

"Camel on Google App Engine Tutorial" still working?

2012-03-26 Thread Kai Wähner
Hello. I wonder if this example is still working ( http://camel.apache.org/tutorial-for-camel-on-google-app-engine.html)? I built my own GAE app with the source code and deployed it successfully to GAE. Though, when I click on the submit button of the form, I get this error message: "Error: NOT_FO

Re: Apache >> Camel >> Aggregation EIP

2012-03-26 Thread Christian Müller
That's not possible at present. Could you please explain a bit detailed what your use case is? Maybe two aggregators or a composite header will fit your needs? Best, Christian On Mon, Mar 26, 2012 at 8:01 PM, sambardar wrote: > > How can we configure multiple headers in the correlationExpression

Re: Throttling: maximumRequestsPerPeriod problem

2012-03-26 Thread garrydias
i´ll change the route instead, so I can use the *ref* property. that´s my xml updated: http://camel.465427.n5.nabble.com/file/n5596345/throttler-test-context.xml throttler-test-context.xml (I´m still setting up the tests) regards -- View this message in context: http://camel.465427.n5.nabble.

Re: Apache >> Camel >> Aggregation EIP

2012-03-26 Thread sambardar
Yes, maybe a composite header and i need to know how can i specify a composite header in Spring DSL. My Need is simply that the aggregation should happen on 2 or more keys rather than one. For example, the aggregation should take place on 2 keys - CustomerId and BillingId. -- View this message

Re: Apache >> Camel >> Aggregation EIP

2012-03-26 Thread Christian Müller
What's about this? ${in.headers.CustomerId}-${in.headers.BillingId} Best, Christian On Mon, Mar 26, 2012 at 10:51 PM, sambardar wrote: > Yes, maybe a composite header and i need to know how can i specify a > composite header in Spring DSL. > > My Need is simply that the aggregation should h

Re: Apache >> Camel >> Aggregation EIP

2012-03-26 Thread sambardar
Thanks Christian. Can you please point me to some documentation where i can find the syntax for things like these about what all can be put in Spring DSL and how. -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Aggregation-EIP-tp5596001p5596487.html Sent from th

Re: Apache >> Camel >> Aggregation EIP

2012-03-26 Thread Christian Müller
http://camel.apache.org/simple.html Best, Christian On Tue, Mar 27, 2012 at 12:03 AM, sambardar wrote: > Thanks Christian. > > Can you please point me to some documentation where i can find the syntax > for things like these about what all can be put in Spring DSL and how. > > > > -- > View this

JAR for IBM MQ

2012-03-26 Thread newbiee
Hi, I am getting BUILD error because following JARS could not be found. com.ibm.mq:com.ibm.mq.jmqi:jar:7.0.1.3 com.ibm:com.ibm.mqjms:jar:7.0.1.3 com.ibm:com.ibm.mqjms:jar:7.0.1.3 To use IBM MQ, I have added following in my POM: com.ibm.mq com.ibm.mq.jmqi 7.0.1.3

Re: Apache >> Camel >> Missing Headers

2012-03-26 Thread megachucky
Unfortunately, the link to the Gliffy diagram (Flow of an exchange through a route) is broken. Maybe someone can fix it? -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Missing-Headers-tp5595800p5596987.html Sent from the Camel - Users mailing list archive at Nabbl

Re: JAR for IBM MQ

2012-03-26 Thread Claus Ibsen
Hi IBM MQ is a commercial product, so you have to purchase it from IBM. And IBM can deliver those JARs as part of Java JMS clients. IBM do not publish those JARs to a Maven repository. And I doubt it would be legal to do so by others. Hence you cannot find those JARs in the internet. If you have

Re: JAR for IBM MQ

2012-03-26 Thread Magnus Palmér
Hi, If you have WMQ 7 installed on your computer the following environment variable will be set: MQ_JAVA_INSTALL_PATH If you only want to use WMQ as a client, the clients are freely available to download from IBM, think you need to register though. Search for Websphere MQ supportpac. However you s