camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Adams <sbad...@gmail.com>
Subject Inserting property into XPath
Date Sat, 01 Mar 2014 23:38:43 GMT
Hi,

I have the following XPath in my XPathBuilder:

/soapenv:Envelope/soapenv:Body/items[id/text()='xyz']/name/text()

Everything works fine but I want to substitute 'xyz' for a property from
the exchange. I expected the following to work:

/soapenv:Envelope/soapenv:Body/items[id/text()=function:properties('id')]/name/text()

However I get the following exception:

com.sun.org.apache.xml.internal.utils.WrappedRuntimeException
at
com.sun.org.apache.xpath.internal.jaxp.JAXPExtensionsProvider.extFunction(JAXPExtensionsProvider.java:204)
at
com.sun.org.apache.xpath.internal.functions.FuncExtFunction.execute(FuncExtFunction.java:210)
at com.sun.org.apache.xpath.internal.Expression.execute(Expression.java:157)
at
com.sun.org.apache.xpath.internal.operations.Operation.execute(Operation.java:112)
at
com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest.executePredicates(PredicatedNodeTest.java:344)
at
com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest.acceptNode(PredicatedNodeTest.java:481)
at
com.sun.org.apache.xpath.internal.axes.AxesWalker.nextNode(AxesWalker.java:374)
at
com.sun.org.apache.xpath.internal.axes.WalkingIterator.nextNode(WalkingIterator.java:197)
at
com.sun.org.apache.xpath.internal.axes.NodeSequence.nextNode(NodeSequence.java:344)
at
com.sun.org.apache.xpath.internal.axes.NodeSequence.item(NodeSequence.java:539)
at com.sun.org.apache.xpath.internal.objects.XNodeSet.str(XNodeSet.java:281)
at
com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.getResultAsType(XPathExpressionImpl.java:348)
at
com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:106)
at
com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:187)
at
org.apache.camel.builder.xml.XPathBuilder.doInEvaluateAs(XPathBuilder.java:896)
at
org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:778)
at org.apache.camel.builder.xml.XPathBuilder.evaluate(XPathBuilder.java:748)
at org.apache.camel.builder.xml.XPathBuilder.evaluate(XPathBuilder.java:168)
at
org.apache.camel.builder.ProcessorBuilder$7.process(ProcessorBuilder.java:162)
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at
org.apache.camel.component.jetty.CamelContinuationServlet.service(CamelContinuationServlet.java:151)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1320)
at
org.eclipse.jetty.servlets.MultiPartFilter.doFilter(MultiPartFilter.java:119)
at
org.apache.camel.component.jetty.CamelFilterWrapper.doFilter(CamelFilterWrapper.java:44)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:367)
at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:722)

Can anyone tell me what I'm doing wrong?

Thanks,

Sam

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message