在决定中使用响应消息时出现NullReferenceException [英] NullReferenceException when using an response message in a decide

查看:102
本文介绍了在决定中使用响应消息时出现NullReferenceException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我向IBM Mainframe上的IBM DB2数据库发送更新请求消息。此请求正确执行更新并返回响应消息。我发送此响应消息以将其保存在服务器上的某个位置看起来是正确的。我在决定使用此响应消息来测试受影响的行数是否等于0(更新失败/错误的where子句)BizTalk抛出NullReferenceException。我正在使用BizTalk生成的updategram来处理请求和响应消息。

完整的响应消息:


I send an update request-message to IBM DB2 database on a IBM Mainframe. This request executes the updates correctly en returns a response message. Whe I send this response message to save it somewhere on the server is looks correct. Whe i use this response-message in a decide to test if the number of affected rows equals 0 (update failed / wrong where clause) BizTalk throws a NullReferenceException. I'm using the BizTalk generated updategram for the request and response messages.

The full response message:

< ? xml version =" 1.0"编码= QUOT; UTF-16"
?>

推荐答案

您好,

您有什么声明?在决定形状中使用?

我认为基本上有两种选择:

1。使RowsAffected成为一个可分辨的字段,并使用如下语句:

Message.RowsAffected == 0(可能需要进行类型转换。取决于受影响的RowsA的类型)

2。使用xpath测试决定形状中的值:

xpath(messsage," // RowsAffected / text()")==" 0"

HTH,

Randal van Splunteren
http://biztalkmessages.vansplunteren.net


这篇关于在决定中使用响应消息时出现NullReferenceException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆