Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Biztalk 从自定义管道筛选消息_Biztalk_Biztalk 2010 - Fatal编程技术网

Biztalk 从自定义管道筛选消息

Biztalk 从自定义管道筛选消息,biztalk,biztalk-2010,Biztalk,Biztalk 2010,我遇到了BizTalk 2010的另一个问题。我应该接收一组XML格式的记录。我收到的XML是一个信封,里面有多条记录。我的简单任务是在不使用编排的情况下,对XML中的记录进行解密,并将它们放入不同的文件夹中。我创建了一个保存记录结构的xsd,然后是另一个xsd,它是包含我导入的前一个xsd的信封。我确实有一个指向xsd信封的xpath主体。到目前为止,一切似乎都很正常,因为我从xsd with envelope生成了一个XML,并使用xmldasm.exe对其进行了测试。结果令人满意,因为XM

我遇到了BizTalk 2010的另一个问题。我应该接收一组XML格式的记录。我收到的XML是一个信封,里面有多条记录。我的简单任务是在不使用编排的情况下,对XML中的记录进行解密,并将它们放入不同的文件夹中。我创建了一个保存记录结构的xsd,然后是另一个xsd,它是包含我导入的前一个xsd的信封。我确实有一个指向xsd信封的xpath主体。到目前为止,一切似乎都很正常,因为我从xsd with envelope生成了一个XML,并使用xmldasm.exe对其进行了测试。结果令人满意,因为XML按预期被分解为XML格式的多个记录

一、 然后,仅使用XML反汇编程序创建自定义接收管道,并设置适当的文档,然后成功部署项目。从管理控制台,我配置了我的应用程序,创建了一个文件类型的接收端口和发送端口。从发送端口,我将过滤器设置为
BTS.MessageType==MyTestProject.MyXsdRoot

最后,我成功地启动了我的应用程序

但是,当我在InputFolder中丢弃了一个包含多条记录的测试信封XML(我在上面使用xmlDasm.exe测试过的记录)时,该文件夹中的XML已被使用,但OutputFolder中没有生成任何内容。从控制台,我看到一个路由错误(可恢复)。显然,由于缺乏BizTalk经验,我忽略了一些事情

有更多知识的人能指出哪里错了吗?或者我应该做什么来找出哪里错了

更新:

--------封套----------------------------------

<?xml version="1.0" encoding="utf-16" ?> 
- <xs:schema xmlns="http://UsingOrchestration.SetOfProcedures" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:ns0="http://UsingOrchestration.Procedures" targetNamespace="http://UsingOrchestration.SetOfProcedures" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="UsingOrchestration.Procedure" namespace="http://UsingOrchestration.Procedures" /> 
- <xs:annotation>
- <xs:appinfo>
  <b:schemaInfo is_envelope="yes" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" /> 
- <b:references>
  <b:reference targetNamespace="http://UsingOrchestration.Procedures" /> 
  </b:references>
  </xs:appinfo>
  </xs:annotation>
- <xs:element name="SetOfProcedures">
- <xs:annotation>
- <xs:appinfo>
  <b:recordInfo body_xpath="/*[local-name()='SetOfProcedures' and namespace-uri()='http://UsingOrchestration.SetOfProcedures']" /> 
  </xs:appinfo>
  </xs:annotation>
- <xs:complexType>
- <xs:sequence>
  <xs:element minOccurs="1" maxOccurs="unbounded" ref="ns0:ProcedureCompleted" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
  <?xml version="1.0" encoding="utf-16" ?> 
- <xs:schema xmlns="http://UsingOrchestration.Procedures" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://UsingOrchestration.Procedures" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="ProcedureCompleted">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="AltID" type="xs:string" /> 
  <xs:element name="RotationName" type="xs:string" /> 
  <xs:element name="ProcedureID" type="xs:string" /> 
  <xs:element name="ProcedureFee" type="xs:string" /> 
  <xs:element name="Comment" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
--------- Test xml------------------------------------------
<ns0:SetOfProcedures xmlns:ns0="http://UsingOrchestration.SetOfProcedures">
  <ns1:ProcedureCompleted xmlns:ns1="http://UsingOrchestration.Procedures">
    <AltID>AltID_0</AltID>
    <RotationName>RotationName_0</RotationName>
    <ProcedureID>ProcedureID_0</ProcedureID>
    <ProcedureFee>ProcedureFee_0</ProcedureFee>
    <Comment>Comment_0</Comment>
  </ns1:ProcedureCompleted>
  <ns1:ProcedureCompleted xmlns:ns1="http://UsingOrchestration.Procedures">
    <AltID>AltID_1</AltID>
    <RotationName>RotationName_1</RotationName>
    <ProcedureID>ProcedureID_1</ProcedureID>
    <ProcedureFee>ProcedureFee_1</ProcedureFee>
    <Comment>Comment_1</Comment>
  </ns1:ProcedureCompleted>
  <ns1:ProcedureCompleted xmlns:ns1="http://UsingOrchestration.Procedures">
    <AltID>AltID_2</AltID>
    <RotationName>RotationName_2</RotationName>
    <ProcedureID>ProcedureID_2</ProcedureID>
    <ProcedureFee>ProcedureFee_2</ProcedureFee>
    <Comment>Comment_2</Comment>
  </ns1:ProcedureCompleted>
</ns0:SetOfProcedures>

- 
- 
- 
- 
- 
- 
- 
- 
- 
---------------------实际信息-------------------

<?xml version="1.0" encoding="utf-16" ?> 
- <xs:schema xmlns="http://UsingOrchestration.SetOfProcedures" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:ns0="http://UsingOrchestration.Procedures" targetNamespace="http://UsingOrchestration.SetOfProcedures" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="UsingOrchestration.Procedure" namespace="http://UsingOrchestration.Procedures" /> 
- <xs:annotation>
- <xs:appinfo>
  <b:schemaInfo is_envelope="yes" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" /> 
- <b:references>
  <b:reference targetNamespace="http://UsingOrchestration.Procedures" /> 
  </b:references>
  </xs:appinfo>
  </xs:annotation>
- <xs:element name="SetOfProcedures">
- <xs:annotation>
- <xs:appinfo>
  <b:recordInfo body_xpath="/*[local-name()='SetOfProcedures' and namespace-uri()='http://UsingOrchestration.SetOfProcedures']" /> 
  </xs:appinfo>
  </xs:annotation>
- <xs:complexType>
- <xs:sequence>
  <xs:element minOccurs="1" maxOccurs="unbounded" ref="ns0:ProcedureCompleted" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
  <?xml version="1.0" encoding="utf-16" ?> 
- <xs:schema xmlns="http://UsingOrchestration.Procedures" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://UsingOrchestration.Procedures" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="ProcedureCompleted">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="AltID" type="xs:string" /> 
  <xs:element name="RotationName" type="xs:string" /> 
  <xs:element name="ProcedureID" type="xs:string" /> 
  <xs:element name="ProcedureFee" type="xs:string" /> 
  <xs:element name="Comment" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
--------- Test xml------------------------------------------
<ns0:SetOfProcedures xmlns:ns0="http://UsingOrchestration.SetOfProcedures">
  <ns1:ProcedureCompleted xmlns:ns1="http://UsingOrchestration.Procedures">
    <AltID>AltID_0</AltID>
    <RotationName>RotationName_0</RotationName>
    <ProcedureID>ProcedureID_0</ProcedureID>
    <ProcedureFee>ProcedureFee_0</ProcedureFee>
    <Comment>Comment_0</Comment>
  </ns1:ProcedureCompleted>
  <ns1:ProcedureCompleted xmlns:ns1="http://UsingOrchestration.Procedures">
    <AltID>AltID_1</AltID>
    <RotationName>RotationName_1</RotationName>
    <ProcedureID>ProcedureID_1</ProcedureID>
    <ProcedureFee>ProcedureFee_1</ProcedureFee>
    <Comment>Comment_1</Comment>
  </ns1:ProcedureCompleted>
  <ns1:ProcedureCompleted xmlns:ns1="http://UsingOrchestration.Procedures">
    <AltID>AltID_2</AltID>
    <RotationName>RotationName_2</RotationName>
    <ProcedureID>ProcedureID_2</ProcedureID>
    <ProcedureFee>ProcedureFee_2</ProcedureFee>
    <Comment>Comment_2</Comment>
  </ns1:ProcedureCompleted>
</ns0:SetOfProcedures>

- 
- 
- 
- 
---------测试xml------------------------------------------
高度0
旋转名称_0
程序ID_0
程序参考0
评论0
高度1
旋转名称_1
程序1
程序参考1
评论1
高度计2
旋转名称_2
程序2
程序参考2
评论2

使用完全相同的XML,我可以通过
BTS.ReceivePortName
对其进行过滤,该集合已正确删除,但当我通过
BTS.MessageType
对其进行过滤时,该集合根本不进行处理。我一定错过了什么,只是不知道是什么。

请检查您是否遵循了以下所有步骤。可能您忘记了在模式上设置信封属性。此外,您不需要自定义管道来进行XML取消匹配,因为默认的XMLReceive管道能够做到这一点。

我设置了信封属性,设置了xpath正文。由于某种原因,我无法通过BTS.MessageType将其过滤掉。我通过端口名对其进行过滤,我的邮件得到了处理。谢谢!请在帖子中看到我的更新,因为评论没有足够的空间放我的方案,很可能就是这样!明天我回来上班时让我纠正一下,让你知道。谢谢我将xml更正为使用“UsingOrchestration.SetOfProcedures”,并将过滤器更改为BTS.MessageType==UsingOrchestration.SetOfProcedures。消息已被删除,但仍未处理。EventViewer显示以下错误:“无法路由已发布的邮件,因为找不到订阅服务器。如果订阅业务流程或发送端口尚未登记,或者订阅评估所需的某些消息属性尚未升级,则会发生此错误。请使用Biztalk管理控制台对此故障进行故障排除。“与信封中的邮件数相同。有3个受支持(不可恢复)的邮件类型“”,带有“RP2”(RP2是接收端口名)的路由失败报告,还有一个暂停(可恢复)的邮件,邮件类型为空。我希望我能上传控制台上看到的屏幕截图。”。