camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CAMEL-3504) Annotation @XQuery does not work in POJO
Date Thu, 06 Jan 2011 19:11:48 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-3504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen updated CAMEL-3504:
-------------------------------

    Component/s: camel-saxon

> Annotation @XQuery does not work in POJO 
> -----------------------------------------
>
>                 Key: CAMEL-3504
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3504
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-saxon
>    Affects Versions: 2.4.0
>            Reporter: Charles Moulliard
>            Assignee: Claus Ibsen
>
> 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>cmoulliard@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.


Mime
View raw message