Reputation: 997
We have a scenario where we will be receiving an Xml Source File as below
<Client>
<ClientAddress>
<ClientCode>123</ClientCode>
<ClientDBName>asdf</ClientDBName>
<ClientFEIN>asdf</ClientFEIN>
<ClientName>asdf</ClientName>
<ComplexityLevel>asdf</ComplexityLevel>
<EftpsPIN>asdf</EftpsPIN>
<Address>
<City>Test City</City>
<ClientCode>Test Code</ClientCode>
<Description>Test Desc</Description>
<State>Test Sta</State>
<Stree2>Test Stree2</Stree2>
<Street1>Test Stree1</Street1>
<UseAsDefault>false</UseAsDefault>
<ZipCode>1245</ZipCode>
</Address>
<Address>
<City>asdf</City>
<ClientCode>asdf</ClientCode>
<Description>asdf</Description>
<State>asdf</State>
<Stree2>asdf</Stree2>
<Street1>asdf</Street1>
<UseAsDefault>false</UseAsDefault>
<ZipCode>1255</ZipCode>
</Address>
</ClientAddress>
</Client>
The destination is Azure Sql Server Database with two tables Client and ClientAddress. But I am struck with mapping to two tables with one source.
is there any way to map directly? I am done with mapping from one source to one destination but our scenario is one source to multiple destinations, can this be possible. please help me I am very new to BizTalk and BizTalk services
I am working on Biztalk Services with azure Databases
Thanks in advance.
Upvotes: 2
Views: 217
Reputation: 1
Use debatching? Make the schema for the message that you have an envelope schema and create a new one for Address - this way you can have a send port that deals only with address and another one that deals with the client.
Upvotes: 0
Reputation: 18227
One alternative is to pass the XML to a stored procedure, but then the stored procedure will have to use OpenXML to parse the XML, since you have a one to many relationship.
A better alternative might be to call a WCF webservice that puts the data in SQL.
A third alternatives is to have two maps, and two send ports, but that's not ideal, because one of the parent relationships might fail, causing the child relationships to fail.
Upvotes: 0