2012-04-09 42 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

相关问题