I am using camel in servicemix
I am doing like this:
from("jbi:service:http://servicemix.in2m.com/operations/errorhandler/ResolvedErrorConsumerService";)
                .setBody(xpath("error/requestData"))
                .intercept(new CustomDelegateProcessor())
        
.recipientList(header(ErrorConstants.APPLICATION_NAME).append("?mep=in-out"));

This code gives me null in message for recipient. How  can I resolve it?

Here are the logs:
DEBUG - CamelJbiComponent              - Received exchange: status: Active,
role: provider
DEBUG - CamelJbiComponent              - Retrieved correlation id:
ID:192.168.2.64-11d29ba52bd-5:1
DEBUG - CamelJbiEndpoint               - Received exchange: InOnly[
  id: ID:192.168.2.64-11d29ba52bd-5:1
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/errorhandler}ResolvedErrorConsumerService
  endpoint: camel192-168-2-64-11d29ba52bd-6-6
  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>
]
DEBUG - DeliveryChannelImpl            - SendSync
ID:192.168.2.64-11d29ba52bd-2:6 in DeliveryChannel{servicemix-camel}
DEBUG - SecuredBroker                  - send exchange with secure broker
DEBUG - SecuredBroker                  - service name
:{http://servicemix.in2m.com/operations/errorhandler}DirectorService
DEBUG - SecuredBroker                  - operation name :null
DEBUG - SedaFlow                       - Called Flow send
DEBUG - DeliveryChannelImpl            - Waiting for exchange
ID:192.168.2.64-11d29ba52bd-2:6 (13a8983) to be answered in
DeliveryChannel{servicemix-camel} from sendSync
DEBUG - SedaQueue                      -
[EMAIL PROTECTED] dequeued exchange:
InOut[
  id: ID:192.168.2.64-11d29ba52bd-2:6
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/errorhandler}DirectorService
  endpoint: directorEndpoint
  in: null
]
DEBUG - HttpComponent                  - Received exchange: status: Active,
role: provider
DEBUG - HttpComponent                  - Retrieved correlation id: null
ERROR - HttpComponent                  - Error processing exchange InOut[
  id: ID:192.168.2.64-11d29ba52bd-2:6
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/errorhandler}DirectorService
  endpoint: directorEndpoint
  in: null
]
javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT when
document has no root (ie. trying to output empty document).
        at
com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1473)
        at
com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1502)
        at
com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1663)
        at
com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:585)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:130)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
        at
org.apache.servicemix.http.processors.ProviderProcessor.writeMessage(ProviderProcessor.java:335)
        at
org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:137)
        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)
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.64-11d29ba52bd-2:6 in DeliveryChannel{servicemix-http}
DEBUG - SecuredBroker                  - send exchange with secure broker
DEBUG - SedaFlow                       - Called Flow send
DEBUG - SedaQueue                      -
[EMAIL PROTECTED] dequeued
exchange: InOut[
  id: ID:192.168.2.64-11d29ba52bd-2:6
  status: Error
  role: consumer
  service:
{http://servicemix.in2m.com/operations/errorhandler}DirectorService
  endpoint: directorEndpoint
  in: null
  error: javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT
when document has no root (ie. trying to output empty document).
]
DEBUG - DeliveryChannelImpl            - Notifying exchange
ID:192.168.2.64-11d29ba52bd-2:6(13a8983) in
DeliveryChannel{servicemix-camel} from processInboundSynchronousExchange
DEBUG - DeliveryChannelImpl            - Notified:
ID:192.168.2.64-11d29ba52bd-2:6(13a8983) in
DeliveryChannel{servicemix-camel} from sendSync
ERROR - DeadLetterChannel              - Failed delivery for exchangeId:
ID-gpratibha.site/33499-1224765784014/0-1. On delivery attempt: 0 caught:
javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT when
document has no root (ie. trying to output empty document).
javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT when
document has no root (ie. trying to output empty document).
        at
com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1473)
        at
com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1502)
        at
com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1663)
        at
com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:585)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:130)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
        at
org.apache.servicemix.http.processors.ProviderProcessor.writeMessage(ProviderProcessor.java:335)
        at
org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:137)
        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)
*******************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-11d29ba52bd-0:1] with service:
null component: [EMAIL PROTECTED]
INFO  - ComponentMBeanImpl             - Initializing component:
ID:192.168.2.64-11d29ba52bd-0:1
INFO  - ComponentMBeanImpl             - Starting component:
ID:192.168.2.64-11d29ba52bd-0:1
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.64-11d29ba52bd-21:0 in
DeliveryChannel{ID:192.168.2.64-11d29ba52bd-0:1}
DEBUG - SecuredBroker                  - send exchange with secure broker
DEBUG - S

-- 
View this message in context: 
http://www.nabble.com/How-to-use-setBody-and-xpath-together--tp20130051s22882p20130051.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to