Biz(Talk)2

Talk, talk and more talk about BizTalk

BizTalk Mapping – fixing huge maps

I have been working with several industry standard Xml schema definitions, specifically those defined by the UBL standard by OASIS (www.oasis-open.org).  This organisation has a worthwhile, yet lofty, goal of defining a set of document standards that will cover the majority of communication needs for B2B.

The result of trying to be all things to all men is that the schemas defined are big.  Like really, REALLY big, with a set of included schema file that run about 8-10 deep.

The problem with this, in the BizTalk world, is when you either generate an instance document from the schema, or attempt to map a document to a UBL schema document using the BizTalk Mapper.  Due to the way the BizTalk handles default nodes, you end up with all default values being output into the destination document.

A quick, undocumented fix for this is to change the GenerateDefaultFixedNodes setting in the BizTalk Map.  Where is this setting, you ask?

Open the .btm file using the “XML Editor”, rather than the default “BizTalk Mapper” (i.e. right-click, choose “Open With…”, then XML Editor).  The root node of the map document is called “mapsource”, one of the attributes is called “GenerateDefaultFixedNodes”.  Change this from “Yes” to “No”, save and close, and you’re done.

This undocumented trick brought one of our generated XSLT transforms down from a slightly ridiculous 50 Mb to an easily handled 11 Kb, and the transform execution time from 20 seconds down to about the 50 millisecond mark (on a virtual machine)

Advertisements

June 5, 2009 - Posted by | BizTalk | , , , , , ,

3 Comments »

  1. […] map? Change the “GenerateDefaultFixedNodes” from “Yes” to “No” as described by Brett ( https://biztalktalk.wordpress.com/2009/06/05/biztalk-mapping-fixing-huge-maps/ ). As promised the resultant XSLT decreased to about 10Kb and above error went away. Thanks Brett. […]

    Pingback by My map won’t compile – No logical space left to create more user strings. « Connected Pawns | January 5, 2012 | Reply

  2. Thanks Brett

    I also had trouble with the UBL schema and was getting errors in Visual Studio such as “No logical space left to create more user strings” and out of memory when trying to compile a BizTalk solution containing a map that went to the UBL-Order-2.0.xsd.
    Your tweak fixed this issue for me.

    Comment by Colin Dijkgraaf | January 5, 2012 | Reply

  3. I hit the same problem with the UBL Order 2.0 schema today. Your fix worked great, thanks Brett.

    Comment by Rob Bowman | July 5, 2016 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: