On Tue, Dec 15, 2009 at 11:26 AM, Kenneth H <phecda...@gmail.com> wrote:
> > > 1. Where can I read about the ".namespace()" function syntax? I still > don't > > get why "ins" is used in both functions. I tried w3schools but didn't > find > > it. > > > >Did you find this page? > >http://www.w3schools.com/XML/xml_namespaces.asp > > > >That should help you understand usage of the namespace prefix and URI.> > > > > I know namespaces in general, bit it was the syntax of the ".namespace()" > function in xpath, I was looking for. > Ah Cool stuff. The public javadoc may be helpful to you then http://camel.apache.org/maven/camel-core/apidocs/org/apache/camel/builder/xml/XPathBuilder.html#namespace(java.lang.String,%20java.lang.String) > > > > 2. Is it possible to debug in the Camel routebuilder somehow? If I want > to > > know how the message looks like before and after the > > ".convertBodyTo(DOMSource.class)". And most important: I want to know if > > an > > expression evaluates to true, i.e. I want to "print-out" the result of > the > > when statement. Maybe something like this pseudocode: > > > > var travelRequest = xpath("//ins:TravelInsuranceRequest").namespace > > "ins","http://dzone.com/insurance")) > > > > print(travelRequest); > > > > .when(travelRequest).to(LUXURY_CAR_OUT); > > > > >I guess it depends on how you have this deployed... if its a JUnit test, > >well Eclipse or IntelliJ can easily debug that for you. Other setups may > >require extra configuration of the app server / ESB to get debugging > >working. Actually, if you just want to see what the messages look like at > >various points in your route, try enabling the tracer > >http://camel.apache.org/tracer.html > > > I will look into the tracer - didn't know of that. I have just created a > Maven project and deployed it on the Servicemix ESB. Hard to find out how > to > debug :) > If you are using the latest ServiceMix, you can follow some notes here to turn on debugging https://repository.apache.org/content/groups/public/org/apache/felix/karaf/manual/1.3.0-SNAPSHOT/manual-1.3.0-SNAPSHOT.html#KarafUsers%27Guideinonepage-5.1.Troubleshooting%2CDebuggingandProfiling > > One last novice question. In the statement: > > from("seda:a").filter(header("foo").isEqualTo("bar")).to("seda:b"); > > Where does the "foo" comes from, I mean, where do I set it? From Eclipse > I'm > creating a JMS Message, but the only headers availbe is these: > > > http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=/com.ibm.IBMDI.doc/referenceguide95.htm > > Do you know how I can use these headers/properties in a Camel choice > statement? Basicly, I just want to create the most simple example, where to > messages are send from Eclipse and goes to two different queues in a Camel > choice statement. The messages should be simple tect or objects. > You should be able to access any of the JMS headers you mentioned in the same way the "foo" header is referenced. So how are you sending JMS messages from Eclipse? I'm assuming its a function of Tivoli in the link you provided? You can also use Camel to set a header like so from("seda:a").setHeader("foo", constant("bar"))... > > Kend regards, > Kenneth H > > > > > > > -- > View this message in context: > http://old.nabble.com/Help-to-understand-xpath-expression-in-camel-routebuilder-tp26779963p26795823.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com