Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Route message on element node case?
- This topic has 3 replies, 1 voice, and was last updated 6 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
May 10, 2006 at 6:00 PM #13535
One alternative is to put a map on the receive port. You could pick your favorite format (long or short) and map all messages to that format.
A common example is that a company receives orders from companies x, y, and z. Each company sends orders in a different format.
So you could have 3 maps on the same receive port. You would create a common order internal format for your company. The maps magically run or not depending on the root element and target namespace of the data received. If none of the maps match, the message will just be passed on \”as is\”.
When the messages goes to the send port, it will have already been transformed to your common (internal) order format.
This is how we processed orders at my former client, it worked very nicely.
Neal Walters
http://Biztalk-Training.com-
May 10, 2006 at 3:52 PM #13536
We have a scenario where the input is a industry standard (schema for books called ONIX) xml file. However the XML instances can be in 2 formats – one long tag proper word version (with elements like <AudienceCodeScheme>) and another short tag code version (same tag called <b202> – to save the verbosity). Except for this, the schemas are identical in EVERY WAY. We have imported the 2 schemas into Biztalk.
The only flag which informs whether an instance is long tag or short tag is the case of the root element. If it is <ONIX[b:c8a6c96411]M[/b:c8a6c96411]essage>, it will be all long tags, if it is <ONIX[b:c8a6c96411]m[/b:c8a6c96411]essage>, it will be all short tags. (note the case of the \”m\”).
Based on this difference which is the best way to route the schemas into the maps? We are looking for a messaging solution only – no orchestrations are involved. Only a map will transform the content into a destination schema and transmitted to a send port. (I want to avoid property schemas if possible).
Thanks in advnce to the kind soul who helps….
-
May 10, 2006 at 6:36 PM #13537
[quote=\”nwalters\”] >>The maps magically run or not depending on the root element and target namespace of the data received.
What mechanisms do you use to effect this? (only flag is the case of the \”m\” letter).
-
-
-
May 15, 2006 at 4:43 AM #13534
There are a number of ways of doing this, most of them involve an orchestration.
One way of doing this with messaging only is to use a single map using custom Xslt.
You could use xsl:templates like this<xsl:template match=\”/\”>
<xsl:apply-templates select=\”/child::*\” />
</xsl:template>
<xsl:template match=\”ONIXMessage\”>
<!–long tag map–>
</xsl:template>
<xsl:template match=\”ONIXmessage\”>
<!–short tag map–>
</xsl:template>
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.