Re: Unable to throw Soap Fault

2010-03-23 Thread Willem Jiang
Hi, Can I have a look at your Camel route? And which camel-cxf DataFormat are you using ? If you are using PAYLOAD DataFormat, I'm afraid you need to use Latest Camel 2.3.0 SNAPSHOT. As William Tam just added a enhancement for it[1] [1]https://issues.apache.org/activemq/browse/CAMEL-2495 HiS

Unable to throw Soap Fault

2010-03-23 Thread HiS
Hi All, We are using CXF 2.2.3 with Camel 2.0.0 for exposing an end-point on Tomcat 6.0. A requirement is that if incoming request does not have a parameter, soap fault needs to be thrown. As the Fault and Out Consolidation has happened in Camel 2.0.0, I am creating a soap fault and setting it i

Re: onException()

2010-03-23 Thread Claus Ibsen
Hi onException should be set right after from. So you route should be from(fromUri) .onException(Exception.class).process(new MyErrorHandler(fromUri)).end(); .to(toUri); And you can use .toF to pass arguments (like String.format). Or its simply just Java so you can do

Re: handling large files

2010-03-23 Thread Claus Ibsen
On Tue, Mar 23, 2010 at 8:24 PM, Justinson wrote: > > Unfortunately I'm getting an OutOfMemoryError using XPath splitting the way > you shown. I'm parsing a file with about 50 xml messages. > You could pre process the big file and split it into X files. Maybe by using the java.util.Scanner to

Re: Not able to invoke webservice using http component

2010-03-23 Thread Willem Jiang
Yes, if you want to send a request from camel-http endpoint, you just need put the a Sting, InputStream or HttpEntity into to the message body, otherwise camel-http endponit may not send right request to the service. Willem ychawla wrote: Hi Habeer, Do you need to do the DOM conversions that

Re: Importing routes into camel (spring) context

2010-03-23 Thread Willem Jiang
CamelContext tag supports to use the routeBuilder to load the Java DSL RouteBuilder. Maybe you can put the specific Routebuilder configure into a single spring configuration file, and import it into the Spring configuration with a single CamelContext. Willem Claus Ibsen wrote: Hi Yes its no

Re: error-handling advice with queues

2010-03-23 Thread Allen Lau
I could be wrong here, but you could easily stick the "error" object as part of the message header. As long as your components understand that header, you can easily retrieve it and only send that portion to an error queue. The default message headers in Camel is defined as Map headers; so bas

Re: error-handling advice with queues

2010-03-23 Thread jfaath
I'm not sure that would work. As I stated in my original post, I don't want to send the entire message to the error queue, just the portion that was invalid. So, if my original message has, say, 11 readings, and 3 of them are bad, I only want to send the 3 bad ones to the error queue. During pr

onException()

2010-03-23 Thread /U
Camel: 2.2.0: i have route builder which adds a route as follows with a deadLetterChannel as a fallback error handler and an onException fork: errorHandler(deadLetterChannel("bean:myBean?method=processError")); // from(fromUri).to(toUri).end(). onExc

Re: error-handling advice with queues

2010-03-23 Thread Allen Lau
How about just setting a header when you are done processing and there is an error? Then in your route, just send any message to the error queue when the header is detected. On Tue, Mar 23, 2010 at 11:57 AM, jfaath wrote: > > I'm looking for some advice on how to deal with errors during a large

Re: handling large files

2010-03-23 Thread Justinson
Unfortunately I'm getting an OutOfMemoryError using XPath splitting the way you shown. I'm parsing a file with about 50 xml messages. How can we use Apache Digester instead? Claus Ibsen-2 wrote: > > Hi > > This is as far I got with the xpath expression for splitting > http://svn.apache.o

error-handling advice with queues

2010-03-23 Thread jfaath
I'm looking for some advice on how to deal with errors during a large processing task. It seems like it should be simple but I'm having trouble figuring out what to do. I have an HTTP endpoint that receives XML messages then sticks them in a processing queue. From the queue, they get unmarshall

Re: Not able to invoke webservice using http component

2010-03-23 Thread ychawla
Hi Habeer, Do you need to do the DOM conversions that you are doing: Document input = xmlConverter.toDOMDocument(soapMessage); exchange.getIn().setBody(input); Can't you just set the body to be a string? Same with the return message. That might be tripping something up. Also, are you able to

Not able to invoke webservice using http component

2010-03-23 Thread Harbeer Kadian
Hi, I deployed a simple webservice on TomCat Server. I created following route to access the webservice using apache camel. from("direct:ProducerUri") .to("http://localhost:8095/WebServiceTutorial/services/Hello?username=admin&password=admin";); I created the exchange in the following way Strin

Re: Quickfix send/receive messages in both directions

2010-03-23 Thread kostabanderas
cmoulliard, Thanks for the reply! Let me try to explain the problem again. FIX protocol is session based where client is the initiator. That is: client --> server (IP:port) never: client (IP:port) <--- server As you say, after client makes the connection to server, a session is establ

Re: Importing routes into camel (spring) context

2010-03-23 Thread Wayne Keenan
Hi, You might want to look at springs classpath*: mechanism. I am using it to pull in in all the spring xml files that match a particular pattern fo my app; some spring files may have their own camelContext, so although you dont have a single camelContext you do get discrete config files. This

Re: Importing routes into camel (spring) context

2010-03-23 Thread Claus Ibsen
Hi Yes its not possible. Yes there is a ticket in JIRA to add such a feature Java DSL allows you to use multiple route builders. On Tue, Mar 23, 2010 at 9:02 AM, Kevin Jackson wrote: > Hi, > > I don't think it's currently possible to have a single camelContext > and use the tag to pull in rou

Importing routes into camel (spring) context

2010-03-23 Thread Kevin Jackson
Hi, I don't think it's currently possible to have a single camelContext and use the tag to pull in routing information into that context. The usecase is that we have a single application with many routes, each route is specific to an entity and I would prefer to keep the entity specific informat

Re: route from http to file, with Java DSL, howto?

2010-03-23 Thread Claus Ibsen
Hi You can use Content Enricher http://camel.apache.org/content-enricher.html from(timer:foo?period=5000").pollEnrich("http://someserver.com";).setHeader(xxx).to(file:xxx"); Instead of timer you can also use quartz to use eg CRON like triggering. In the future we will build in timer/quartz into

Re: route from http to file, with Java DSL, howto?

2010-03-23 Thread Kameltreiber
Claus Ibsen-2 wrote: > > On Tue, Mar 23, 2010 at 8:16 AM, Kameltreiber > wrote: >> >> Hi, >> i just try to write a xml result from a http request to a file. >> I'd like to use Java DSL >> at the moment it looks like this >> >>  from("http://example.com/";) >>        .setHeader(Exchange.FILE_NA

Re: ConsumerTemplate and OOM exception

2010-03-23 Thread Norman Maurer
Will do.. Bye, Norman 2010/3/23 Claus Ibsen : > Hi > > Also if its possible. Can you let it run as it is now for a while, and > then connect using JConsole to see the JMX stats. > > Then check under Camel if there is many MBeans, eg especially under > endpoints. I suspect the JMSSelector makes C

Re: ConsumerTemplate and OOM exception

2010-03-23 Thread Norman Maurer
Sorry I missed to tell you that I have the jmxAgent disabled here.. Its just not in svn atm.. I have this on my local install: 2010/3/23 Claus Ibsen : > Hi > > You disable JMX in Camel as documented here > http://camel.apache.org/camel-jmx.html > > eg by

Re: route from http to file, with Java DSL, howto?

2010-03-23 Thread Claus Ibsen
On Tue, Mar 23, 2010 at 8:16 AM, Kameltreiber wrote: > > Hi, > i just try to write a xml result from a http request to a file. > I'd like to use Java DSL > at the moment it looks like this > >  from("http://example.com/";) >        .setHeader(Exchange.FILE_NAME, constant("report.xml")) >        .t

route from http to file, with Java DSL, howto?

2010-03-23 Thread Kameltreiber
Hi, i just try to write a xml result from a http request to a file. I'd like to use Java DSL at the moment it looks like this from("http://example.com/";) .setHeader(Exchange.FILE_NAME, constant("report.xml")) .to("file:target/reports"); I alreday checked the result, and there i

Re: ConsumerTemplate and OOM exception

2010-03-23 Thread Claus Ibsen
Hi Also if its possible. Can you let it run as it is now for a while, and then connect using JConsole to see the JMX stats. Then check under Camel if there is many MBeans, eg especially under endpoints. I suspect the JMSSelector makes Camel register many endpoints in MBean, since the JMSSelector

Re: ConsumerTemplate and OOM exception

2010-03-23 Thread Claus Ibsen
Hi You disable JMX in Camel as documented here http://camel.apache.org/camel-jmx.html eg by adding this tag inside On Tue, Mar 23, 2010 at 7:27 AM, Norman Maurer wrote: > Hi Claus, > > yes we use pooled connections. Here is the config: > > http://svn.apache.org/viewvc/james/server/trunk/sp