BizTalk Server General - mapping repeating items results in extra nesting

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > April 2005 > mapping repeating items results in extra nesting





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 repeating items results in extra nesting
David Creel

2005-04-25, 5:51 pm

I have a schema from a webservice that I am mapping to another very similar
schema.

The schemas are both 'Order' records that have repeating 'OrderItem'
records. I'm trying to map one schema to the other, and it works great when
I do the 'Test Map' command. At runtime, though, the resulting XML gets an
extra level of nesting for the repeating 'OrderItem' element.

This is what I end up with (simplified):
<ns0:Order xmlns:ns0="http://eStoreSchemas">
<ns0:OrderID>33540</ns0:OrderID>
<ns0:CustomerContact>
<FirstName>David</FirstName>
<LastName>Creel</LastName>
</ns0:CustomerContact>
<ns0:OrderItems>
<ns0:Count>1</ns0:Count>
<ns0:OrderItem><!-- here is the extra nesting!!!-->
<ns0:OrderItem xmlns:ns0="http://eStoreSchemas">
<ns0:ID>19851</ns0:ID>
<ns0:ShippingTax>0</ns0:ShippingTax>
</ns0:OrderItem>
</ns0:OrderItem>
</ns0:OrderItems>
</ns0:Order>

And here is what I want to end up with:
<ns0:Order xmlns:ns0="http://eStoreSchemas">
<ns0:OrderID>33540</ns0:OrderID>
<ns0:CustomerContact>
<FirstName>David</FirstName>
<LastName>Creel</LastName>
<Email>david@electronicauto.com</Email>
<Phone />
<Fax />
</ns0:CustomerContact>
<ns0:OrderItems>
<ns0:Count>1</ns0:Count>
<ns0:OrderItem xmlns:ns0="http://eStoreSchemas">
<ns0:ID>19851</ns0:ID>
<ns0:ShippingTax>0</ns0:ShippingTax>
</ns0:OrderItem>
</ns0:OrderItems>
</ns0:Order>

What bothers me is that it works when testing, but not when running from an
orchestration. I'm sure there's something simple I am missing, anyone have
any ideas? I can post the map too, but its just a simple mapping of the
elements.

--
===>DavidC
David Creel

2005-04-26, 5:53 pm

Disregard

Problem was not with the map, but with a message assignment after the map.

"David Creel" wrote:

> I have a schema from a webservice that I am mapping to another very similar
> schema.
>
> The schemas are both 'Order' records that have repeating 'OrderItem'
> records. I'm trying to map one schema to the other, and it works great when
> I do the 'Test Map' command. At runtime, though, the resulting XML gets an
> extra level of nesting for the repeating 'OrderItem' element.
>
> This is what I end up with (simplified):
> <ns0:Order xmlns:ns0="http://eStoreSchemas">
> <ns0:OrderID>33540</ns0:OrderID>
> <ns0:CustomerContact>
> <FirstName>David</FirstName>
> <LastName>Creel</LastName>
> </ns0:CustomerContact>
> <ns0:OrderItems>
> <ns0:Count>1</ns0:Count>
> <ns0:OrderItem><!-- here is the extra nesting!!!-->
> <ns0:OrderItem xmlns:ns0="http://eStoreSchemas">
> <ns0:ID>19851</ns0:ID>
> <ns0:ShippingTax>0</ns0:ShippingTax>
> </ns0:OrderItem>
> </ns0:OrderItem>
> </ns0:OrderItems>
> </ns0:Order>
>
> And here is what I want to end up with:
> <ns0:Order xmlns:ns0="http://eStoreSchemas">
> <ns0:OrderID>33540</ns0:OrderID>
> <ns0:CustomerContact>
> <FirstName>David</FirstName>
> <LastName>Creel</LastName>
> <Email>david@electronicauto.com</Email>
> <Phone />
> <Fax />
> </ns0:CustomerContact>
> <ns0:OrderItems>
> <ns0:Count>1</ns0:Count>
> <ns0:OrderItem xmlns:ns0="http://eStoreSchemas">
> <ns0:ID>19851</ns0:ID>
> <ns0:ShippingTax>0</ns0:ShippingTax>
> </ns0:OrderItem>
> </ns0:OrderItems>
> </ns0:Order>
>
> What bothers me is that it works when testing, but not when running from an
> orchestration. I'm sure there's something simple I am missing, anyone have
> any ideas? I can post the map too, but its just a simple mapping of the
> elements.
>
> --
> ===>DavidC

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com