我正在尝试将一些BizTalk 2006 R2助手代码转换为BizTalk 2010,但我遇到了一个特殊的问题。我正在尝试对一个方法进行单元测试,该方法与2006年的R2 -> 2010相比有一个破坏性的API更改,但当我尝试访问该方的批处理时,我一直收到以下异常:
System.Data.SqlClient.SqlException: Could not find stored procedure 'edi_PartnerBatchScheduleSelect'.代码:
[TestMethod()]
public void GetPartyBatchStatusTest()
{
Assert.IsTrue(GetPartyBatchStatus("Party1"));
}
public bool GetPartyBatchStatus(string PartyName)
{
if (string.IsNullOrEmpty(PartyName))
{
// Throw Exception
throw new System.ArgumentException("Parameter PartyName cannot be null or empty in the GetPartyBatchStatus method.", "PartyName");
}
bool RetVal = false;
Partner objPartner = new Partner(PartyName);
if (objPartner.PartyId != -1)
{
foreach (IPartnerBatch batch in objPartner.Batches.Batches)
{
RetVal = batch.BatchingActivated;
}
}
return RetVal;
}对于这个测试用例,我设置了一个Party1和一个Party2,并在它们之间启动了一个批处理。
发布于 2011-02-12 01:33:20
BizTalk 2010中的Party模型(又称贸易伙伴管理)与以前的版本相比有了很大的变化。因此,微软将政党迁移工具作为BizTalk 2010安装程序的一部分(请参阅here)。
我很抱歉这么说,但是如果您的代码直接与SQL工件交互,那么它现在工作的可能性很小,因为整个模型已经改变了。但是,如果不了解DSSIBizTalkHelper的实际功能,就很难确定这一点。
话虽如此,BizTalk 2010的一个更好的文档化功能是做X12电子数据交换。虽然如果没有以前的BizTalk经验会很困难,但是您可能想看看this walkthrough在BizTalk中发送批处理的EDI交换。他们在那里也有several other helpful walkthroughs,围绕相同的主题。
https://stackoverflow.com/questions/4963458
复制相似问题