Quantcast
Channel: BizTalk Server General Forum
Viewing all articles
Browse latest Browse all 872

BizTalk Mapper - value functoid

$
0
0

Output mapping Issue:

The    ‘<ns3:DemoCategoryKey>’  appears only once in the input schema and then is referenced downstream as you can see in the ex below. I’m using a simple looping functoid to loop through to create the output. Since <a:DemoCategoryKey> appears only once in the Input message and then it is referenced in the remaining nodes. I'm not able to get <a:DemoCategoryKey> repeated in each of my<ns3:TestDemo>Of the output schema.

Any thoughts?

    

Below I have my current Output and desired output

Input Msg:

<TestDemoResponsexmlns="http://abc.com/on">

  <TestDemoResultxmlns:a="http://schemas.datacontract.org/2004/07/abc"xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

    <a:Demoz:Id="i1"xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

     <a:DemoCategoryz:Id="i2">

        <a:DemoCategoryKey>3dd3b904-b375-4af2-8c70-06930801fb</a:DemoCategoryKey>

        <a:DemoCategoryNo>5</a:DemoCategoryNo>

        <a:Descriptioni:nil="true" />

        <a:Name>John</a:Name>

      </a:DemoCategory>

      <a:DemoKey>a10aa546-8c1a-4d00-be1f-0cb728de1ee7</a:DemoKey>

      <a:Name>Jack</a:Name>

    </a:Demo>

    <a:Demoz:Id="i3"xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

      <a:DemoCategoryz:Ref="i2" />

      <a:DemoKey>9b2c68ab-c702-4c17-9c2e-218cee06abd3</a:DemoKey>

      <a:Name>Jill</a:Name>

    </a:Demo>

                 …….

…….

……

Current Output Inserting in SQL

<ns0:Insertxmlns:array="http://schemas.microsoft.com/2003/10/Serialization/Arrays"xmlns:ns3="http://schemas.microsoft.com/Sql/2008/05/Types/Tables/dbo"xmlns:ns0="http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/GetDemo"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <ns0:Rows>

    <ns3:TestDemo>

    <ns3:DemoCategoryKey>3dd3b904-b375-4af2-8c70-06930801fb</ns3:DemoCategoryKey>

      <ns3:DemoKey>a10aa546-8c1a-4d00-be1f-0cb728de1ee7</ns3:DemoKey>

      <ns3:Name>John</ns3:Name>

    </ns3:TestDemo>

    <ns3:TestDemo>

      <ns3:DemoKey>9b2c68ab-c702-4c17-9c2e-218cee06abd3</ns3:DemoKey>

      <ns3:Name>Jack</ns3:Name>

    </ns3:TestDemo>

    <ns3:TestDemo>

      <ns3:DemoKey>5093083f-9d37-4af3-bc67-27c81c806761</ns3:DemoKey>

      <ns3:Name>Jill</ns3:Name>

    </ns3:TestDemo>

                 …….

…….

……

Desired Output

<ns0:Insertxmlns:array="http://schemas.microsoft.com/2003/10/Serialization/Arrays"xmlns:ns3="http://schemas.microsoft.com/Sql/2008/05/Types/Tables/dbo"xmlns:ns0="http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/GetDemo"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <ns0:Rows>

    <ns3:TestDemo>

    <ns3:DemoCategoryKey>3dd3b904-b375-4af2-8c70-06930801fb</ns3:DemoCategoryKey>

      <ns3:DemoKey>a10aa546-8c1a-4d00-be1f-0cb728de1ee7</ns3:DemoKey>

      <ns3:Name>John</ns3:Name>

    </ns3:TestDemo>

    <ns3:TestDemo>

   <ns3:DemoCategoryKey>3dd3b904-b375-4af2-8c70-06930801fb</ns3:DemoCategoryKey>

      <ns3:DemoKey>9b2c68ab-c702-4c17-9c2e-218cee06abd3</ns3:DemoKey>

      <ns3:Name>Jack</ns3:Name>

    </ns3:TestDemo>

    <ns3:TestDemo>

   <ns3:DemoCategoryKey>3dd3b904-b375-4af2-8c70-06930801fb</ns3:DemoCategoryKey>

      <ns3:DemoKey>5093083f-9d37-4af3-bc67-27c81c806761</ns3:DemoKey>

      <ns3:Name>Jill</ns3:Name>

    </ns3:TestDemo>

                 …….

…….

……


Raja


Viewing all articles
Browse latest Browse all 872

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>