Hi,

Well, if you want to process your payload as a DOM Document (e.g. in some 
processor), why don't you just do a exchange.getIn().getBody(Document.class) ?
There are type converters from CxfPayload to Document...

If you want to access the address directly (e.g. as part of the camel route), 
you could also do an XPath to "/loc:getLocation/loc:address" to navigate to the 
node itself.

Best regards
Stephan

-----Original Message-----
From: siddhesh [mailto:[email protected]] 
Sent: Freitag, 19. Juni 2015 20:36
To: [email protected]
Subject: Difficulty in extracting data from CxfPayload

Hi 

I have created soap webservice using CXFendpoint. I am trying to Mock
ParlayX getLoaction functionality. I have wsdl and have generated required
objects. My dataformat is payload. I am sending my input body as follows.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:loc="http://www.csapi.org/schema/parlayx/terminal_location/v2_3/local";>
   <soapenv:Header/>
   <soapenv:Body>
      <loc:getLocation>
         <loc:address>tel:+919420161556</loc:address>
         <loc:requestedAccuracy>100</loc:requestedAccuracy>
      </loc:getLocation>
   </soapenv:Body>
</soapenv:Envelope>

Inside my operation method, i get this body as CxfPayload. I am having hard
time to retrieve data like address, requestedAccuracy in my method. I tried
to use methods from CxfPayloadConverter but could not find anyway to extract
data from DOMSource or Element.  I tried manually un-marshaling xml that i
get from exchange.getIn().getBody(String.class) but no luck.

Any inputs on how i can extract data from payload ? 





--
View this message in context: 
http://camel.465427.n5.nabble.com/Difficulty-in-extracting-data-from-CxfPayload-tp5768422.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to