gpt4 book ai didi

BizTalk FF 反汇编程序 - 仅处理非常小的文件

转载 作者:行者123 更新时间:2023-12-02 16:49:15 26 4
gpt4 key购买 nike

我有一个 BizTalk 2016/VS 2015 解决方案。有一个简单的平面文件模式,通过将重复记录元素的“Max Occurs”属性设置为 0 来分批每一行。

架构的“配置”部分如下所示:

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
<b:schemaInfo standard="Flat File" codepage="65001" default_pad_char=" " pad_char_type="char" count_positions_by_byte="false" parser_optimization="speed" lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="true" early_terminate_optional_fields="true" allow_message_breakup_of_infix_root="true" compile_parse_tables="false" root_reference="Employee" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Employee">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xA" child_order="postfix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
<b:properties>
<b:property distinguished="true" xpath="/*[local-name()='Employee' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='Data' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='NiNumber' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']" />
<b:property distinguished="true" xpath="/*[local-name()='Employee' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='Data' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='OrgLeaveDate' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']" />
<b:property distinguished="true" xpath="/*[local-name()='Employee' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='Data' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='PosLeaveDate' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']" />
<b:property distinguished="true" xpath="/*[local-name()='Employee' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='Data' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='PostStartDate' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']" />
</b:properties>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
</xs:appinfo>
</xs:annotation>
<xs:element maxOccurs="1" name="Data">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0x9" child_order="infix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>

输入文件以制表符分隔,并以 unix 样式行结尾。

关于平面文件架构,唯一有点不寻常的事情是最后一个元素“PostStartDate”的 micOccurs 属性值为 0。这是因为这些文档有几个提供者,而其中一个提供者没有包括“PostStartDate”列。

我已经设置了一个包含 FF 反汇编器的接收位置。它的 DocumentSpecName 属性设置为架构的属性。所有其他属性均为默认属性。

此接收的唯一订阅者是发送到本地文件夹的发送端口。

如果我删除一个包含 3 行的平面文件,那么一切正常。但是,如果我再扩展几行(本例中总共 7 行),则 BizTalk 将在接收位置挂起,并显示错误:“消息引擎在处理一条或多条入站消息期间遇到错误。”在事件日志中,我看到错误:

There was a failure executing the receive pipeline: "LCC.Integration.Common.Pipelines.RcvArchiveFF, LCC.Integration.Common.Pipelines, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff3873c2d0a7e656" Source: "Flat file disassembler" Receive Port: "SharePoint.Employees.Receive.SAPExtract" URI: "D:\FileDrop\Employees\In\*.txt" Reason: Unexpected data found while looking for:
'\t'
The current definition being parsed is Employee. The stream offset where the error occured is 1813. The line number where the error occured is 8. The column where the error occured is 0.

我注意到的另一件事是,如果我从文件的最后一行中删除尾随的 LF,那么无论行数有多少,它都会起作用。

我制作了一个截屏视频来演示该问题:Screencast of Problem

我创建了一个示例解决方案来演示该问题。这可以在以下 github 存储库中找到:https://github.com/RobBowman/BizTalkFFProblem

有什么想法吗?

最佳答案

编辑:我刚刚在 BizTalk 2013R2 中尝试了您的 GitHub 示例,无需更改即可正常工作。

Edit2:>20 行时损坏。

Edit3:我现在意识到它并不真正受支持,设置是:“允许在 Infix Root 处进行消息分解”...您的架构不是中缀,而是后缀。仅当 infix 时才支持在反汇编器上对 FlatFiles 进行反批处理。如果可能的话,您应该让您的架构支持 infix,然后它就会起作用。

关于BizTalk FF 反汇编程序 - 仅处理非常小的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52372122/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com