|
|
||||||
|
#1
|
|
|
|
|
I have a question on how to map a certin set of data from one structure
and a database lookup to an output structure. Below are the details 1. Receive inbound data that provides some data that is used as a key to lookup some defaults from a sql server table using the database value extractor. 2. Database Record structure: ContactID, Name, Phone, Fax, E-mail 3. Output structure: <InvoiceParty> <Address>....</Address> <PrimaryContact> 0..1 <ContactID></ContactID>1..1 <ListOfContactNumber> 0..1 <ContactNumber>0..x <ContactNumberValue> </ContactNumberValue> 1..1 <ContactNumberTypeCoded></ContactNumberTypeCoded> 1..1 </ContactNumber> </ListOfContactNumber> </PrimaryContact> </InvoiceParty> 4. Sample Of wanted output: Input: ContactID: 1, Name: Joel Brown, Phone: 919-555-1212, Fax: 919-555-9000, Email: me Output: <InvoiceParty> <Address>....</Address> <PrimaryContact> <ContactID>1</ContactID> <ListOfContactNumber> <ContactNumber> <ContactNumberValue>919-555-1212</ContactNumberValue> <ContactNumberTypeCoded>Phone</ContactNumberTypeCoded> </ContactNumber> <ContactNumber> <ContactNumberValue>919-555-9000</ContactNumberValue> <ContactNumberTypeCoded>Fax</ContactNumberTypeCoded> </ContactNumber> <ContactNumber> <ContactNumberValue>ME</ContactNumberValue> <ContactNumberTypeCoded>Email</ContactNumberTypeCoded> </ContactNumber> </ListOfContactNumber> </PrimaryContact> </InvoiceParty> My Question is, how can you map from the flat structure (table) into the XML, when the xml schema supports many contact number groups but only displays one in the physcal map and how can you do this conditionally, so if the fax number is missing you don't generate a blank ContactNameValue tag. |
|
|
|
#2
|
|
|
|
|
Joel,
Looks like you're doing some xCBL mapping also. You "should" be able to use the "Table Looping" and "Table Extractor" functoids to convert your "flat" schema into a "loop" structure. I've never tried to connect to these from database "Value Extractor" functoid however. I usually "normalize" my xml doing half the mapping in the receive port and the rest in my orchestration or send port. If you can't connect these functoids together you can always map twice in an orchestration. The BTS2004 help file has a good example of using the Table Looping and Table Extractor functoids to setup a nested output structure similar to what xCBL uses. |
|
|
| Similar Threads | |
| Complex mapping Hi, I am fairly new into BizTalk and I would like some advise into how to design complex mapping. More requirements being added with time made that I had to review... |
|
| Mapping complex In Biztalk, source schema i have a sequece group (max ocrrur = *) and output schema is a record (max occur = *). How to map to get multiple looping recores. NOw I only get... |
|
| Complex mapping Hi All, How do I map many source records to single target record in mapping. I have input/source file schema which has multiple records of same type. I Need to transform it... |
|
| Complex Mapping What I'm looking forward to is a functoid which can deflatten my input XML. My requirement requires multiple input xml scanning to generate the output xml. Following example... |
|
| XML 2 SQL without complex mapping Hello, I need a tool (preferable in PHP to run on every webserver or very easily accecable by PHP) which can convert data from XML to a relational DBS (MySQL). I donnot want... |
|
|
All times are GMT. The time now is 04:40 PM. | Privacy Policy
|