Re: camel-cxf content-type response header

2009-05-04 Thread Marc Giger
Hi Willem, How to get the headers in a route is not the problem but how to send specific headers back to the client. I saw there is a new mechanism in camel 1.6 to filter specific headers. E.g. CxfHeaderFilterStrategy. How can I apply a customized filter strategy to the spring-declared endpoints?

Re: Tailing a Rotating Log

2009-05-04 Thread Claus Ibsen
On Tue, May 5, 2009 at 7:54 AM, bwtaylor wrote: > > Cool, thanks for the help. > > I've just been peeking at the stream component and had another idea occurred > to me: write a RotatingLogInputStream class and create a new component that > extends stream component that uses this as its input strea

Re: Tailing a Rotating Log

2009-05-04 Thread bwtaylor
Cool, thanks for the help. I've just been peeking at the stream component and had another idea occurred to me: write a RotatingLogInputStream class and create a new component that extends stream component that uses this as its input stream. -- View this message in context: http://www.nabble.com

Re: Timer endpoint and errorHandler

2009-05-04 Thread arhan
Willem, sure! Here it is: http://www.springframework.org/schema/beans"; 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-2.5.xsd http://came

Re: How long do the camel headers live in routes?

2009-05-04 Thread Claus Ibsen
And if you use Camel 1.x. You can check the 1.6.0 XSD for instance: http://camel.apache.org/schema/spring/camel-spring-1.6.0.xsd There is a setProperty XML tag. On Mon, May 4, 2009 at 9:57 PM, Roman Kalukiewicz wrote: > 2009/5/4 Matteo Redaelli : >> >> Thanks for your quick answer. >> >> Is it

Re: camel-cxf content-type response header

2009-05-04 Thread Willem Jiang
Hi, You can get the content-type and response code with below code example in Camel 1.x . Map context = (Map)exchange.getIn().getHeaders().get("ResponseContext"); assertNotNull("Expect to get the protocal header ", context.get("org.apache.cxf.message.Message.PROTOCOL_HEADERS")); Map prot

Re: Timer endpoint and errorHandler

2009-05-04 Thread Willem Jiang
Hi, Can you also show us the "config.xml", it will help us to find the key of this issue. Willem arhan wrote: > Seems that I found the difference, but have no solution yet. > > Sorry, I wasn't specific enough at first. > > Instead of starting the app using org.apache.camel.spring.Main class, I

passing an xml fragment to xslt

2009-05-04 Thread Gert-Jan van de Streek
I want to pass an xml fragment to an xslt. I have the following code where the queue holds xml messages from("activemq:example.A") .setHeader("agent.id", new XPathExpression("/")) .process(new ReadLocalFile()) .to("xslt:transform.xsl")

Re: How long do the camel headers live in routes?

2009-05-04 Thread Roman Kalukiewicz
2009/5/4 Matteo Redaelli : > > Thanks for your quick answer. > > Is it possibile to use SetProperty in Spring XML routes? Sure it is. Take a look at camel schema for XML routes: http://camel.apache.org/schema/spring/camel-spring.xsd there is setProperty element defined and you can use it the sam

Re: How long do the camel headers live in routes?

2009-05-04 Thread Matteo Redaelli
Thanks for your quick answer. Is it possibile to use SetProperty in Spring XML routes? I cannot find any doc/example, only this issue https://issues.apache.org/activemq/browse/CAMEL-923 Thanks in advance Matteohttps://issues.apache.org/activemq/browse/CAMEL-923 RomKal wrote: > > Ciao Matte

Re: How long do the camel headers live in routes?

2009-05-04 Thread Roman Kalukiewicz
Ciao Matteo! You can use exchange properties for this. You do it using setProperty() instead of setHeader() and they live as long as the flow. Headers can be lost at endpoints basically as they usually represent some component specific things (request headers in http protocol are different than r

How long do the camel headers live in routes?

2009-05-04 Thread Matteo Redaelli
Ciao I would like to save a value at the beginnig of my route and reuse it at the end. What could I do? Headers? How long do the camel headers live in routes? Is it possible to do something like from jms -> set header MYHEADER -> to velocity -> to jdbc -> split -> to velocity (reusing MYHEADE

Re: Timer endpoint and errorHandler

2009-05-04 Thread arhan
Seems that I found the difference, but have no solution yet. Sorry, I wasn't specific enough at first. Instead of starting the app using org.apache.camel.spring.Main class, I'm starting it just using the Spring context: public class App { public static void main(String[] args) { new Class

Re: Timer endpoint and errorHandler

2009-05-04 Thread Claus Ibsen
On Mon, May 4, 2009 at 6:06 PM, arhan wrote: > > Hi! > > I tried it with 2.0-M1 Well I am surprised. The unit test I added is 2.0-SNAPSHOT. How do you start/run Camel? Could be something there. And what is logged in the output when you say it "hangs"? And how have you defined your bean? You can

Re: Timer endpoint and errorHandler

2009-05-04 Thread arhan
Hi! I tried it with 2.0-M1 Claus Ibsen-2 wrote: > > > I just added unit test in Camel 2.0 that looks like you route and it > works: > http://svn.apache.org/viewvc?view=rev&revision=771312 > > What version of Camel are you using? > > The reason could be the body message is null, as the timer

camel-cxf content-type response header

2009-05-04 Thread Marc Giger
Hi all, I'm missing the content-type http response header in camel-cxf 1.6 (cxf:bean:localEndpoint?dataFormat=MESSAGE) HTTP/1.1 200 OK Content-Length: 4648 Server: Jetty(6.1.10) or HTTP/1.1 500 Internal Server Error Content-Length: 253 Server: Jetty(6.1.10) What do I have to do to get it back

Re: Timer endpoint and errorHandler

2009-05-04 Thread Claus Ibsen
Hi On Mon, May 4, 2009 at 3:07 PM, arhan wrote: > > Hi, > > See the code snipped below. > I'm using the timer endpoint to execute some route periodically, and it > works until I add error handler. If errorHandler(..) is included, the > process doesn't stay up and running but instead it does all t

Timer endpoint and errorHandler

2009-05-04 Thread arhan
Hi, See the code snipped below. I'm using the timer endpoint to execute some route periodically, and it works until I add error handler. If errorHandler(..) is included, the process doesn't stay up and running but instead it does all the initialization and exits gracefully. RouteBuilder routeBu

Re: Error handling Questions

2009-05-04 Thread Claus Ibsen
On Mon, May 4, 2009 at 12:44 PM, Zhi Zhou wrote: > Great. it's closer to what I want now..Thanks Claus. > However, my producer is a sync processor, which has finished processing that > exchange, if I set the exception to the exchange, it seems no other way I > can pass it to camel's control any mo

Re: Error handling Questions

2009-05-04 Thread Zhi Zhou
Great. it's closer to what I want now..Thanks Claus. However, my producer is a sync processor, which has finished processing that exchange, if I set the exception to the exchange, it seems no other way I can pass it to camel's control any more. I just cached the exchange in the timeout task when fi

Re: Error handling Questions

2009-05-04 Thread Claus Ibsen
On Mon, May 4, 2009 at 11:40 AM, Zhi Zhou wrote: > Claus, > Thank you very much for the quick response! > > On Mon, May 4, 2009 at 5:07 PM, Claus Ibsen wrote: > >> Hi >> >> What version of Camel are you using? Camel 2.0 has many improvments in >> error handling and processing over 1.x. >> > > Sor

Re: Error handling Questions

2009-05-04 Thread Roman Kalukiewicz
In Camel 1.x there is AsyncProcessor interface (it extends Processor) that allows you to handle things asynchronously. While it is rather hard to use it, you have a chance to process your request asynchronously. In fact Camel doesn't specify if error handling will happen in some thread or not - it

Re: Error handling Questions

2009-05-04 Thread Zhi Zhou
Claus, Thank you very much for the quick response! On Mon, May 4, 2009 at 5:07 PM, Claus Ibsen wrote: > Hi > > What version of Camel are you using? Camel 2.0 has many improvments in > error handling and processing over 1.x. > Sorry that I forgot to mention I am using 1.x for now as 2.0 is still

Re: Error handling Questions

2009-05-04 Thread Claus Ibsen
Hi What version of Camel are you using? Camel 2.0 has many improvments in error handling and processing over 1.x. On Mon, May 4, 2009 at 10:54 AM, Zhi Zhou wrote: > Hello all, > > Camel's error handling is pretty powerful, but lately I am having two > questions about it. > > 1) I am working a cu

Error handling Questions

2009-05-04 Thread Zhi Zhou
Hello all, Camel's error handling is pretty powerful, but lately I am having two questions about it. 1) I am working a custom camel component, and not quite sure how to handle certain error condition. I may be having wrong idea from the very beginning but let me give you a simple scenario to desc