BizTalk Server General - Mapping: from sibling records to sibling elements

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > October 2004 > Mapping: from sibling records to sibling elements





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Mapping: from sibling records to sibling elements
Monica

2004-10-25, 5:49 pm

I have a minior problem mapping this file:

<ns0:Root1 xmlns:ns0="http://BizTalk_Server_Project1.Schema1">
<order>
<header>header_0</header>
<curcy>mycurcy</curcy>
<line>
<numline>1</numline>
<part>
<partid>
<typeid>1</typeid>
<id>id10</id>
</partid>
<partid>
<typeid>2</typeid>
<id>id11</id>
</partid>
</part>
</line>
<line>
<numline>2</numline>
<part>
<partid>
<typeid>1</typeid>
<id>id20</id>
</partid>
<partid>
<typeid>2</typeid>
<id>id21</id>
</partid>
</part>
</line>
</order>
</ns0:Root1>


to this one:


- <ns0:Root2 xmlns:ns0="http://BizTalk_Server_Project1.Schema2">
- <order2>
- <msgheader>
<header2>testata_0</header2>
- <line>
<numline2>1</numline2>
<partIdtype1>id10</partIdtype1>
<partIdtype2>id11</partIdtype2>
<curcy2>mycurcy</curcy2>
</line>
- <line>
<numline2>2</numline2>
<partIdtype1>id20</partIdtype1>
<partIdtype2>id21</partIdtype2>
<curcy2>mycurcy</curcy2>
</line>
</msgheader>
</order2>
</ns0:Root2>

as you can see, partIdtype1 and partIdtype2 are both mapped from same part
element, the first from typeid=1, the second from typeid=2, and I am mapping
them using 2 if-functoid (to select typeid=1 or typeid=2) and 2
Value-Mapping(Flattening)-functoids.
The destination schema has Max Occurs 1 for both partIdtype1 and
partIdtype2, 'cause they can appear only one time.
With this configuration, all I obtain is partIdtype1 mapped, but no
partIdtype2.

But, if I change the destination schema and set Max Occurs = 3 for
partIdtype1 and partIdtype2, everything works.
I would strongly prefer to find a solution without modifying the schema,
since it is correct.
Hope this was clear, with perplexy, Monica
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com