git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XPath error for get element from soapenv:Envelope


I need to get element called CMDRequest from soapenv:Envelope,then save it
at header variable for next step
but i got exception


org.apache.cxf.interceptor.Fault:
org.apache.camel.NoTypeConversionAvailableException: No type converter
available to convert from type:
com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl to the
required type: org.w3c.dom.Document with value
com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl@14319a3

the way i used is like below

from(SOAP_ENDPOINT_IN_URI + "&dataFormat=CXF_MESSAGE")
.setHeader(" CMDRequest  ",  XPathBuilder.xpath("//*[local-name() =
'CMDRequest']", String.class))

I also tried another approach

from(SOAP_ENDPOINT_IN_URI + "&dataFormat=CXF_MESSAGE")
.setHeader(" CMDRequest    ", XPathBuilder.xpath( //*[local-name() =
'CMDRequest']" , String.class))

but still not succeed. any suggestions and hints are more than welcome!

thanks
nono