Further to my initial posting I've done some investigations around ElementTunnel.exe (I'd forgotten this existed - information overload and my Brain ran out of RAM! - and was reminded about it in a chat with JMcLay).
Armed with this extra info my Googling proved more fruitful and I discovered a posting by Scott from 4 years ago around this (http://www.traceofthought.net/PermaLink,guid,640d3834-9574-4eb1-bca2-e38b78284e63.aspx).
Following his instructions there I used ElementTunnel to Unescape the Binding File exported from BizTalk. I used his suggested XPaths:
The end result of this process (at this point I didn't apply any of the conditional logic to make addresses, etc. environment specific) appeared to work when used to deploy from VS.NET - ran without error.
However, on closer inspection within the BizTalk Administration Console it was apparent that there were problems with the WSS Send & Receive Ports and the FTP Receive Ports. When you pressed the 'Configure' button in the Properties dialog for each of
them BizTalk popped up an 'Out of Memory' error and when the dialog finally opened none of the relevant properies were set. Once set manually everything was fine.
Clealry there is some problem with the end product of ElementTunnel as I have it configured.
When you look at the newly generated PortBindings Master File you can see that the escaped XML of the ReceiveLocationTransportTypeData record has been partially escaped - CustomProps and AdapterConfig have been unescaped (which is as defined in the XPaths).
Clearly BizTalk does not like the remaining escaped XML in the ReceiveLocationTransportTypeData record.
So my question is, just how much of this escaped XML should actually be unescaped? Should it be all of it or is there something else that I am missing?
Also, am I right in thinking that Filter expressions have to remain as escaped XML?
Thanks in anticiaption.