开发者

Help required with BizTalk mapping

开发者 https://www.devze.com 2023-02-12 07:39 出处:网络
I am trying to get the data from input xml message using functoids. But this doesn\'t seem to work. Below is my XML snippet

I am trying to get the data from input xml message using functoids. But this doesn't seem to work. Below is my XML snippet

<?xml version="1.0" ?>
<ROOT>
    <COMPANIES>
        <COMPANY>
            <NAME>FOO CORP</name>
        </COMPANY>
        <COMPANY>
            <NAME>ACME CORP</name>
        </COMPANY>
    </COMPANIES>
    <INFORMATIONS>
        <INFORMATION>
            <TESTING>
                <TESTS>
                    <NAME>1开发者_Python百科221</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". 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. Any idea how to get the 2nd COMPANY name?

  2. Secondly, I have mapped <TEXT> directly to <node> in my destination schema. What i get is only 2 values from <TEXT>. Not all the <TEXT> are mapped to my <node>. Output i am getting is I don't get is

    I AM 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?

1) Add Iteration functoid (Advanced Functoids) and connect to COMPANY node in your source schema

2) Add Equal functiod (Logical Functoids) and connect to Iteration functoid

3) Configure Equal functoid; add constant value 2

4) Add Value Mapping (Flattening) functoid (Advanced Functoids)

5) Connect output of Equal to input of Value Mapping

6) Connect NAME emlement of source schema to input of Value Mapping

7) Connect output of Value Mapping to destination schema element


Q2: Not all source TEXT elements are transformed to destination node

This seems to be a side effect of your mapping concering Q1 and I cannot reproduce your error.

Check minOccurs and maxOccurs of your source and destination schema for the elements/nodes in question.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号