Annotation @XQuery does not work in POJO -----------------------------------------
Key: CAMEL-3504 URL: https://issues.apache.org/jira/browse/CAMEL-3504 Project: Camel Issue Type: Bug Affects Versions: 2.4.0 Reporter: Charles Moulliard When we try to extract content from XML using a XQuery annotation in the method signature, we receive the full XML message and not the content defined by the XQuery expression 1) camel route {code} <camelContext trace="true" xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="cxf:bean:busServicesFinder?dataFormat=MESSAGE"/> <convertBodyTo type="String"/> <log message="WebService called" loggingLevel="INFO"/> <choice> <when> <xpath>//serviceName = 'service1'</xpath> <log message="Service = service1" loggingLevel="INFO"/> <bean ref="soapBean"/> </when> <otherwise> <log message="Service not equal to service1" loggingLevel="INFO"/> </otherwise> </choice> <log message="Reply to client" loggingLevel="INFO"/> <transform> <simple>OK</simple> </transform> </route> </camelContext> {code} 2) POJO public String generateSoapMessage(@XQuery("//payload") String payload) 3) XML received {code} <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prox="http://proxy.client.fr"> <soapenv:Header/> <soapenv:Body> <prox:getServiceFromBus> <serviceName>service1</serviceName> <payload> <inputReportIncident> <incidentId>01</incidentId> <incidentDate>2010-10-04</incidentDate> <givenName>Charles</givenName> <familyName>Moulliard</familyName> <summary>This is a test repart</summary> <details>server is down</details> <email>cmoulli...@fusesource.com</email> <phone>+32 473 604 014</phone> </inputReportIncident> </payload> </prox:getServiceFromBus> </soapenv:Body> </soapenv:Envelope> {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.