Biztalk使用数组来调用存储过程 [英] Biztalk using array to call stored procedure

查看:55
本文介绍了Biztalk使用数组来调用存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的情况下,程序需要放一个数组参数来执行。


然后,我想使用biztalk来调用带有发送端口的存储过程。 / p>

此外,我已经使用添加生成的项目导入架构。 


之后,它在biztalk中创建了两个架构,一个是包schema和element的类型是array:ArrayOfstring 


一个是带有ArrayOfstring的模式。 


我使用构造消息来创建发送消息端口。


strXml = @"< ns0:PR_TEST xmlns:ns0 ='http://Microsoft.LobServices.OracleDB/2007/03/XXX/Package/PK_TEST'>< ns0 :IN_LIST> 123ABC< / ns0:IN_LIST>< ns0:IN_LIST> 123ABC< / ns0:IN_LIST>< / ns0:PR_TEST>" ;;



xmlVwEquseRequest = new System.Xml.XmlDocument();
$
xmlVwEquseRequest.LoadXml(strXml);
$
Message_2 = xmlVwEquseRequest;


但是当我开始运行biztalk时,它有错误。


现在,我的问题是如何创建数组调用 存储过程。


现在,数组i的值将硬编码数组中的值。如:aa,bb,cc。对于样本,数组的长度为3。

解决方案

您需要发布确切的错误消息,没有我们可以告诉您的任何内容。


但是,您不应该使用String和XmlDocument来创建请求。 这不是一个正确的BizTalk模式。


您应该创建一个带有Map / Transform的Request消息,其中循环,就像您需要创建一个数组一样,非常简单。


In my case, the procedure need to put a array parameter to execute.

then, i would like to use biztalk to call stored procedure with send port.

also, i have import the schema with add generated item. 

after that, it have created two schema in biztalk, one is the package schema and the type of element is array:ArrayOfstring 

one is schema with ArrayOfstring. 

i using construct message to create message for send port.

strXml = @"<ns0:PR_TEST xmlns:ns0='http://Microsoft.LobServices.OracleDB/2007/03/XXX/Package/PK_TEST'><ns0:IN_LIST>123ABC</ns0:IN_LIST><ns0:IN_LIST>123ABC</ns0:IN_LIST></ns0:PR_TEST>";

xmlVwEquseRequest = new System.Xml.XmlDocument();
xmlVwEquseRequest.LoadXml(strXml);
Message_2 = xmlVwEquseRequest;

but when i start to run biztalk, it has error.

now, my problem is how can i create array to call the stored procedure.

for now,the value of the array i will hardcode the value in the array. Such as: aa , bb , cc. the length of array is 3 for sample.

解决方案

You need to post the exact error message, there's nothing we can tell you without that.

However, you should not be using a String and XmlDocument to create the request.  That is not a correct BizTalk Pattern.

You should create the Request message with a Map/Transform where looping, as you would need to create an Array, is pretty easy.


这篇关于Biztalk使用数组来调用存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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