HIS Adapter to DB2-数据作为属性返回 - 获取属性值的最佳方法 [英] HIS Adapter to DB2- data return as Attributes - best way to get value of attributes

查看:99
本文介绍了HIS Adapter to DB2-数据作为属性返回 - 获取属性值的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Biztalk DB2适配器来调用DB2上的Store过程。 DB2适配器将数据作为节点"Table1"的归属返回。当我处理业务流程中的数据时,我需要提取要使用的attribues的值作为additaonsl DB2 Store proecureds通过DB2 Adapter调用的参数。

从DB2适配器中获取的xml docutment如下所示

< CSR03276_Responce xmlns =" http:// DB2_CSR3276 >>
< Success><
ResultSets>
< Table1 RETURN_CODE =" 0" HTTP_ADDR =" HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX " DEST_ID =" customer1" FORMAT_TYPE = QUOT; E" />
< Table1 RETURN_CODE =" 0" HTTP_ADDR =" HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX " DEST_ID =" customer2" FORMAT_TYPE = QUOT; E" />
< Table1 RETURN_CODE =" 0" HTTP_ADDR =" HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX " DEST_ID =" customer3" FORMAT_TYPE =英寸×" />
< Table1 RETURN_CODE =" 0" HTTP_ADDR =" HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX " DEST_ID =" customer4" FORMAT_TYPE = QUOT; E" />
< Table1 RETURN_CODE =" 0" HTTP_ADDR =" HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX " DEST_ID =" customer5" FORMAT_TYPE = QUOT; E" />
< Table1 RETURN_CODE =" 0" HTTP_ADDR =" HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX " DEST_ID =" customer6" FORMAT_TYPE = QUOT; E" />
< Table1 RETURN_CODE =" 0" HTTP_ADDR =" HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX " DEST_ID =" customer7" FORMAT_TYPE = QUOT; E" />
< Table1 RETURN_CODE =" 0" HTTP_ADDR =" HTTPS://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX " DEST_ID =" customer8" FORMAT_TYPE = QUOT; E" />
< / ResultSets><
/成功>
< / CSR03276_Responce>

解决方案


使用原子范围形状的默认自定义接收管道拆分管弦乐中的乱七八糟


例如:


 

InputSummary_Message =  Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(typeof(Microsoft.BizTalk.DefaultPipelines.XMLReceive),InputMessage)



,读取我们使用xpath表达式从属性中提取值。


var_xpath =(msg_xpath," string(/ * [local-name()='NACK'和namespace-uri()='http://schema.microsoft.com/BizTalk/2003/ACKMessage.xsd'] / * [local-name()='ErrorDescription'和namespace-uri()='']) ; $


$
此xpath应具有元素/属性的名称和命名空间以及父节点。


I'm using the Biztalk DB2 adapter to call  Store procedures on DB2.    the DB2 adapter returns the data as attribues for the node "Table1".   as I process the data in the orchestrations,  I need to extract the value of the attribues to use to  as paramsters in additaonsl DB2 Store proecureds call via DB2 Adapter.   

the xml docutment recived from DB2 adapter look like the following

<CSR03276_Responce xmlns="http://DB2_CSR3276">
 <Success><
  ResultSets>
     <Table1 RETURN_CODE="0" HTTP_ADDR="HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX    " DEST_ID="customer1   " FORMAT_TYPE="E" />
     <Table1 RETURN_CODE="0" HTTP_ADDR="HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX    " DEST_ID="customer2   " FORMAT_TYPE="E" />
     <Table1 RETURN_CODE="0" HTTP_ADDR="HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX    " DEST_ID="customer3   " FORMAT_TYPE="X" />
     <Table1 RETURN_CODE="0" HTTP_ADDR="HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX    " DEST_ID="customer4   " FORMAT_TYPE="E" />
     <Table1 RETURN_CODE="0" HTTP_ADDR="HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX    " DEST_ID="customer5   " FORMAT_TYPE="E" />
     <Table1 RETURN_CODE="0" HTTP_ADDR="HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX    " DEST_ID="customer6   " FORMAT_TYPE="E" />
     <Table1 RETURN_CODE="0" HTTP_ADDR="HTTP://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX    " DEST_ID="customer7   " FORMAT_TYPE="E" />
     <Table1 RETURN_CODE="0" HTTP_ADDR="HTTPS://WBIN01D/BIZTALK/SAVEDOCUMENTPROD.ASPX   " DEST_ID="customer8   " FORMAT_TYPE="E" />
    </ResultSets><
  /Success>
</CSR03276_Responce>

解决方案

Hi,

Split the messgae inside the orchestraion using the default custom receive pipeline in atomic scope shape

Eg:

 

InputSummary_Message=  Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(typeof(Microsoft.BizTalk.DefaultPipelines.XMLReceive),InputMessage)

, and read we use xpath expression to extract the values from the attributes.

var_xpath=( msg_xpath,"string(/*[local-name()='NACK' and namespace-uri()='http://schema.microsoft.com/BizTalk/2003/ACKMessage.xsd']/*[local-name()='ErrorDescription' and namespace-uri()='']);


This xpath should have Name and Namespace of the Element/Attribute and parent Nodes.


这篇关于HIS Adapter to DB2-数据作为属性返回 - 获取属性值的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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