2016-11-06 71 views
0

調用db以獲取實體的ids'。我正在收到實體名單。獲得ids列表後,我需要通過傳遞該實體列表來調用Web服務。如果列表大小超過100,我應該多次調用,因爲web服務不會接受超過一百個id的列表。使用camel DSL/spring config xml檢查輸入列表大小

幫我用spring xml格式的camel dsl控制輸入並將相同的控制輸入傳遞給webservice。

我已經創建上下文below.but套牢分裂,或者輸入列表大小超過100

<cxf:cxfEndpoint id="aisEndPoint" 
     address="/WebService" 
      endpointName="a:DPWVessel" 
      serviceName="a:VesselService" 
      wsdlURL="ScheduleWebService.wsdl" 
      serviceClass="cargo.DPWVessel" /> 
<camelContext id="AIS-Integration" 
     xmlns="http://camel.apache.org/schema/blueprint"> 



<route id="getAISVesselDetails"> 
       <from 
        uri="quartz://aisVesselUpdates?cron={{ais.integration.vessels.timer}}" /> 
       <doTry> 
        <to uri="mybatisPromis:getVessels?statementType=SelectList" /> 
        <to uri="bean:aisIntegrationProcessor?method=createInputForAISService" /> 
        <to uri="cxf:bean:aisEndPoint" /> 
        <doCatch> 
         <exception>java.lang.IllegalArgumentException</exception> 
        </doCatch> 
        <doFinally> 
         <to uri="log:body" /> 
        </doFinally> 
       </doTry> 
      </route> 
     </camelContext> 

回答

0

斯普利特在100使用駱駝環路和大塊列表分區Web服務請求處理器。

循環:每次迭代花費清單的100元,直到LISTSIZE已經達到

處理器:取出無需值列表成爲一個新列表,通過新的列表具有在每次迭代中100種元素的Web服務。