Hi What does the intercept do? Could you try without it?
Med venlig hilsen Claus Ibsen ...................................... Silverbullet Skovsgårdsvænget 21 8362 Hørning Tlf. +45 2962 7576 Web: www.silverbullet.dk -----Original Message----- From: pratibhaG [mailto:[EMAIL PROTECTED] Sent: 24. oktober 2008 14:10 To: [email protected] Subject: Re: How to use setBody and xpath together? I did as you said : from("jbi:service:http://servicemix.in2m.com/operations/errorhandler/ResolvedErrorConsumerService") .setBody(xpath("error/requestData")) .convertBodyTo(String.class).to("log:before-recipient-list") .intercept(new CustomDelegateProcessor()) .recipientList(header(ErrorConstants.APPLICATION_NAME).append("?mep=in-out")); This is what I got at logs: DEBUG - CamelJbiComponent - Retrieved correlation id: ID:192.168.2.64-11d2d51eb94-5:18 DEBUG - CamelJbiEndpoint - Received exchange: InOnly[ id: ID:192.168.2.64-11d2d51eb94-5:18 status: Active role: provider service: {http://servicemix.in2m.com/operations/errorhandler}ResolvedErrorConsumerService endpoint: camel192-168-2-64-11d2d51eb94-6-29 in: <?xml version="1.0" encoding="UTF-8"?><error> <errorCode>4000</errorCode> <requestData><request> <updateUserProfile> <userName>0910user1</userName> <firstName>pratibhaPp</firstName> <lastName>ghogalePp</lastName> <emailAddress>[EMAIL PROTECTED]</emailAddress> </updateUserProfile> </request></requestData> <message>java.net.ConnectException: Connection refused</message> <service>DirectorService</service> </error> ] [Fatal Error] :1:1: Content is not allowed in prolog. ERROR - DeadLetterChannel - Failed delivery for exchangeId: ID-gpratibha.site/51845-1224826008387/0-17. On delivery attempt: 0 caught: org.apache.camel.RuntimeCamelException: org.xml.sax.SAXParseException: Content is not allowed in prolog. org.apache.camel.RuntimeCamelException: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:411) at org.apache.camel.impl.converter.InstanceMethodTypeConverter.convertTo(InstanceMethodTypeConverter.java:50) at org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:67) at org.apache.camel.util.ExchangeHelper.convertToType(ExchangeHelper.java:175) at org.apache.servicemix.camel.JbiBinding.convertBodyToJbi(JbiBinding.java:56) at org.apache.servicemix.camel.JbiMessage.setBody(JbiMessage.java:163) at org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:50) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69) at org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:155) at org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:91) at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) at org.apache.camel.processor.Pipeline.process(Pipeline.java:85) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57) at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39) at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41) at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66) at org.apache.servicemix.camel.CamelJbiEndpoint.handleActiveProviderExchange(CamelJbiEndpoint.java:94) at org.apache.servicemix.camel.CamelJbiEndpoint.process(CamelJbiEndpoint.java:74) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.apache.camel.converter.jaxp.XmlConverter.toDOMSourceFromStream(XmlConverter.java:360) at org.apache.camel.converter.jaxp.XmlConverter.toDOMSource(XmlConverter.java:215) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:407) ... 27 more *******************request=JbiMessage: [EMAIL PROTECTED]: {org.apache.camel.Redelivered=true, org.apache.camel.RedeliveryCounter=1, application=jbi:service:http://servicemix.in2m.com/operations/errorhandler/DirectorService}} INFO - JBIContainer - Activating component for: [container=ServiceMix,name=ID:192.168.2.64-11d2d51eb94-0:16] with service: null component: [EMAIL PROTECTED] INFO - ComponentMBeanImpl - Initializing component: ID:192.168.2.64-11d2d51eb94-0:16 INFO - ComponentMBeanImpl - Starting component: ID:192.168.2.64-11d2d51eb94-0:16 DEBUG - DeliveryChannelImpl - Send ID:192.168.2.64-11d2d51eb94-131:0 in DeliveryChannel{ID:192.168.2.64-11d2d51eb94-0:16} DEBUG - SecuredBroker - send exchange with secure broker DEBUG - SecuredBroker - service name :{http://servicemix.in2m.com/operations/errorhandler}SystemErrorService DEBUG - SecuredBroker - operation name :null DEBUG - SedaFlow - Called Flow send ERROR - DeadLetterChannel - Failed delivery for exchangeId: ID-gpratibha.site/51845-1224826008387/0-17. Handled by the failure processor: Delegate(null) DEBUG - DeliveryChannelImpl - Send ID:192.168.2.64-11d2d51eb94-5:18 in DeliveryChannel{servicemix-camel} DEBUG - SecuredBroker - send exchange with secure broker DEBUG - SedaFlow - Called Flow send DEBUG - SedaQueue - [EMAIL PROTECTED] dequeued exchange: InOnly[ id: ID:192.168.2.64-11d2d51eb94-5:18 status: Done role: consumer service: {http://servicemix.in2m.com/operations/errorhandler}ResolvedErrorConsumerService endpoint: camel192-168-2-64-11d2d51eb94-6-29 in: null ] -- View this message in context: http://www.nabble.com/How-to-use-setBody-and-xpath-together--tp20130051s22882p20148919.html Sent from the Camel - Users mailing list archive at Nabble.com.
