10-25-04 10: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
[ Post a follow-up to this message ]
|