And I tried using Xquery this way

*       <camel:when>
                                        
<camel:simple>${in.header.operationName} ==
'CreateOperation'</camel:simple>
                                        <camel:setProperty 
propertyName="recordCount">
                                                
<camel:xquery>count(//CustomerRecords/Record)</camel:xquery>
                                        </camel:setProperty>
                                        <camel:log message="Count = 
${property.recordCount}"
                                                loggingLevel="INFO" 
logName="Log" />*

it returns following exception

org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to
insert a node where it is not permitted.

The incoming XML is as follows
*<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
   <soapenv:Header/>
   <soapenv:Body>
      <CustomerRecords>
         
         <Record>
            <Cust_ID>1010</Cust_ID>
            <Cust_Name>REJI MATHEWS</Cust_Name>
            <Cust_Address>7TH MAIN, BANGALORE</Cust_Address>
            <Cust_Balance>1000</Cust_Balance>
            <Cust_Phone>+4231213</Cust_Phone>
            <Cust_PIN>560043</Cust_PIN>
         </Record>
           <Record>
            <Cust_ID>1004</Cust_ID>
            <Cust_Name>REJI MATHEWS</Cust_Name>
            <Cust_Address>7TH MAIN, BANASAWADI, BANGALORE</Cust_Address>
            <Cust_Balance>1000</Cust_Balance>
            <Cust_Phone>+23232</Cust_Phone>
            <Cust_PIN>560043</Cust_PIN>
         </Record>

  <Record>
            <Cust_ID>1006</Cust_ID>
            <Cust_Name>REJI MATHEWS</Cust_Name>
            <Cust_Address>7TH MAIN, BANGALORE</Cust_Address>
            <Cust_Balance>1000</Cust_Balance>
            <Cust_Phone>123</Cust_Phone>
            <Cust_PIN>560043</Cust_PIN>
         </Record>

      </CustomerRecords>
   </soapenv:Body>
</soapenv:Envelope>*



-----
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & 
Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-LOOP-tp5765424p5765429.html
Sent from the Camel - Users mailing list archive at Nabble.com.
  • Camel LOOP contactreji
    • Re: Camel LOOP contactreji

Reply via email to