Andy
Andy

Reputation: 2318

Biztalk mapping to two XMLs with identical roots

I need to transform and split an inbound XML to two outbound XMLs. one of them is a SKU (containing about 100 elements) and the other is a SUPPLIERSKU (containing about 8 elements).

The way the program on the receiving end requires the files means they have a very similar structure with a dcsmergedata as a root. But having both schema's be correct means they both have the same root and means that when creating the mapping, only one of the schema's ends up being used twice.

I circumvented this by changing one of the schema's to have dcsmergedata2 as its root and this solves the problem in the mapping but means that my XML can't be read by the receiving program cause it doesn't follow the schema.

What would be the best way to get around this issue?

mapping

Upvotes: 0

Views: 100

Answers (2)

Zee
Zee

Reputation: 840

You can create 2 maps both mapping from schema1 to schema2. there's nothing wrong with it. you don't have to change the tgt schema's namespace/root element. as long as these 2 mapping binding to different send port, both mapping will work.

Upvotes: 3

Gruff
Gruff

Reputation: 555

I would suggest using two different send ports subscribing to the same message. Also, rather split up the mapping logic into two different maps mapping to two different target schemas to keep it simple and maintainable.

Upvotes: 5

Related Questions