BizTalk Server - Mapping Problem

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server > December 2005 > Mapping Problem





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 Problem
mj

2005-12-06, 5:54 pm

Hello,
I am having problems trying to map repeating choice fields to a schema where
the parent record field has a max occurs = 1.
The source schema in the map looks like:

Record
Table
Fields
<choice> (choice group)
CompanyName
Address
City
State
zip

Note in the source xml file the Record node will repeat like example:
<RECORD>
<TableName>Address</TableName>
<FIELDS>
<CompanyName>TestCompanyOne</CompanyName>
<Address>1245 FOREST Street</Address>
<City>DES PLAINES</City>
<State>IL</State>
<Zip>12345</Zip>
</FIELDS>
</RECORD>
<RECORD>
<TableName>Address</TableName>
<FIELDS>
<CompanyName>SecondCompany</CompanyName>
<Address>10 Renner Ave.</Address>
<City>San Diego</City>
<State>CA</State>
<Zip>92133</Zip>
</FIELDS>
</RECORD>
<RECORD>
<TableName>Address</TableName>
<FIELDS>
<CompanyName>Electronics Company</CompanyName>
<Address>777 H Street</Address>
<City>Los Angeles</City>
<State>CA</State>
<Zip>77710</Zip>
</FIELDS>
</RECORD>


I am trying to map:
Record
Table
Fields
<choice> (choice group)
CompanyName
Address
City
State
zip

to the following destination schema/xml:

<Insured> (note: Max occurs = 1)
<CompanyName>
<Address>
<City>
<State>
<Zip>
</Insured>

I am expecting only the first result Record.
I have tried everything as well as using the
functoid "Value Mapping (Flattening) and
end up with the following incorrect result:
<Insured> (note: Max occurs = 1)
<CompanyName>Test Company One</CompanyName>
<CompanyName>Second Company</CompanyName>
<CompanyName>Electronics Company</CompanyName>
<Address>1245 FOREST Street</Address>
<Address>10 Renner Ave.</Address>
<Address>777 H Street</Address>
<City>DES PLAINES</City>
<City>San Diego</City>
<City>Los Angeles</City>
<State>IL</State>
<State>CA</State>
<State>CA</State>
<Zip>12345</Zip>
<Zip>92133</Zip>
<Zip>77710</Zip>
</Insured>

Ideally I would like to receive only the first result record like so:
<Insured>
<CompanyName>TestCompanyOne</CompanyName>
<Address>1245 FOREST Street</Address>
<City>DES PLAINES</City>
<State>IL</State>
<Zip>12345</Zip>
</Insured>

Any help is greatly appreciated.

--
mj
WenJun Zhang[msft]

2005-12-07, 3:49 am

Hi mj,

I think you can use logical existence functoid to determine if the fields
exist. Then retrieve the record index with iteration functoid and pass the
index to an index functoid to get all the field values to be populated to
the destination schema. Also at that time, you should use some logical
functoids to stop sequent processing.

Iteration Functoid
http://msdn.microsoft.com/library/d...-us/sdk/htm/ebi
z_sdk_mapper_functoids_azpv.asp

Index Functoid
http://msdn.microsoft.com/library/d...-us/sdk/htm/ebi
z_prog_map_vfdn.asp

Please let me know if there is anything unclear.

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.

mj

2005-12-11, 5:53 pm

Hi WenJun
Thank you for your response. I will give it a try.
--
mj


""WenJun Zhang[msft]"" wrote:

> Hi mj,
>
> I think you can use logical existence functoid to determine if the fields
> exist. Then retrieve the record index with iteration functoid and pass the
> index to an index functoid to get all the field values to be populated to
> the destination schema. Also at that time, you should use some logical
> functoids to stop sequent processing.
>
> Iteration Functoid
> http://msdn.microsoft.com/library/d...-us/sdk/htm/ebi
> z_sdk_mapper_functoids_azpv.asp
>
> Index Functoid
> http://msdn.microsoft.com/library/d...-us/sdk/htm/ebi
> z_prog_map_vfdn.asp
>
> Please let me know if there is anything unclear.
>
> Best regards,
>
> WenJun Zhang
> Microsoft Online Partner Support
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

WenJun Zhang[msft]

2005-12-12, 2:49 am

You are welcome mj. If there is any further question, please don't hesitate
to let me know.

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com