0

我是 BizTalk 的新手,我正在设法创建从 Oracle 到平面文件的普通接口。

但是我们的大多数接口会是一个标题与不同长度的行的组合。

例如,查询将是...

select oh.id, oh.name, ol.lineNo, ol.qty_ordered, ol.qty_shipped, ol.price 
from header oh, line ol

这将导致类似于此的平面文件...

oh.id       |  oh.name
ol.lineNo   |  ol.qty_ordered  |  ol.qty_shipped  |  ol.price
ol.lineNo   |  ol.qty_ordered  |  ol.qty_shipped  |  ol.price
ol.lineNo   |  ol.qty_ordered  |  ol.qty_shipped  |  ol.price
oh.id       |  oh.name
ol.lineNo   |  ol.qty_ordered  |  ol.qty_shipped  |  ol.price
ol.lineNo   |  ol.qty_ordered  |  ol.qty_shipped  |  ol.price

我确信这对 BizTalk 来说不是一个奇怪的设置,但我不知道如何调用它,所以我无法真正用谷歌搜索它。到目前为止,我似乎在创建允许线条如此不同的模式和映射时遇到问题

4

2 回答 2

1

我建议使用 BizTalk 架构向导msdn

注意:我只对平面文件做了一点工作BizTalk,但我发现 codeproject上的文章对初学者很有用

于 2012-05-22T07:57:40.273 回答
1

如果我对您的理解正确(我假设您需要一个用于映射器的架构),您需要一个类似于

     <?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://BizTalk_Server_Project1.FlatFileSchema1" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://BizTalk_Server_Project1.FlatFileSchema1" 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="false" early_terminate_optional_fields="false" allow_message_breakup_of_infix_root="false" compile_parse_tables="false" root_reference="Sales" wrap_char_type="char" default_wrap_char="&quot;" />
    </xs:appinfo>
  </xs:annotation>
<xs:element name="orders">
        <xs:complexType>
        <xs:sequence>
        <xs:element maxOccurs="unbounded" name="order">
        <xs:complexType>
        <xs:sequence>
        <xs:element maxOccurs="1" minOccurs="1" name="orderheader">
        <xs:complexType>
        <xs:sequence>
        <xs:element maxOccurs="1" minOccurs="1" name="ohID"/>
        <xs:element maxOccurs="1" minOccurs="1" name="ohName"/>
        </xs:sequence>
        </xs:complexType>
    </xs:element>
        <xs:element maxOccurs="1" minOccurs="1" name="orders">
        <xs:complexType>
        <xs:sequence>
        <xs:element maxOccurs="1" minOccurs="1" name="ohLineNo"/>
        <xs:element maxOccurs="1" minOccurs="1" name="ohQuantityOrdered"/>
        <xs:element maxOccurs="1" minOccurs="1" name="ohQuantityShipped"/>
        <xs:element maxOccurs="1" minOccurs="1" name="ohPrice"/>
        </xs:sequence>
        </xs:complexType>
    </xs:element>
        </xs:sequence>
        </xs:complexType>
        </xs:element>
        </xs:sequence>
        </xs:complexType>
        </xs:element></xs:schema>

然后根据您的结果使用映射器构建?

于 2012-05-25T10:43:09.397 回答