简体   繁体   English

BizTalk映射所需的帮助

[英]Help required with BizTalk mapping

I am trying to get the data from input xml message using functoids. 我正在尝试使用functoids从输入xml消息中获取数据。 But this doesn't seem to work. 但这似乎不起作用。 Below is my XML snippet 以下是我的XML代码段

<?xml version="1.0" ?>
<ROOT>
    <COMPANIES>
        <COMPANY>
            <NAME>FOO CORP</name>
        </COMPANY>
        <COMPANY>
            <NAME>ACME CORP</name>
        </COMPANY>
    </COMPANIES>
    <INFORMATIONS>
        <INFORMATION>
            <TESTING>
                <TESTS>
                    <NAME>1221</NAME>
                    <TEST>
                        <TEXT>I AM SAM</TEXT>
                    </TEST>
                </TESTS>
                <TESTS>
                    <NAME>21</NAME>
                    <TEST>
                        <TEXT>FADFDF</TEXT>
                    </TEST>
                </TESTS>
                <TESTS>
                    <NAME>3001</NAME>
                    <TEST>
                        <TEXT>SGFGSDFG</TEXT>
                    </TEST>
                </TESTS>
                <TESTS>
                    <NAME>4569</NAME>
                    <TEST>
                        <TEXT>12312</TEXT>
                    </TEST>
                </TESTS>
            </TESTING>
        <INFORMATION>
    </INFORMATIONS>
</ROOT>
  1. First I am trying to loop through COMPANY and get the NAME "ACME CORP". 首先,我试图遍历COMPANY并获得名称“ ACME CORP”。 but which ever functoid i use (scripting, string extract etc) I always get the FOO CORP. I even tried inline XSLT but that also doesn't seem to work. 但是我经常使用哪种functoid(脚本,字符串提取等),我总是得到FOO CORP。我什至尝试了内联XSLT,但这似乎也不起作用。 Any idea how to get the 2nd COMPANY name? 知道如何获得第二公司名称吗?

  2. Secondly, I have mapped <TEXT> directly to <node> in my destination schema. 其次,我已将<TEXT>直接映射到目标模式中的<node> What i get is only 2 values from <TEXT> . 我得到的只是<TEXT> 2个值。 Not all the <TEXT> are mapped to my <node> . 并非所有的<TEXT>都映射到我的<node> Output i am getting is I don't get is 我得到的输出是我没有得到的

    I AM SAM FADFDF 我是SAM FADFDF

I don't get 我不明白

<node>SGFGSDFG</node>
<node>12312</node>

Any one knows how i could get the values? 谁知道我如何获得这些价值?

Thanks in advance 提前致谢

cheers, 干杯,

Karthik 卡尔提克

Q1: How to get the NAME of the second COMPANY ? Q1:如何获得NAME 第二COMPANY

1) Add Iteration functoid (Advanced Functoids) and connect to COMPANY node in your source schema 1)添加迭代功能 (高级功能)并连接到源模式中的COMPANY节点

2) Add Equal functiod (Logical Functoids) and connect to Iteration functoid 2)添加相等函数(逻辑函数)并连接到迭代函数

3) Configure Equal functoid; 3)配置相等的仿函数; add constant value 2 加常数2

4) Add Value Mapping (Flattening) functoid (Advanced Functoids) 4)添加值映射(平化)函子(高级函子)

5) Connect output of Equal to input of Value Mapping 5)将等于的输出连接到值映射的输入

6) Connect NAME emlement of source schema to input of Value Mapping 6)将源模式的NAME元素连接到值映射的输入

7) Connect output of Value Mapping to destination schema element 7)将值映射的输出连接到目标架构元素


Q2: Not all source TEXT elements are transformed to destination node Q2:并非所有源TEXT元素都转换为目标node

This seems to be a side effect of your mapping concering Q1 and I cannot reproduce your error. 这似乎是映射问题Q1的副作用,我无法重现您的错误。

Check minOccurs and maxOccurs of your source and destination schema for the elements/nodes in question. 检查源和目标模式的minOccurs和maxOccurs中所涉及的元素/节点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM