You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by vinayk0889 <vi...@gmail.com> on 2013/12/03 14:28:06 UTC

Need a help in camel splitter

requirement is i want to define splitter to split SOAP response and put into
ActiveMQ Queue. Please help me in that. Please correct me if i am wrong.. i
have tried some thing...

SOAP Response: 
<?xml version="1.0" encoding="UTF-8"?>
- <SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:msxsl="urn:schemas-microsoft-com:xslt">
- <SOAP-ENV:Body>
- <barceloDS_responses ip="69.121.64.141">
- <response>
<request id="1" type="valued availability list">
  <session_id>aaa6SP8c6P5BAJ</session_id>
  <language_code>ING</language_code>
</request>
<queryOfferingResponse>
   <offerings>
      <offering>
         <id>30</id>
      </offering>
      <offering>
         <id>30</id> 
      </offering>
      <offering>
         <id>30</id>
      </offering>
   </offering>
   </offerings>
</queryOfferingResponse>
</response>
  </barceloDS_responses>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

Spitter:
<split streaming="true" parallelProcessing="true" >
	            <tokenize token="offering" xml="true"/>
	            <process ref="processCreateRequest"/>
				<to uri="activemq:queue:offerDetail"/>
	        </split> 
Each splitting how can put it into different queue.. please help. 




--
View this message in context: http://camel.465427.n5.nabble.com/Need-a-help-in-camel-splitter-tp5744242.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: Need a help in camel splitter

Posted by Francois LIOT <fr...@poplidays.com>.
Hi,

Something like :

	        <split>
	            <xpath>/SOAP-ENV:Envelope/SOAP-ENV:Body/barceloDS/response/queryOfferingResponse/offerings/offering/*</xpath>
	            <to uri="activemq:splitted"/>
	        <split>
or 
	        <split>
	            <xpath>//offering/*</xpath>
	            <to uri="activemq:splitted"/>
	        <split>

Should do the trick.
Regards,

Francois

________________________________________
From: vinayk0889 <vi...@gmail.com>
Sent: Tuesday, December 3, 2013 2:28 PM
To: users@camel.apache.org
Subject: Need a help in camel splitter

requirement is i want to define splitter to split SOAP response and put into
ActiveMQ Queue. Please help me in that. Please correct me if i am wrong.. i
have tried some thing...

SOAP Response:
<?xml version="1.0" encoding="UTF-8"?>
- <SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:msxsl="urn:schemas-microsoft-com:xslt">
- <SOAP-ENV:Body>
- <barceloDS_responses ip="69.121.64.141">
- <response>
<request id="1" type="valued availability list">
  <session_id>aaa6SP8c6P5BAJ</session_id>
  <language_code>ING</language_code>
</request>
<queryOfferingResponse>
   <offerings>
      <offering>
         <id>30</id>
      </offering>
      <offering>
         <id>30</id>
      </offering>
      <offering>
         <id>30</id>
      </offering>
   </offering>
   </offerings>
</queryOfferingResponse>
</response>
  </barceloDS_responses>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

Spitter:
<split streaming="true" parallelProcessing="true" >
                    <tokenize token="offering" xml="true"/>
                    <process ref="processCreateRequest"/>
                                <to uri="activemq:queue:offerDetail"/>
                </split>
Each splitting how can put it into different queue.. please help.




--
View this message in context: http://camel.465427.n5.nabble.com/Need-a-help-in-camel-splitter-tp5744242.html
Sent from the Camel - Users mailing list archive at Nabble.com.