2012-04-09 116 views
0

返回一個非空應答我有鉤掛到它,這兩個返回包含他們的活動的結果的消息對象2的出站信道的適配器一個的信道。 這用於在升級到SI 2.1之前的工作。現在,由於方法返回非空值的事實,我收到了一條錯誤消息。Spring集成:從出站通道適配器

下面是一個代碼示例:

<integration:gateway id="notificationGateway" 
        default-request-channel="notificationRecordsFetcher" 
        default-reply-channel="notifySupplier" 
        service-interface="com.supplier.NotificationGateway"/> 

<!-- Submit the file to the supplier--> 
<integration:channel id="notifySupplier"/> 

<!-- Handle the secured transfer (first) --> 
<integration:outbound-channel-adapter order="1" channel="notifySupplier" id="SupplierSecuredFileTransfer" ref="SubmitToSupplier" method="submit" /> 

<!-- Delete the notification records marked as successful (second) --> 
<integration:outbound-channel-adapter order="2" channel="notifySupplier" id="deleteNotificationRecords" ref="databaseService" method="removeNotificationEntries" /> 

認定爲「SupplierSecuredFileTransfer」適配器採用了一堆的XML文件,每一個代表一個數據庫記錄,並使用SFTP到目標文件夾發送。然後,它標誌着已成功交付並把他們作爲確定爲「deleteNotificationRecords」,從而讀取由第一個更新的消息負載,並在其上執行第二個適配器的答覆記錄。 現在自引入新限制以來,我無法在適配器之間傳遞信息。 任何想法如何克服這一點?

回答

0

你從哪個版本遷移而來?

將<出站通道適配器更改爲< service-activator /> s,將通道更改爲輸入通道並將輸出通道設置爲「nullChannel」。

+0

思想這樣做的,但「SupplierSecuredFileTransfer」適配器必須處理SFTP提交,因此將需要保持適配器(大概SFTP適配器或網關SI 2.1引入),並在提交數據庫條目的結果基於將必須被刪除。 – 2012-04-09 18:57:23

+0

另外我認爲它是我們從SI遷移而來的1.0版本 – 2012-04-09 18:57:44

相關問題