MasterBindings - problem with embedded XML

Topics: Bindings File, Settings Management and SSO, Server Deployment, Tips and Tricks
Mar 30, 2011 at 5:56 PM
Edited Mar 30, 2011 at 5:56 PM

Hi All,

I am having some troubles trying to set up the master bindings in order to encode and decode the embedded XML such as ReceiveLocationTransportTypeData

I followed the general instructions: I decode the original bindings (by using ElementTunnel.exe) and put the embedded decode XML into the master binding and set up   <ApplyXmlEscape>true</ApplyXmlEscape> in order to encode it again but it seems that I am doing something wrong because I am getting these errores:

 

while encoding:

InitializeAppName:
  BizTalk Application Name is CapGemini.Adecco.AW.Bts.GM
PreprocessBindings:
  Clearing file attributes for 'PortBindings.xml'.
  "C:\Program Files\Deployment Framework for BizTalk\5.0\Framework\DeployTools\xmlpreprocess.exe" /f /v /c /i:"H:\Projects\AdeccoWeb\Deployment\GM\BizTalk\CapGemini.Adecco.AW.Bts.GM\CapGemini.Adecco.AW.Bts.GM.Deployment\PortBindingsMaster.xml" /o:"H:\Projects\AdeccoWeb\Deployment\GM\BizTalk\CapGemini.Adecco.AW.Bts.GM\CapGemini.Adecco.AW.Bts.GM.Deployment\PortBindings.xml" /d:CurDir="H:\Projects\AdeccoWeb\Deployment\GM\BizTalk\CapGemini.Adecco.AW.Bts.GM" /s:"H:\Projects\AdeccoWeb\Deployment\GM\BizTalk\CapGemini.Adecco.AW.Bts.GM\CapGemini.Adecco.AW.Bts.GM.Deployment\EnvironmentSettings\local_settings.xml"
  XmlPreprocess v2.0.11.0
  Copyright (c) 2004-2009 Loren M Halvorson
  XML File Preprocessor
 
  Settings XML file: "H:\Projects\AdeccoWeb\Deployment\GM\BizTalk\CapGemini.Adecco.AW.Bts.GM\CapGemini.Adecco.AW.Bts.GM.Deployment\EnvironmentSettings\local_settings.xml"
  Preprocessing "H:\Projects\AdeccoWeb\Deployment\GM\BizTalk\CapGemini.Adecco.AW.Bts.GM\CapGemini.Adecco.AW.Bts.GM.Deployment\PortBindingsMaster.xml" to "H:\Projects\AdeccoWeb\Deployment\GM\BizTalk\CapGemini.Adecco.AW.Bts.GM\CapGemini.Adecco.AW.Bts.GM.Deployment\PortBindings.xml"...
  PortBindings.xml : Set the value 'CapGemini.Adecco.AW.Bts.GM' of 3 node(s) matching XPath '//ApplicationName'.
  "C:\Program Files\Deployment Framework for BizTalk\5.0\Framework\DeployTools\ElementTunnel.exe" /i:"H:\Projects\AdeccoWeb\Deployment\GM\BizTalk\CapGemini.Adecco.AW.Bts.GM\CapGemini.Adecco.AW.Bts.GM.Deployment\PortBindings.xml" /o:"H:\Projects\AdeccoWeb\Deployment\GM\BizTalk\CapGemini.Adecco.AW.Bts.GM\CapGemini.Adecco.AW.Bts.GM.Deployment\PortBindings.xml" /x:"C:\Program Files\Deployment Framework for BizTalk\5.0\Framework\DeployTools\adapterXPaths.txt" /encode+
  Nested XML Encoder/Decoder for BizTalk XML Binding Files v1.2.0.0
  Copyright (C) 2005-2010 Scott Colestock, Tim Rayburn, Thomas F. Abraham
 
  Encodes/decodes child content of XML element(s) located with an XPath
  within an XML document. It applies escaping rules such as &gt; for '<'.
  Namespace declarations, PIs, etc. of nested documents are not preserved.
 
  Found node: /BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/ReceiveLocationTransportTypeData/CustomProps/AdapterConfig
 
  No nodes found for the XPath '/BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/ReceiveLocationTransportTypeData/CustomProps/BindingConfiguration' - skipping.
 
  Found node: /BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/ReceiveLocationTransportTypeData
 
  Found node: /BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/ReceiveLocationTransportTypeData
 
  Found node: /BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/ReceiveLocationTransportTypeData
 
  Found node: /BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/ReceivePipelineData
 
  Found node: /BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/ReceivePipelineData
 
  Found node: /BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/ReceivePipelineData
 
  Found node: /BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/SendPipelineData
 
  Found node: /BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/SendPipelineData
 
  Found node: /BindingInfo/ReceivePortCollection/ReceivePort/ReceiveLocations/ReceiveLocation/SendPipelineData
 
  No nodes found for the XPath '/BindingInfo/SendPortCollection/SendPort/*/TransportTypeData/CustomProps/StaticAction' - skipping.
 
  No nodes found for the XPath '/BindingInfo/SendPortCollection/SendPort/*/TransportTypeData/CustomProps/AdapterConfig' - skipping.
 
  No nodes found for the XPath '/BindingInfo/SendPortCollection/SendPort/*/TransportTypeData/CustomProps/BindingConfiguration' - skipping.
 
  No nodes found for the XPath '/BindingInfo/SendPortCollection/SendPort/*/TransportTypeData' - skipping.
 
  No nodes found for the XPath '/BindingInfo/SendPortCollection/SendPort/ReceivePipelineData' - skipping.
 
  No nodes found for the XPath '/BindingInfo/SendPortCollection/SendPort/SendPipelineData' - skipping.
 
  No nodes found for the XPath '/BindingInfo/PartyCollection/Party/CustomData' - skipping.

and after that when the framework tries to import the resulted PortBindings file I am getting the following:

  Information: Importing bindings "H:\Projects\AdeccoWeb\Deployment\GM\BizTalk\CapGemini.Adecco.AW.Bts.GM\CapGemini.Adecco.AW.Bts.GM.Deployment\PortBindings.xml" into application "CapGemini.Adecco.AW.Bts.GM" in BizTalk configuration database (server="CAPADW028A.aw.capade.capgemini.es", database="BizTalkMgmtDb_jberlin")...
  Error: Failed to update binding information.
  Invalid or malformed XML data.

the section as I decoded:

 <ReceiveLocationTransportTypeData>
            <CustomProps>
              <AdapterConfig vt="8">
                <Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
                  <queue>FORMATNAME:DIRECT=OS:LOCA\PRIVATE$\MQPRIVATEIEM_VACANCYCREATION_GMOTORS</queue>
                  <uri>FORMATNAME:DIRECT=OS:LOCALHOST\PRIVATE$\MQPRIVATEIEM_VACANCYCREATION_GMOTORS</uri>
                  <batchSize>20</batchSize>
                  <transactional>true</transactional>
                  <serialProcessing>false</serialProcessing>
                  <onFailure>suspendResumable</onFailure>
                  <userName>AW\bzawdep</userName>
                  <password>******</password>
                </Config>
              </AdapterConfig>
            </CustomProps>
          </ReceiveLocationTransportTypeData>

the same encoded after I tried to deploy:

<ReceiveLocationTransportTypeData>&lt;CustomProps&gt;&lt;AdapterConfig vt="8"&gt;&amp;lt;Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;&amp;lt;queue&amp;gt;FORMATNAME:DIRECT=OS:LOCA\PRIVATE$\MQPRIVATEIEM_VACANCYCREATION_GMOTORS&amp;lt;/queue&amp;gt;&amp;lt;uri&amp;gt;FORMATNAME:DIRECT=OS:LOCALHOST\PRIVATE$\MQPRIVATEIEM_VACANCYCREATION_GMOTORS&amp;lt;/uri&amp;gt;&amp;lt;batchSize&amp;gt;20&amp;lt;/batchSize&amp;gt;&amp;lt;transactional&amp;gt;true&amp;lt;/transactional&amp;gt;&amp;lt;serialProcessing&amp;gt;false&amp;lt;/serialProcessing&amp;gt;&amp;lt;onFailure&amp;gt;suspendResumable&amp;lt;/onFailure&amp;gt;&amp;lt;userName&amp;gt;AW\bzawdep&amp;lt;/userName&amp;gt;&amp;lt;password&amp;gt;******&amp;lt;/password&amp;gt;&amp;lt;/Config&amp;gt;&lt;/AdapterConfig&gt;&lt;/CustomProps&gt;</ReceiveLocationTransportTypeData>

 

What could be the problem ? I added the xmls namespaces manually at beginning to fix the problem but I am getting the same as before.regarding the adapterXPaths file I have the latest version.

Any help is welcome!

Thanks

Julian R Berlin

Coordinator
Mar 30, 2011 at 6:40 PM

Hi Julian,

Did you start out with the binding file instructions here?  If so, did you try the WinMerge/compare steps?  You will solve this quicker by narrowing down the issue by comparing the binding file as exported by BizTalk Admin to the PortBindings.xml (after re-encoding) generated during deployment.  That should get you down to a specific spot where the XML is incorrect.

Have you by chance done any copy/paste/editing of the master bindings file in Visual Studio?  There is one very sensitive piece of the bindings XML where a newline inside an element is enough to cause that invalid XML error.  You see it all on one line as generated by BizTalk Admin, but after Visual Studio "pretty prints" the XML and inserts a newline, it fails to import.  Unfortunately I don't recall the specific element name right now.

Please try out the compare and let me know what you find.

Thanks,
Tom

Coordinator
Mar 30, 2011 at 6:41 PM

Oh, and it is not unusual to see "No nodes found for the XPath" messages, because you will not always have every single element populated.  That's probably not the source of your issue.

Thanks,
Tom

Mar 31, 2011 at 3:44 PM

Hi Tom

thanks a lot for your replies, I finally found the problem, I tested the MasterBindings file partially updated (I only replaced one receive location with the resulted XML from ElementTunnel.exe) and while deploying the remaining embedded XML was causing problems, then I replaced all and now seems to be working fine !! my next step is to put the metavariables to replace the values with those defined in the environment settings.

this framework rules !!

thanks !

Julian

Coordinator
Mar 31, 2011 at 8:56 PM

Thanks Julian, very happy to hear the great feedback!

Thanks,
Tom