This is a discussion on BizTalk map preserving whitespace within the Server Management forums, part of the Servers and Hosting category; BizTalk map preserving whitespace According to the documentation at MSDN (Creating Links), BizTalk maps should not preserve whitespace. However, after ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| BizTalk map preserving whitespace According to the documentation at MSDN (Creating Links), BizTalk maps should not preserve whitespace. However, after a recent upgrade from 2006 to 2006 R2 our system seems now to be preserving whitespace. For example, when the element Field in the following XML: <ns0:Root xmlns:ns0="http://BizTalk_Server_Project2.source1"> <Field> </Field> </ns0:Root> gets mapped to an element called Field1 in a slightly different schema: <ns0:Root Field1="
 " xmlns:ns0="http://BizTalk_Server_Project2.destination> the whitespace remains in place. This is causing us a problem because the max length of the destination field is 1. I can't check (because the upgrade process does not seem to be reversible) but I don't believe this was the case prior to R2. Can anyone tell me if this is correct behaviour, and whether it has changed in R2?
__________________ A.Rajesh Khanna |
|
#2
| |||
| |||
| Hi, Update: one of my colleagues has just run the same test in BizTalk 2006 (non-R2) and confirmed that the behaviour is different. In BizTalk 2006 we get this as the output: <ns0:Root Field1="" xmlns:ns0="http://BizTalk_Server_Project2.destination> This is a serious issue for us because our system expects the whitespace to be stripped; and unfortunately we need R2 because of a critical bugfix it contains in another area. Does anyone know how we can revert to the previous behaviour?
__________________ A.Rajesh Khanna |
|
#3
| |||
| |||
| Hi, OK, after some digging in Reflector, I have got to the bottom of this. The behaviour has indeed changed in R2, although this is not documented anywhere that I can find. In BizTalk 2006 (non-R2), the method Microsoft.BizTalk.ScalableTransformation.BTSXslTra nsform.DoStandardTransformation looks like this: private void DoStandardTransform(Stream strm, XsltArgumentList args, Stream output, XmlResolver resolver) { Trace.Tracer.TraceMessage(4, "LMT:Use Standard Transformation", new object[0]); XPathDocument input = new XPathDocument(strm); this.xform.Transform(input, args, output, resolver); Trace.Tracer.TraceMessage(4, "LMT one with Standard Transformation", new object[0]); } But in R2 it looks like this: private void DoStandardTransform(Stream strm, XsltArgumentList args, Stream output, XmlResolver resolver) { Trace.Tracer.TraceMessage(4, "LMT:Use Standard Transformation", new object[0]); if (legacyWhitespaceBehavior) { this.xform.Transform(new XPathDocument(strm), args, output, resolver); } else { this.xform.Transform(new XPathDocument(new XmlTextReader(strm), XmlSpace.Preserve), args, output, resolver); } Trace.Tracer.TraceMessage(4, "LMT one with Standard Transformation", new object[0]); } Digging a little further, I found that legacyWhitespaceBehaviour gets set in the static constructor: static BTSXslTransform() { Transform_CLSID = new Guid("{917718A6-67E1-47c0-9267-2164A0DF632B}"); legacyWhitespaceBehavior = false; defaultAutoSwitchThreshold = 0x100000; int registryValue = Utils.GetRegistryValue("TransformThreshold", @"Software\Microsoft\BizTalk Server\3.0\Administration"); if (registryValue > 0) { defaultAutoSwitchThreshold = registryValue; } if (Utils.GetRegistryValue("LegacyWhitespace", @"Software\Microsoft\BizTalk Server\3.0\Administration") > 0) { legacyWhitespaceBehavior = true; } } And sure enough, by creating the registry key HKLM\Software\Microsoft\BizTalk Server\3.0\Administration\LegacyWhitespace and setting it to 1, I get the result I was expecting. Googling for "biztalk legacywhitespace" returns no results, so this is apparently a completely undocumented feature
__________________ A.Rajesh Khanna |
|
#4
| |||
| |||
| Hi, I'm having the same issue in BizTalk 2006 R2 so i followed to create Reg Key but no luck. Pls help me. |
|
#5
| |||
| |||
| Hi, arjkhanna has provided solution for this issue: open registry on R2 Biztalk box and create new Dword named LegacyWhitespace under by creating the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\BizTalk Server\3.0\Administration and setting it to 1
__________________ Shaalini.S ![]() Be the Best of Whatever you are... |
|
#6
| |||
| |||
| Hi, I created the same key, recycled hosts and rebooted server as well. I am still getting the same error. What am i doing wrong? |
|
#7
| |||
| |||
| Hi all, The server was Win 2003 X64. But the hosts were running as 32 bit. This article states the location for 32 bit apps on a 64 bit OS. After updating in this location it started to work Registry changes in x64-based versions of Windows Server 2003 and in Windows XP Professional x64 Edition For 32 bit applications running on 64 bit OS the registry settings are stored under HKLM\Software\WOW6432Node
__________________ A.Rajesh Khanna |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| BizTalk 2009 project migration | nnraja | Server Management | 1 | 06-10-2009 08:36 PM |
| BizTalk memory behavior | nnraja | Server Management | 3 | 06-10-2009 07:01 PM |
| BizTalk 2006 and Virtualization | bluesky | Server Management | 2 | 06-10-2009 03:15 AM |
| BizTalk messages to processs all the messaages at a time | arjkhanna | Server Management | 4 | 06-09-2009 11:46 PM |
| Biztalk Server Interview Questions | prasannavigneshr | Interview Questions & Answers and Tips | 15 | 06-03-2008 03:00 AM |
Our Partners |