<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.mexia.com.au</title>
	<atom:link href="http://mexia.com.au/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://mexia.com.au/blog</link>
	<description>Mexia - Enterprise Integration Specialists</description>
	<lastBuildDate>Thu, 05 Apr 2012 05:35:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>BizTalk 2010 XML Polling with WCF-SQL Adapter</title>
		<link>http://mexia.com.au/blog/2012/04/05/biztalk-2010-xml-polling-with-wcf-sql-adapter/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=biztalk-2010-xml-polling-with-wcf-sql-adapter</link>
		<comments>http://mexia.com.au/blog/2012/04/05/biztalk-2010-xml-polling-with-wcf-sql-adapter/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 05:35:47 +0000</pubDate>
		<dc:creator>bill</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mexia.com.au/blog/2012/04/05/biztalk-2010-xml-polling-with-wcf-sql-adapter/</guid>
		<description><![CDATA[One of the feature that came with the WCF-SQL Adapter was the ability to XML polling from SQL.&#160; Anyone that remembers the original SQL adapter from BizTalk remembers the requirement for all the data returned from SQL to have the &#8230; <a href="http://mexia.com.au/blog/2012/04/05/biztalk-2010-xml-polling-with-wcf-sql-adapter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the feature that came with the WCF-SQL Adapter was the ability to XML polling from SQL.&nbsp; Anyone that remembers the original SQL adapter from BizTalk remembers the requirement for all the data returned from SQL to have the FOR XML AUTO added to the end of the query and the XMDATA added to add the Store Procedure call to your BizTalk project.</p>
<p>Typically when you poll data out of SQL it is a single table or the output of a stored procedure, this limited the type of data that could be returned, the example is that it was difficult to return the order header and all the detail lines with a single polling statement.&nbsp; The XML polling feature of the WCF-SQL adapter allow you to create your own XML document in SQL and return it to BizTalk via a polling statement.</p>
<p>In this blog post I am going to show how to do this.</p>
<h2>Background</h2>
<p>I will be using the Sample AdventureWorks database and returning and Order XML document.</p>
<p>Install the AdventureWorks SQL sample database from <a title="http://sqlserversamples.codeplex.com/" href="http://sqlserversamples.codeplex.com/">http://sqlserversamples.codeplex.com/</a></p>
<p>Install the BizTalk 2010 LOB Adapter SDK and the LOB Adapter Pack (in not already installed)</p>
<h2>In SQL</h2>
<p>Create a SQL Stored Procedure to return the desired data, using the xmlnamespaces and for xml path.&nbsp; You will need to decide when you create your stored procedure whether it will be returning a single Order or a batch of Orders, there will be not difference to the XML generated in the stored procedure just a difference in how you select the records to return.&nbsp; The stored procedure that I have created returns up to 5 Orders per call.</p>
<p>(complete SQL Stored Procedure available in download below)</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/image.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/image_thumb.png" width="175" height="244"></a></p>
<p>Grant the BizTalk Application User group access to the AdventureWorks database and execute privileges to the GetSalesOrdersToProcess stored procedure.</p>
<p>Execute the stored procedure to create a sample XML document and save it to order.xml</p>
<h2>In Visual Studio</h2>
<p>Create a BizTalk Project (I am using Demo.WCFSQL.Polling for the solution name and AdventureWorks.Schemas for the project name)</p>
<p>In the BizTalk project add a generated item and select generated schema, in the generated schema dialog select Well-Formed XML, then select the order.xml file saved above.&nbsp; This will create an order.xsd in your BizTalk project.&nbsp; You may also need to update any numeric fields to the correct data types, the generated schema wizard sets number to the smallest data type that fits the sample data.</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/image1.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/image_thumb1.png" width="244" height="131"></a></p>
<p>If you decide when creating your stored procedure to return multiple orders per execution, you will need to create and orders.xsd envelope schema, like this:</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/image2.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/image_thumb2.png" width="244" height="110"></a></p>
<p>And set the Body XPath to the root node Orders.</p>
<p>Strong name your BizTalk project and set the deployment application name (I am using Demo.WCFSQL.Polling)</p>
<p>This is the complete Solution</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/image3.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/image_thumb3.png" width="244" height="236"></a></p>
<p>Build and deploy your solution.</p>
<h2>In BizTalk Administration Console</h2>
<p>Expand the application that you deployed your solution into (I am using Demo.WCFSQL.Polling)</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/image4.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/image_thumb4.png" width="240" height="244"></a></p>
<p>&nbsp;</p>
<h3>Create Receive Port and Receive Location</h3>
<p>You now need to create the one-way WCF-SQL receive port and receive location (I am using AdventureWorks.Orders.Polling as the receive port name and AdventureWorks.Orders.Polling.WCFSQL as the receive location name)</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML13f2d2e.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML13f2d2e" border="0" alt="SNAGHTML13f2d2e" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML13f2d2e_thumb.png" width="244" height="197"></a></p>
<p>The receive location can either be created as a WCF-Custom with the sqlBinding or as a WCF-SQL adapter (I am using the WCF-Custom with the sqlBinding)</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML140cd14.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML140cd14" border="0" alt="SNAGHTML140cd14" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML140cd14_thumb.png" width="244" height="197"></a></p>
<p>After selecting WCF-Custom, click Configure.</p>
<p>On the General Tab type in the Address (URI), this consist of the protocol, server name, database name and Inbound Id like below:</p>
<p>mssql://&lt;servername&gt;//&lt;databasename&gt;?InboundId=Orders (my example looks like: <a title="mssql://.//AdventureWorks?InboundId=Orders" href="mssql://.//AdventureWorks?InboundId=Orders">mssql://.//AdventureWorks?InboundId=Orders</a>)</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML1444520.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML1444520" border="0" alt="SNAGHTML1444520" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML1444520_thumb.png" width="178" height="244"></a></p>
<p>On the Binding Tab, select sqlBinding in the Binding Type drop down list</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML146fad8.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML146fad8" border="0" alt="SNAGHTML146fad8" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML146fad8_thumb.png" width="223" height="244"></a></p>
<p>Set the following setting</p>
<table border="2" cellspacing="0" cellpadding="2" width="798">
<tbody>
<tr>
<td valign="top" width="198">Key</td>
<td valign="top" width="206">Value</td>
<td valign="top" width="390">Comment</td>
</tr>
<tr>
<td valign="top" width="202">inboundOperationType</td>
<td valign="top" width="205">XmlPolling</td>
<td valign="top" width="390">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="205">polledDataAvailableStatement</td>
<td valign="top" width="205">select count(*) from [Sales].[SalesOrderHeader] where [status] = 5</td>
<td valign="top" width="390">This would be specific to your situation, this statement queries your table to see if any records are available to retrieve</td>
</tr>
<tr>
<td valign="top" width="207">pollingIntervalInSeconds</td>
<td valign="top" width="205">30</td>
<td valign="top" width="390">how often to try to retrieve data</td>
</tr>
<tr>
<td valign="top" width="208">pollingStatement</td>
<td valign="top" width="205">exec [dbo].[GetSalesOrdersToProcess]</td>
<td valign="top" width="390">this calls the stored procedure to retrieve data</td>
</tr>
<tr>
<td valign="top" width="208">xmlStoredProcedureRootNodeName</td>
<td valign="top" width="205">Orders</td>
<td valign="top" width="390">this is only necessary if you chose to bring back more than one order per execution</td>
</tr>
<tr>
<td valign="top" width="208">xmlStoredProcedureRootNodeNamespace</td>
<td valign="top" width="205">http://AdventureWorks.Schemas.Orders</td>
<td valign="top" width="390">this is only necessary if you chose to bring back more than one order per execution</td>
</tr>
</tbody>
</table>
<p>Note: useAmbientTransaction defaults to True, if MSDTC is not configured between BizTalk and the source SQL Server you will have to set this to false</p>
<p>Click Ok, to close the WCF-Custom Transport Properties dialog</p>
<p>Select the appropriate Receive handler and set the Receive Pipeline to XMLReceive, then click OK to close the Receive Location Properties</p>
<p>&nbsp;</p>
<h3>Create Send Port</h3>
<p>For this example we are just going to send the XML message directly out to a file location</p>
<p>You now need to create a one-way send port (I am using AdventureWorks.Orders.Send.FILE for the send port name)</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML15574d8.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML15574d8" border="0" alt="SNAGHTML15574d8" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML15574d8_thumb.png" width="244" height="197"></a></p>
<p>Select a file location for the output XML messages (I am using C:\Working\Demo.WCFSQL.Polling\Out\%MessageID%.xml)</p>
<p>On the Filters tab, set the following filter: (this is for my example, yours may differ)</p>
<p>BTS.ReceivePortName == AdventureWorks.Orders.Polling</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML157e65f.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML157e65f" border="0" alt="SNAGHTML157e65f" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML157e65f_thumb.png" width="244" height="197"></a></p>
<p>Click Ok to close the Send Port Properties dialog</p>
<p>&nbsp;</p>
<h3>Start the application</h3>
<p>Right click on the Application and select start</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/image5.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/image_thumb5.png" width="228" height="244"></a></p>
<p>&nbsp;</p>
<h3>Check the Output directory</h3>
<p>You will notice with my example, 5 files are create at a each polling interval in the directory and that each file represents an order.</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML163bd0e.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML163bd0e" border="0" alt="SNAGHTML163bd0e" src="http://mexia.com.au/blog/wp-content/uploads/2012/04/SNAGHTML163bd0e_thumb.png" width="244" height="154"></a></p>
<p>Note: there are over 31,000 orders in the AdventureWorks database.</p>
<p>&nbsp;</p>
<h2>Summary</h2>
<p>I hope this example give you the information that you need to get started with XmlPolling with BizTalk and the WCF-SQL Adapter.</p>
<p>&nbsp;</p>
<p><a href="http://www.biztalkbill.com/downloads.aspx">Code for this Sample</a></p>
<p>&nbsp;</p>
<p>Bill Chesnut, Principal Consultant, Mexia</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong><font size="4"></font></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://mexia.com.au/blog/2012/04/05/biztalk-2010-xml-polling-with-wcf-sql-adapter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Issues with Tracking causing high CPU usage on BizTalk SQL Server (Additional Info)</title>
		<link>http://mexia.com.au/blog/2012/04/02/issues-with-tracking-causing-high-cpu-usage-on-biztalk-sql-server-additional-info/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=issues-with-tracking-causing-high-cpu-usage-on-biztalk-sql-server-additional-info</link>
		<comments>http://mexia.com.au/blog/2012/04/02/issues-with-tracking-causing-high-cpu-usage-on-biztalk-sql-server-additional-info/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 13:12:41 +0000</pubDate>
		<dc:creator>bill</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[High CPU]]></category>
		<category><![CDATA[StreamStatus]]></category>
		<category><![CDATA[Tracking]]></category>
		<category><![CDATA[tracking host]]></category>
		<category><![CDATA[tracking_1_x]]></category>

		<guid isPermaLink="false">http://mexia.com.au/blog/2012/04/02/issues-with-tracking-causing-high-cpu-usage-on-biztalk-sql-server-additional-info/</guid>
		<description><![CDATA[Since the 1st occurrence of this issue (Issues with Tracking causing high CPU usage on BizTalk SQL Server), I have had 2 other clients with similar issues, each with different root causes.&#160; The key finding about these issues is that &#8230; <a href="http://mexia.com.au/blog/2012/04/02/issues-with-tracking-causing-high-cpu-usage-on-biztalk-sql-server-additional-info/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since the 1st occurrence of this issue (<a href="http://www.biztalkbill.com/Home/tabid/40/EntryId/91/Issues-with-Tracking-causing-high-CPU-usage-on-BizTalk-SQL-Server.aspx" target="_blank">Issues with Tracking causing high CPU usage on BizTalk SQL Server</a>), I have had 2 other clients with similar issues, each with different root causes.&nbsp; The key finding about these issues is that it is not obvious what the problem is from the initial problem determination, one of the recent issues showed up as a throttling issue for database size, but when running the Message Box Viewer tool, there was no errors that indicated the root cause, but there were warnings around the size of on of the tracking_1_x tables.</p>
<p>The underlying issue with the 2nd occurrence of this issue was a failed upgrade from 2006 R2 to 2009, although the upgrade seemed to work correctly, the user running the upgrade did not have sysadmin privileges on the BizTalk SQL Server, as required in the install instructions.&nbsp; This lack of permission lead to the service account for the Tracking host not being given permission on the tables and stored procedures that are used doing the movement of tracking data from the message box database to the tracking database.&nbsp; Once the permissions were update (cross checked permissions from a successfully upgraded 2009 BizTalk SQL Server), tracking data started to be moved from the message box database to the tracking database.</p>
<p>The 3rd occurrence is still under investigation, but the symptoms are the same, High CPU on the BizTalk server and large number of records in the tracking_1_x tables in the message box database.</p>
<p>From now on, one of my 1st checks for a poorly performing BizTalk system will be check the tracking_1_x tables and the TDDS_StreamStatus table.&nbsp; I will be publishing a SCOM monitor to detect the tracking data not being copied and hopefully a rule for message box viewer that will clearly identify this issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://mexia.com.au/blog/2012/04/02/issues-with-tracking-causing-high-cpu-usage-on-biztalk-sql-server-additional-info/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XmlDocument.LoadXml() Leads to System.Net.WebException ??</title>
		<link>http://mexia.com.au/blog/2012/03/26/xmldocument-loadxml-leads-to-system-net-webexception/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=xmldocument-loadxml-leads-to-system-net-webexception</link>
		<comments>http://mexia.com.au/blog/2012/03/26/xmldocument-loadxml-leads-to-system-net-webexception/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 23:05:02 +0000</pubDate>
		<dc:creator>Dan Toomey</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://mexia.com.au/blog/2012/03/26/xmldocument-loadxml-leads-to-system-net-webexception/</guid>
		<description><![CDATA[Today we encountered an interesting error when attempting to serialise a .NET object into XML and load it into a BizTalk message: xlang/s engine event log entry: Uncaught exception (see the &#8216;inner exception&#8217; below) has suspended an instance of service &#8230; <a href="http://mexia.com.au/blog/2012/03/26/xmldocument-loadxml-leads-to-system-net-webexception/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><font size="2">Today we encountered <font>an interesting error</font> when attempting to serialise a .NET object into XML and load it into a BizTalk message:</font></p>
<blockquote><p><font size="2" face="Courier New">xlang/s engine event log entry: Uncaught exception (see the &#8216;inner exception&#8217; below) has suspended an instance of service &#8216;client.namespace.ProcessBatchRequest(8a00989b-e30d-c936-0b7e-0d20df729132)&#8217;.<br />The service instance will remain suspended until administratively resumed or terminated. <br />If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.<br />InstanceId: 2dd299ec-0a2e-4505-8457-743a7e429cc9<br />Shape name: SerialiseResponse<br />ShapeId: cb127047-22bc-4df7-a1f9-7a8dd5d9879f<br />Exception thrown from: segment 1, progress 166<br />Inner exception: The underlying connection was closed: The connection was closed unexpectedly.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><font>Exception type: WebException</font><br />Source: System<br />Target Site: System.Net.WebResponse GetResponse()<br />The following is a stack trace that identifies the location where the exception occured</font></p>
<p><font size="2" face="Courier New">&nbsp;&nbsp; at System.Net.HttpWebRequest.GetResponse()<br />&nbsp;&nbsp; at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)<br />&nbsp;&nbsp; at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)<br />&nbsp;&nbsp; at System.Xml.XmlTextReaderImpl.OpenAndPush(Uri uri)<br />&nbsp;&nbsp; at System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset(String publicId, String systemId, String baseUriStr, Uri&amp; baseUri, String entityName)<br />&nbsp;&nbsp; at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)<br />&nbsp;&nbsp; at System.Xml.DtdParser.ParseExternalSubset()<br />&nbsp;&nbsp; at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)<br />&nbsp;&nbsp; at System.Xml.DtdParser.System.Xml.IDtdParser.ParseInternalDtd(IDtdParserAdapter adapter, Boolean saveInternalSubset)<br />&nbsp;&nbsp; at System.Xml.XmlTextReaderImpl.ParseDtd()<br />&nbsp;&nbsp; at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()<br />&nbsp;&nbsp; at System.Xml.XmlTextReaderImpl.ParseDocumentContent()<br />&nbsp;&nbsp; at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)<br />&nbsp;&nbsp; at System.Xml.XmlDocument.Load(XmlReader reader)<br />&nbsp;&nbsp; <font>at System.Xml.XmlDocument.LoadXml(String xml)<br /></font>&nbsp;&nbsp; at client.Common.Types.TempPPSRBatch.CreatePayloadFromString(String p)<br />&#8230;<br />&nbsp;&nbsp; at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception&amp; exp)<br /></font></p>
</blockquote>
<p><font size="2"></font>&nbsp;</p>
<p align="left"><font size="2">The last line of custom code <font>(highlighted above)</font> was the call to the “LoadXml” method on an XmlDocument object (a method every BizTalk developer knows intimately!)&nbsp; Why on earth, you ask, would this yield a <em>WebException</em>?? At most, we would normally expect an XmlException if the string parameter was invalid XML.</font></p>
<p align="left"><font size="2">A bit of Googling yielded the answer in <a href="http://stackoverflow.com/questions/7388949/why-does-xmldocument-loadxml-throw-system-net-webexception">this post</a>, as well as the pointer to the explanation supplied by <a title="http://stackoverflow.com/users/88558/lucero" href="http://stackoverflow.com/users/88558/lucero">http://stackoverflow.com/users/88558/lucero</a>. Basically, it looks like the W3C has grown tired of its servers being hammered by XML parsers downloading the DTD documents referenced as standard namespace declarations (e.g. <a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>).</font></p>
<p><font size="2">Based on the W3C post, this seems like it would be frequent problem, but I believe the issue was caused in this case by the fact that the payload XML string we were loading contained some “text/html” content with a “&lt;!DOCTYPE&gt;” reference including the “<a title="http://www.w3.org/TR/html4/loose.dtd" href="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>” namespace. In any case, it would be wise to consider this anytime you are loading an XmlDocument object, particularly if you are not sure whether the content may cause the XmlResolver to look up external resources. This solution provided by <a href="http://stackoverflow.com/users/440739/edwin-de-koning">Edwin de Koning</a> worked well for me <em>(translated to C# from his sample VB code)</em>:</font></p>
<blockquote><p>XmlDocument doc = new XmlDocument();<br />XmlReaderSettings settings = new XmlReaderSettings();<br />settings.XmlResolver = null;<br />settings.DtdProcessing = DtdProcessing.Ignore;</p>
<p>using (StringReader sr = new StringReader(xmlString))<br />{<br />&nbsp;&nbsp;&nbsp; using (XmlReader reader = XmlReader.Create(sr, settings))<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; doc.Load(reader);<br />&nbsp;&nbsp;&nbsp; }<br />}</p>
</blockquote>
<p><font size="2"></font>&nbsp;</p>
<p><font size="2"></font>&nbsp;</p>
<p><font size="2"></font></p>
]]></content:encoded>
			<wfw:commentRss>http://mexia.com.au/blog/2012/03/26/xmldocument-loadxml-leads-to-system-net-webexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DTCPing &amp; DTCTest&#8211;Useful Toolbox Items</title>
		<link>http://mexia.com.au/blog/2012/02/22/dtcping-dtctestuseful-toolbox-items/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=dtcping-dtctestuseful-toolbox-items</link>
		<comments>http://mexia.com.au/blog/2012/02/22/dtcping-dtctestuseful-toolbox-items/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 01:30:30 +0000</pubDate>
		<dc:creator>Dan Toomey</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[DTC]]></category>

		<guid isPermaLink="false">http://mexia.com.au/blog/2012/02/22/dtcping-dtctestuseful-toolbox-items/</guid>
		<description><![CDATA[When configuring BizTalk in a multi-server environment, getting the Microsoft Distributed Transaction Coordinator (MS DTC) settings right on all participating servers in the group is critical. If you don&#8217;t, you&#8217;ll run into all sorts of errors that don&#8217;t always explicitly &#8230; <a href="http://mexia.com.au/blog/2012/02/22/dtcping-dtctestuseful-toolbox-items/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><font size="2">When configuring BizTalk in a multi-server environment, getting the Microsoft Distributed Transaction Coordinator (MS DTC) settings right on all participating servers in the group is critical. If you don&#8217;t, you&#8217;ll run into all sorts of errors that don&#8217;t always explicitly point to DTC issues.</font></p>
<p><font size="2">This article by </font><a href="http://www.remotedbaexperts.com/Blog/author/jshropshire/"><font size="2">James Shropshire</font></a><font size="2"> gives some helpful advice about using these two free tools from Microsoft to troubleshoot issues with MS DTC:</font></p>
<p><a href="http://www.remotedbaexperts.com/Blog/2011/01/troubleshooting-biztalk-dtc-issues-with-dtcping-and-dtctest/"><font size="2">http://www.remotedbaexperts.com/Blog/2011/01/troubleshooting-biztalk-dtc-issues-with-dtcping-and-dtctest/</font></a></p>
<p><font size="2">Yesterday, the DTCTest proved very helpful in identifying issues at a client where they had used an unsupported cloning tool to create the BizTalk and the SQL server images, which left both with the same CID (these must be unique). Fortunately, the problem was solved by running the following two commands:</font></p>
<p><font size="2" face="Courier New">msdtc –uninstall</font></p>
<p><font size="2" face="Courier New">msdtc –install</font></p>
<p><font size="2"></font>&nbsp;</p>
<p><font size="2">More information about this can be found here:</font></p>
<p><a href="http://msdn.microsoft.com/en-us/library/aa561924.aspx"><font size="2">http://msdn.microsoft.com/en-us/library/aa561924.aspx</font></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mexia.com.au/blog/2012/02/22/dtcping-dtctestuseful-toolbox-items/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating TMG Firewall Rules for Azure Service Bus</title>
		<link>http://mexia.com.au/blog/2012/02/19/creating-tmg-firewall-rules-for-azure-service-bus/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=creating-tmg-firewall-rules-for-azure-service-bus</link>
		<comments>http://mexia.com.au/blog/2012/02/19/creating-tmg-firewall-rules-for-azure-service-bus/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 11:36:21 +0000</pubDate>
		<dc:creator>bill</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[TMG]]></category>

		<guid isPermaLink="false">http://mexia.com.au/blog/2012/02/19/creating-tmg-firewall-rules-for-azure-service-bus/</guid>
		<description><![CDATA[As Mexia starts doing more and more Azure work, I am getting asked more frequently about firewall rules for accessing the Azure Service Bus. At first this seemed a weird question to me, to communicate with Azure Service Bus it &#8230; <a href="http://mexia.com.au/blog/2012/02/19/creating-tmg-firewall-rules-for-azure-service-bus/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As Mexia starts doing more and more Azure work, I am getting asked more frequently about firewall rules for accessing the Azure Service Bus.</p>
<p>At first this seemed a weird question to me, to communicate with Azure Service Bus it is all outbound traffic, but more and more companies lately are restricting outbound traffic, for example the default Microsoft Threat Management Gateway (TMG) outbound rule only allow 80 and 443.</p>
<p>So for my own reference and for others that may get asked the same question, here are the steps for create an TMG outbound firewall rule for Azure Service Bus:</p>
<p>In the TMG Management Console under Web Access Policy, we need to define the network object that represents our BizTalk or Windows Server that needs to access SB</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb.png" width="242" height="244"></a></p>
<p>We also need to create a Protocol rule that defines that SB Traffic, TCP 9350 to 9354</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image1.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb1.png" width="244" height="191"></a></p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image2.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb2.png" width="244" height="194"></a></p>
<p>We then need to create the Web Access Policy for Azure ServiceBus</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image3.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb3.png" width="223" height="244"></a></p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image4.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb4.png" width="213" height="244"></a></p>
<p>Protocols HTTP, HTTPS and the ServiceBus Protocols we defined earlier</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image5.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb5.png" width="212" height="244"></a></p>
<p>The Source of the Traffic we defined earlier</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image6.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb6.png" width="213" height="244"></a></p>
<p>The destination of the traffic, in our case the external interface on our TMG Server</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image7.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb7.png" width="211" height="244"></a></p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image8.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb8.png" width="211" height="244"></a></p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image9.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb9.png" width="212" height="244"></a></p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image10.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb10.png" width="212" height="244"></a></p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image11.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb11.png" width="213" height="244"></a></p>
<p>Once the Web Access Policy is created you will have to activate the change to the TMG Server</p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image12.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb12.png" width="244" height="67"></a></p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image13.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb13.png" width="244" height="123"></a></p>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2012/02/image14.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2012/02/image_thumb14.png" width="244" height="161"></a></p>
<p>The new Web Access Policy is now active, you BizTalk or Windows Server will now have access to the Azure Service Bus</p>
]]></content:encoded>
			<wfw:commentRss>http://mexia.com.au/blog/2012/02/19/creating-tmg-firewall-rules-for-azure-service-bus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCF Extensibility: IEndpointBehavior implementation Gotcha</title>
		<link>http://mexia.com.au/blog/2012/01/31/wcf-extensibility-iendpointbehavior-implementation-gotcha/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wcf-extensibility-iendpointbehavior-implementation-gotcha</link>
		<comments>http://mexia.com.au/blog/2012/01/31/wcf-extensibility-iendpointbehavior-implementation-gotcha/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 04:53:40 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Mexia]]></category>
		<category><![CDATA[IEndPointBehavior]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Wsdl]]></category>

		<guid isPermaLink="false">http://mexia.com.au/blog/2012/01/31/wcf-extensibility-iendpointbehavior-implementation-gotcha/</guid>
		<description><![CDATA[I feel like an utter amateur for falling down on this one but I am providing my story here in case anyone else out there is pulling their hair out for the same reasons. I was keen to modify the &#8230; <a href="http://mexia.com.au/blog/2012/01/31/wcf-extensibility-iendpointbehavior-implementation-gotcha/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p align="justify"><font size="2">I feel like an utter amateur for falling down on this one but I am providing my story here in case anyone else out there is pulling their hair out for the same reasons.</font></p>
<p align="justify"><font size="2">I was keen to modify the exported wsdl on a WCF service and checked out the many articles out there in the ether to fast-track my efforts.&nbsp; I managed to build a simple HelloWorld service (with client console) and added in the plumbing to implement both IWsdlExportExtension and (in my case), IEndPointBehaviour.</font></p>
<p align="justify"><font size="2">After I felt I had everything in place and (seemingly) configured correctly I tested the service by browsing to it and visually checking the wsdl – no, my modified wsdl wasn&#8217;t showing.&nbsp; No errors, just no change in the service description.</font></p>
<p align="justify"><font size="2">I put traces in each of the IWsdlExportExtension and IEndPointBehaviour methods and when I&#8217;d hit the service, nothing was coming out in the trace &#8211; again, no errors, no output and no change in the wsdl.&nbsp; Frustration Plus.</font></p>
<p align="justify"><font size="2">I thought I&#8217;d change tack and get my worker class to implement IServiceExtension instead (just to see some kind of change in behaviour).&nbsp; I modified the configuration appropriately and this time saw that each of my IServiceExtension methods were getting hit&#8230;something was happening!</font></p>
<p align="justify"><font size="2">After the umpteenth magnifying-glass-close scrutiny of my service web.config (and after combing over an excellent blog by <a href="http://blogs.msdn.com/b/carlosfigueira/archive/2011/04/05/wcf-extensibility-iendpointbehavior.aspx" target="_blank">Carlos Figueira</a>) I noticed a discrepancy &#8211; the &#8220;name&#8221; attribute of my &#8220;service&#8221; node included the service namespace but the name was slightly off &#8211; &#8220;HelloWorld&#8221; instead of &#8220;HelloWorldService&#8221; in this case.&nbsp; No match on name, no pointing to the behaviour I had configured!!!&nbsp; I made the change and voila &#8211; everything worked &#8211; methods getting hit, wsdl getting modified and emitted as expected.</font></p>
<p><font size="2">I&#8217;ve included my web.config snippet below.</font></p>
<p>&nbsp;
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">system.serviceModel</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">extensions</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">behaviorExtensions</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">add</font></span><span style="font-family:;color:"><font color="#0000ff"> </font></span><span style="font-family:;color:"><font color="#ff0000">name</font></span><span style="font-family:;color:"><font color="#0000ff">=</font></span></font><span style="font-family:"><font>&#8220;<span style="color:"><font color="#0000ff">simpleBehavior</font></span>&#8220;<span style="color:"><font color="#0000ff"> </font></span><span style="color:"><font color="#ff0000">type</font></span><span style="color:"><font color="#0000ff">=</font></span>&#8220;<span style="color:"><font color="#0000ff">Mexia.Framework.TestService.SimpleEndPointBehaviour, Mexia.Framework.TestService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</font></span>&#8220;</font><span style="color:"><font color="#0000ff"> /&gt;</font></span></span></font></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;/</font></font></span><font><span style="font-family:;color:"><font color="#a31515">behaviorExtensions</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp; </font></span><font>&lt;/</font></font></span><font><span style="font-family:;color:"><font color="#a31515">extensions</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">behaviors</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family:"><font face="Consolas"><font>&nbsp;</font></font></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">endpointBehaviors</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font><span>&nbsp;&nbsp; </span>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">behavior</font></span><span style="font-family:;color:"><font color="#0000ff"> </font></span><span style="font-family:;color:"><font color="#ff0000">name</font></span><span style="font-family:;color:"><font color="#0000ff">=</font></span></font><span style="font-family:"><font>&#8220;<span style="color:"><font color="#0000ff">simpleServiceBehaviour</font></span>&#8220;</font><span style="color:"><font color="#0000ff">&gt;</font></span></span></font></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">simpleBehavior</font></span></font><span style="font-family:;color:"><font color="#0000ff"> /&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;/</font></font></span><font><span style="font-family:;color:"><font color="#a31515">behavior</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;/</font></font></span><font><span style="font-family:;color:"><font color="#a31515">endpointBehaviors</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family:"><font face="Consolas"><font>&nbsp;</font></font></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">serviceBehaviors</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">behavior</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">serviceMetadata</font></span><span style="font-family:;color:"><font color="#0000ff"> </font></span><span style="font-family:;color:"><font color="#ff0000">httpGetEnabled</font></span><span style="font-family:;color:"><font color="#0000ff">=</font></span></font><span style="font-family:"><font>&#8220;<span style="color:"><font color="#0000ff">true</font></span>&#8220;</font><span style="color:"><font color="#0000ff">/&gt;</font></span></span></font></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">serviceDebug</font></span><span style="font-family:;color:"><font color="#0000ff"> </font></span><span style="font-family:;color:"><font color="#ff0000">includeExceptionDetailInFaults</font></span><span style="font-family:;color:"><font color="#0000ff">=</font></span></font><span style="font-family:"><font>&#8220;<span style="color:"><font color="#0000ff">true</font></span>&#8220;</font><span style="color:"><font color="#0000ff">/&gt;</font></span></span></font></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;/</font></font></span><font><span style="font-family:;color:"><font color="#a31515">behavior</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;/</font></font></span><font><span style="font-family:;color:"><font color="#a31515">serviceBehaviors</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family:;color:"><span><font face="Consolas"><font color="#0000ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></font></span></span><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp; </font></span><font>&lt;/</font></font></span><font><span style="font-family:;color:"><font color="#a31515">behaviors</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">services</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">service</font></span><span style="font-family:;color:"><font color="#0000ff"> </font></span><span style="font-family:;color:"><font color="#ff0000">name</font></span><span style="font-family:;color:"><font color="#0000ff">=</font></span></font><span style="font-family:"><font>&#8220;<span style="color:"><font color="#0000ff">Mexia.Framework.TestService.HelloWorldService</font></span>&#8220;</font><span style="color:"><font color="#0000ff">&gt;</font></span></span></font></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">endpoint</font></span><span style="font-family:;color:"><font color="#0000ff"> </font></span><span style="font-family:;color:"><font color="#ff0000">address</font></span><span style="font-family:;color:"><font color="#0000ff">=</font></span></font><span style="font-family:"><font>&#8220;&#8221;<span style="color:"><font color="#0000ff"> </font></span><span style="color:"><font color="#ff0000">binding</font></span><span style="color:"><font color="#0000ff">=</font></span>&#8220;<span style="color:"><font color="#0000ff">basicHttpBinding</font></span>&#8220;<span style="color:"><font color="#0000ff"> </font></span><span style="color:"><font color="#ff0000">contract</font></span><span style="color:"><font color="#0000ff">=</font></span>&#8220;<span style="color:"><font color="#0000ff">Mexia.Framework.TestService.IHelloWorldService</font></span>&#8220;<span style="color:"><font color="#0000ff"> </font></span><span style="color:"><font color="#ff0000">behaviorConfiguration</font></span><span style="color:"><font color="#0000ff">=</font></span>&#8220;<span style="color:"><font color="#0000ff">simpleServiceBehaviour</font></span>&#8220;</font><span style="color:"><font color="#0000ff"> /&gt;</font></span></span></font></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">endpoint</font></span><span style="font-family:;color:"><font color="#0000ff"> </font></span><span style="font-family:;color:"><font color="#ff0000">address</font></span><span style="font-family:;color:"><font color="#0000ff">=</font></span></font><span style="font-family:"><font>&#8220;<span style="color:"><font color="#0000ff">mex</font></span>&#8220;<span style="color:"><font color="#0000ff"> </font></span><span style="color:"><font color="#ff0000">binding</font></span><span style="color:"><font color="#0000ff">=</font></span>&#8220;<span style="color:"><font color="#0000ff">mexHttpBinding</font></span>&#8220;<span style="color:"><font color="#0000ff"> </font></span><span style="color:"><font color="#ff0000">contract</font></span><span style="color:"><font color="#0000ff">=</font></span>&#8220;<span style="color:"><font color="#0000ff">IMetadataExchange</font></span>&#8220;</font><span style="color:"><font color="#0000ff"> /&gt;</font></span></span></font></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font>&lt;/</font></font></span><font><span style="font-family:;color:"><font color="#a31515">service</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp; </font></span><font>&lt;/</font></font></span><font><span style="font-family:;color:"><font color="#a31515">services</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font><span style="font-family:"></span></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp;&nbsp;&nbsp; </font></span><font>&lt;</font></font></span><font><span style="font-family:;color:"><font color="#a31515">serviceHostingEnvironment</font></span><span style="font-family:;color:"><font color="#0000ff"> </font></span><span style="font-family:;color:"><font color="#ff0000">multipleSiteBindingsEnabled</font></span><span style="font-family:;color:"><font color="#0000ff">=</font></span></font><span style="font-family:"><font>&#8220;<span style="color:"><font color="#0000ff">true</font></span>&#8220;</font><span style="color:"><font color="#0000ff"> /&gt;</font></span></span></font></p>
<p style="padding-bottom: 0px;line-height: normal;margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Consolas"><span style="font-family:;color:"><font color="#0000ff"><span><font>&nbsp; </font></span><font>&lt;/</font></font></span><font><span style="font-family:;color:"><font color="#a31515">system.serviceModel</font></span></font><span style="font-family:;color:"><font color="#0000ff">&gt;</font></span></font></p>
<p style="padding-bottom: 0px;line-height: 13pt;margin: 0cm 0cm 10pt" class="MsoNormal"><span style="line-height: 9pt"><font face="Calibri"><font>&nbsp;</font></font></span></p>
<p><font size="2">Also for some excellent references on WCF extensibility check out some of Carlos&#8217; blogs:</font></p>
<p><a href="http://blogs.msdn.com/b/carlosfigueira/archive/2011/10/06/wcf-extensibility-wsdl-export-extension.aspx">http://blogs.msdn.com/b/carlosfigueira/archive/2011/10/06/wcf-extensibility-wsdl-export-extension.aspx</a><br /><a href="http://blogs.msdn.com/b/carlosfigueira/archive/2011/04/05/wcf-extensibility-iendpointbehavior.aspx" target="_blank">http://blogs.msdn.com/b/carlosfigueira/archive/2011/04/05/wcf-extensibility-iendpointbehavior.aspx</a></p>
<p><font size="2">Hope this helps!</font></p>
<p><font size="2">Matt Warwick</font></p>
]]></content:encoded>
			<wfw:commentRss>http://mexia.com.au/blog/2012/01/31/wcf-extensibility-iendpointbehavior-implementation-gotcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customising a BAM Tracking Profile</title>
		<link>http://mexia.com.au/blog/2011/12/18/customising-a-bam-tracking-profile-2/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=customising-a-bam-tracking-profile-2</link>
		<comments>http://mexia.com.au/blog/2011/12/18/customising-a-bam-tracking-profile-2/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 23:42:09 +0000</pubDate>
		<dc:creator>Dan Toomey</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[BAM]]></category>
		<category><![CDATA[TPE]]></category>

		<guid isPermaLink="false">http://mexia.com.au/blog/?p=224</guid>
		<description><![CDATA[Anyone who has used the Tracking Profile Editor (TPE) in BizTalk to map field values to their BAM activity definitions knows how simple and easy the interface is to use. You simply right-click on the orchestration shape that sends or &#8230; <a href="http://mexia.com.au/blog/2011/12/18/customising-a-bam-tracking-profile-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Anyone who has used the Tracking Profile Editor (TPE) in BizTalk to map field values to their BAM activity definitions knows how simple and easy the interface is to use. You simply right-click on the orchestration shape that sends or receives the message, select &#8220;Message payload…&#8221; to see the schema for the message, and then click &amp; drag the schema node onto the activity property that you want to assign the node value to:</p>
<p><img src="http://mexia.com.au/blog/wp-content/uploads/2011/12/121811_2341_Customising1.png" alt="" /></p>
<p>Easy, right?  Of course. But unfortunately, like most things in life, the trade-off of simplicity is some significant limitation in functionality and/or flexibility.</p>
<p>In the example case above, the &#8220;B2GResponse&#8221; record is a repeating element in the schema (maxOccurs=&#8221;unbounded&#8221;).  While the TPE will very happily let you save and deploy the tracking profile, you will discover that a record with multiple &#8220;B2GResponse&#8221; nodes incurs a runtime error, as evidenced by this event log entry:</p>
<p><img src="http://mexia.com.au/blog/wp-content/uploads/2011/12/121811_2341_Customising2.png" alt="" /></p>
<p>The &#8220;AmbiguousXPathException&#8221; thrown states &#8220;The result set for the XPath expression &#8216;<em>&lt;xpath expression for the target &#8220;PpsrBatchId&#8221; node&gt;</em>&#8216; contains more than a single node.&#8221;</p>
<p>Moreover, the actual node value is never recorded, even though BAM does (very politely) create the record despite the error (it just inserts NULL into the &#8220;PpsrBatchID&#8221; field):</p>
<p><img src="http://mexia.com.au/blog/wp-content/uploads/2011/12/121811_2341_Customising3.png" alt="" /></p>
<p>Essentially the XLANG engine cannot map a repeating value to a single column in the BAM activity table. Makes sense, right? Even though we know in this case that &#8220;PpsrBatchID&#8221; node will contain the same value from every record, we can&#8217;t expect the BAM runtime to infer this for us. What <em>would</em> be nice is if the interface allowed you to specify a specific index for the node from which to draw the value from; it doesn&#8217;t (<em>simplicity vs. functionality</em>).</p>
<p>One obvious solution would be to re-design the message schema and elevate the &#8220;PpsrBatchId&#8221; value to a single node occurrence at the message level. However, we don&#8217;t always have this option to customise messages.</p>
<p>It doesn&#8217;t have to end here, though. Often the limitations offered with a simple GUI tool can be overcome by looking at what&#8217;s under the covers. In this case, with a little bit of &#8220;hacking&#8221;, we can manipulate BAM to parse the value out of a specific instance of a repeating field.</p>
<p>First we have to understand what the TPE does. When you save a tracking profile, it creates an XML file with a &#8220;*.btt&#8221; extension. This can then be deployed either through the TPE GUI or by the <strong>BTTDeploy</strong> command line tool:</p>
<p><span style="font-family: Courier New;font-size: 8pt">&#8220;%BTSINSTALLPATH%tracking\bttdeploy.exe&#8221; &#8220;.\ ProcessRegistrationsResponse.v0.2.btt&#8221;<br />
</span></p>
<p>If we inspect the *.btt XML file, we can easily divine its structure:</p>
<p style="text-align: center"><img src="http://mexia.com.au/blog/wp-content/uploads/2011/12/121811_2341_Customising4.png" alt="" /></p>
<p>Essentially, we see a &#8220;Dimension&#8221; element for each BAM activity field with a &#8220;DataLevel&#8221; sub-element that defines the source of the data. In the case of example TPE above:</p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt">&lt;?<span style="color: #a31515">xml<span style="color: blue"><br />
<span style="color: red">version<span style="color: blue">=</span>&#8220;<span style="color: blue">1.0</span>&#8220;<span style="color: blue"><br />
<span style="color: red">encoding<span style="color: blue">=</span>&#8220;<span style="color: blue">utf-16</span>&#8220;<span style="color: blue">?&gt;</span><br />
</span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt">&lt;<span style="color: #a31515">TrackingProfile<span style="color: blue"><br />
<span style="color: red">xmlns:xsi<span style="color: blue">=</span>&#8220;<span style="color: blue">http://www.w3.org/2001/XMLSchema-instance</span>&#8220;<span style="color: blue"><br />
<span style="color: red">xmlns:xsd<span style="color: blue">=</span>&#8220;<span style="color: blue">http://www.w3.org/2001/XMLSchema</span>&#8220;<span style="color: blue"><br />
<span style="color: red">VersionGuid<span style="color: blue">=</span>&#8220;<span style="color: blue">00000000-0000-0000-0000-000000000000</span>&#8220;<span style="color: blue"><br />
<span style="color: red">Name<span style="color: blue">=</span>&#8220;<span style="color: blue">ProcessRegistrationsResponse</span>&#8220;<span style="color: blue">&gt;</span><br />
</span></span></span></span></span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;<span style="color: #a31515">Dimension<span style="color: blue"><br />
<span style="color: red">Name<span style="color: blue">=</span>&#8220;<span style="color: blue">ActivityID</span>&#8220;<span style="color: blue"><br />
<span style="color: red">DataType<span style="color: blue">=</span>&#8220;<span style="color: blue">TraceID</span>&#8220;<span style="color: blue"> /&gt;</span><br />
</span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;<span style="color: #a31515">Dimension<span style="color: blue"><br />
<span style="color: red">Name<span style="color: blue">=</span>&#8220;<span style="color: blue">StartTime</span>&#8220;<span style="color: blue"><br />
<span style="color: red">DataType<span style="color: blue">=</span>&#8220;<span style="color: blue">DATETIME</span>&#8220;<span style="color: blue">&gt;</span><br />
</span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;<span style="color: #a31515">DataLevel<span style="color: blue"><br />
<span style="color: red">Name<span style="color: blue">=</span>&#8220;<span style="color: blue">Rcv_RegistrationsResponseMsg</span>&#8220;<span style="color: blue"><br />
<span style="color: red">SourceTypeSelected<span style="color: blue">=</span>&#8220;<span style="color: blue">Orchestration Shape</span>&#8220;<span style="color: blue"><br />
<span style="color: red">TargetAssemblyName<span style="color: blue">=</span>&#8220;<span style="color: blue">MyClient.Ppsr.Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d9cf9d5c9f7e687e</span>&#8220;<span style="color: blue"><br />
<span style="color: red">OrchestrationReference<span style="color: blue">=</span>&#8220;<span style="color: blue">MyClient.Ppsr.Orchestrations.ProcessRegistrationsResponse</span>&#8220;<span style="color: blue"><br />
<span style="color: red">ShapeID<span style="color: blue">=</span>&#8220;<span style="color: blue">5121a798-8e5d-4cc5-b0b7-ae68ece3992d</span>&#8220;<span style="color: blue"> /&gt;</span><br />
</span></span></span></span></span></span></span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;/<span style="color: #a31515">Dimension<span style="color: blue">&gt;</span><br />
</span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;<span style="color: #a31515">Dimension<span style="color: blue"><br />
<span style="color: red">Name<span style="color: blue">=</span>&#8220;<span style="color: blue">EndTime</span>&#8220;<span style="color: blue"><br />
<span style="color: red">DataType<span style="color: blue">=</span>&#8220;<span style="color: blue">DATETIME</span>&#8220;<span style="color: blue">&gt;</span><br />
</span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;<span style="color: #a31515">DataLevel<span style="color: blue"><br />
<span style="color: red">Name<span style="color: blue">=</span>&#8220;<span style="color: blue">TRACE</span>&#8220;<span style="color: blue"><br />
<span style="color: red">SourceTypeSelected<span style="color: blue">=</span>&#8220;<span style="color: blue">Orchestration Shape</span>&#8220;<span style="color: blue"><br />
<span style="color: red">TargetAssemblyName<span style="color: blue">=</span>&#8220;<span style="color: blue">MyClient.Ppsr.Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d9cf9d5c9f7e687e</span>&#8220;<span style="color: blue"><br />
<span style="color: red">OrchestrationReference<span style="color: blue">=</span>&#8220;<span style="color: blue">MyClient.Ppsr.Orchestrations.ProcessRegistrationsResponse</span>&#8220;<span style="color: blue"><br />
<span style="color: red">ShapeID<span style="color: blue">=</span>&#8220;<span style="color: blue">e1f75b0c-dfc4-4adb-b806-beab9156a04b</span>&#8220;<span style="color: blue"> /&gt;</span><br />
</span></span></span></span></span></span></span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;/<span style="color: #a31515">Dimension<span style="color: blue">&gt;</span><br />
</span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;<span style="color: #a31515">Dimension<span style="color: blue"><br />
<span style="color: red">Name<span style="color: blue">=</span>&#8220;<span style="color: blue">PpsrBatchID</span>&#8220;<span style="color: blue"><br />
<span style="color: red">DataType<span style="color: blue">=</span>&#8220;<span style="color: blue">NVARCHAR</span>&#8220;<span style="color: blue">&gt;</span><br />
</span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;<span style="color: #a31515">DataLevel<span style="color: blue"><br />
<span style="color: red">Name<span style="color: blue">=</span>&#8220;<span style="color: blue">PpsrBatchID</span>&#8220;<span style="color: blue"><br />
<span style="color: red">SourceTypeSelected<span style="color: blue">=</span>&#8220;<span style="color: blue">Orchestration Payload</span>&#8220;<span style="color: blue"><br />
<span style="color: red">TargetAssemblyName<span style="color: blue">=</span>&#8220;<span style="color: blue">MyClient.Ppsr.Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d9cf9d5c9f7e687e</span>&#8220;<span style="color: blue"><br />
<span style="color: red">OrchestrationReference<span style="color: blue">=</span>&#8220;<span style="color: blue">MyClient.Ppsr.Orchestrations.ProcessRegistrationsResponse</span>&#8220;<span style="color: blue"><br />
<span style="color: red">ShapeID<span style="color: blue">=</span>&#8220;<span style="color: blue">67801549-63ff-4db0-affa-abed2e387b22</span>&#8220;<span style="color: blue"><br />
<span style="color: red">MessageName<span style="color: blue">=</span>&#8220;<span style="color: blue">msgB2GResponsesIN</span>&#8220;<span style="color: blue"><br />
<span style="color: red">MessagePart<span style="color: blue">=</span>&#8220;<span style="color: blue">responses</span>&#8220;<span style="color: blue"><br />
<span style="color: red">SchemaName<span style="color: blue">=</span>&#8220;<span style="color: blue">MyClient.Ppsr.Schemas.Internal.PpsrDB.Veda.TableOperation_dbo_B2GResponse+Insert</span>&#8220;<span style="color: blue"><br />
<span style="color: red">MessageDirection<span style="color: blue">=</span>&#8220;<span style="color: blue">Out</span>&#8220;<span style="color: blue"><br />
<span style="color: red"><span style="background-color: yellow">SomXPath<span style="color: blue">=</span>&#8220;<span style="color: blue">/*[local-name()='<span style="color: red">&amp;lt;<span style="color: blue">Schema<span style="color: red">&amp;gt;<span style="color: blue">' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/B2GResponse']/*[local-name()='Insert' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/B2GResponse']/*[local-name()='Rows' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/B2GResponse']/*[local-name()='B2GResponse' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/Types/Tables/dbo']/*[local-name()='PpsrBatchID' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/Types/Tables/dbo']</span>&#8220;<span style="color: blue"><br />
<span style="color: red">XPath<span style="color: blue">=</span>&#8220;<span style="color: blue">/*[local-name()='Insert' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/B2GResponse']/*[local-name()='Rows' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/B2GResponse']/*[local-name()='B2GResponse' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/Types/Tables/dbo']/*[local-name()='PpsrBatchID' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/Types/Tables/dbo']</span>&#8220;</span></span></span></span></span></span></span><span style="color: blue"> /&gt;</span><br />
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;/<span style="color: #a31515">Dimension<span style="color: blue">&gt;</span><br />
</span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;<span style="color: #a31515">Dimension<span style="color: blue"><br />
<span style="color: red">Name<span style="color: blue">=</span>&#8220;<span style="color: blue">TableInsertRequestSent</span>&#8220;<span style="color: blue"><br />
<span style="color: red">DataType<span style="color: blue">=</span>&#8220;<span style="color: blue">DATETIME</span>&#8220;<span style="color: blue">&gt;</span><br />
</span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;<span style="color: #a31515">DataLevel<span style="color: blue"><br />
<span style="color: red">Name<span style="color: blue">=</span>&#8220;<span style="color: blue">Snd_InsertResponseSQL</span>&#8220;<span style="color: blue"><br />
<span style="color: red">SourceTypeSelected<span style="color: blue">=</span>&#8220;<span style="color: blue">Orchestration Shape</span>&#8220;<span style="color: blue"><br />
<span style="color: red">TargetAssemblyName<span style="color: blue">=</span>&#8220;<span style="color: blue">MyClient.Ppsr.Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d9cf9d5c9f7e687e</span>&#8220;<span style="color: blue"><br />
<span style="color: red">OrchestrationReference<span style="color: blue">=</span>&#8220;<span style="color: blue">MyClient.Ppsr.Orchestrations.ProcessRegistrationsResponse</span>&#8220;<span style="color: blue"><br />
<span style="color: red">ShapeID<span style="color: blue">=</span>&#8220;<span style="color: blue">67801549-63ff-4db0-affa-abed2e387b22</span>&#8220;<span style="color: blue"> /&gt;</span><br />
</span></span></span></span></span></span></span></span></span></span></span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt"> &lt;/<span style="color: #a31515">Dimension<span style="color: blue">&gt;</span><br />
</span></span></p>
<p><span style="color: blue;font-family: Consolas;font-size: 8pt">&lt;/<span style="color: #a31515">TrackingProfile<span style="color: blue">&gt;<br />
</span></span></span></p>
<p>Notice the <span style="background-color: yellow">highlighted</span> XPath statement that defines where to retrieve the data from for the &#8220;PpsrBatchId&#8221; field. Here we have the opportunity to manually edit the XPath, instructing BAM that we only want the first record instance by using the XPath &#8220;position()&#8221; function:</p>
<p><span style="font-family: Consolas;font-size: 8pt">&#8220;<span style="color: blue">/*[local-name()='<span style="color: red">&amp;lt;<span style="color: blue">Schema<span style="color: red">&amp;gt;<span style="color: blue">' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/B2GResponse']/*[<br />
...<br />
/*[local-name()='B2GResponse' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/Types/Tables/dbo' <span style="background-color: yellow">and position()=1]</span>/*[local-name()='PpsrBatchID' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/Types/Tables/dbo']</span>&#8220;<span style="color: blue"><br />
</span></span></span></span></span></span></p>
<p>Now we can save &amp; deploy the BTT file, and the next time we run the process…</p>
<p><img src="http://mexia.com.au/blog/wp-content/uploads/2011/12/121811_2341_Customising5.png" alt="" /></p>
<p>Bingo! We can now see the value entered in the table.</p>
<p><strong>Lesson learned:</strong> when the simplicity of a GUI tool restricts your ability to do something slightly more advanced, it pays to dive under the covers and see what really makes it work. You&#8217;ll often be rewarded with the ability to customise the behaviour.</p>
]]></content:encoded>
			<wfw:commentRss>http://mexia.com.au/blog/2011/12/18/customising-a-bam-tracking-profile-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BizTalk Server 2010 R2 is part of Microsoft&#8217;s overall Azure Integration Strategy</title>
		<link>http://mexia.com.au/blog/2011/12/09/biztalk-server-2010-r2-is-part-of-microsofts-overall-cloud-integration-strategy/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=biztalk-server-2010-r2-is-part-of-microsofts-overall-cloud-integration-strategy</link>
		<comments>http://mexia.com.au/blog/2011/12/09/biztalk-server-2010-r2-is-part-of-microsofts-overall-cloud-integration-strategy/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 01:49:54 +0000</pubDate>
		<dc:creator>Dean Robertson</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[Window Server AppFabric]]></category>
		<category><![CDATA[Windows Azure AppFabric]]></category>

		<guid isPermaLink="false">http://mexia.com.au/blog/2011/12/09/biztalk-server-2010-r2-is-part-of-microsofts-overall-cloud-integration-strategy/</guid>
		<description><![CDATA[It’s finally here folks! After much hand-wringing in the community over the future of BizTalk Server, Microsoft have continued their commitment to their premier on-premises integration platform and announced the release of BizTalk Server 2010 R2. &#160; The main areas &#8230; <a href="http://mexia.com.au/blog/2011/12/09/biztalk-server-2010-r2-is-part-of-microsofts-overall-cloud-integration-strategy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><font size="2">It’s finally here folks! After much hand-wringing in the community over the future of BizTalk Server, Microsoft have continued their commitment to their premier on-premises integration platform and announced the release of <a href="http://blogs.msdn.com/b/biztalk_server_team_blog/archive/2011/12/08/biztalk-server-2010-r2.aspx">BizTalk Server 2010 R2</a></font><font size="2"></font><font size="2">.</font></p>
<p><font size="2"></font>&nbsp;</p>
<p><font size="2">The main areas of improvement are:</font></p>
<p><font size="2">&nbsp; 1.&nbsp; Platform Support for <strong>Windows Server 8</strong>, <strong>SQL Server 2012 </strong>and <strong>Visual Studio 2011</strong>.</font></p>
<p><font size="2">&nbsp; 2.&nbsp; Improvements to the <strong>accelerator packs</strong> for <strong>HL7</strong>, <strong>HIPPA</strong> and <strong>SWIFT</strong></font></p>
<p><font size="2">&nbsp; 3.&nbsp; Better <strong>adapter</strong> connectivity for <strong>DB2</strong> and <strong>IBM</strong> systems</font></p>
<p><font size="2">&nbsp; 4.&nbsp; <strong>Performance</strong> improvements for <strong>batch processing</strong>, <strong>ordered send ports</strong> and scale-out <strong>host configurations</strong>.</font></p>
<p><font size="2">&nbsp; 5.&nbsp; Even tighter integration with the <strong>Windows</strong> <strong>Azure ServiceBus</strong> for cloud-scale integration solutions.</font></p>
<p><font size="2">&nbsp; 6.&nbsp; Changes to the licencing model to allow <strong>cloud-based hosting</strong> from a SPLA partner.</font></p>
<p><font size="2"></font>&nbsp;</p>
<p><font size="2">Fundamentally these aren’t big changes to the overall BizTalk Server platform, but it demonstrates an on-going commitment by Microsoft to on-premises integration solutions for customers that can’t (or wont) move their systems to the cloud in the future.</font></p>
<p><font size="2">Further, by ensuring that BizTalk Server is 100% compatible with the Windows Azure ServiceBus (using the Azure relay &amp; messaging bindings with the WCF adapter), Microsoft are positioning themselves really well for any combination of the following solutions:</font></p>
<ul>
<li>
<div align="left"><font size="2" face="Arial"><em><strong>Pure On-premises Integration</strong></em></font></div>
</li>
<ul>
<li>
<div align="left"><font size="2" face="Arial">BizTalk Server</font></div>
</li>
<li>
<div align="left"><font size="2" face="Arial">Windows Server AppFabric</font></div>
</li>
</ul>
</ul>
<ul>
<li>
<div align="left"><font size="2" face="Arial"><em><strong>Hybrid Integration</strong></em></font></div>
</li>
<ul>
<li>
<div align="left"><font size="2" face="Arial">BizTalk Server</font></div>
</li>
<li>
<div align="left"><font size="2" face="Arial">Windows Server AppFabric</font></div>
</li>
<li>
<div align="left"><font size="2" face="Arial">Windows Azure AppFabric</font></div>
</li>
</ul>
</ul>
<ul>
<li>
<div align="left"><font size="2" face="Arial"><em><strong>Pure Cloud-based Integration</strong></em></font></div>
</li>
<ul>
<li>
<div align="left"><font size="2" face="Arial">Windows Azure AppFabric</font></div>
</li>
</ul>
</ul>
<p><font size="2">I think this is a really smart strategy by Microsoft, and those integration consultancies who play in this space would be wise to maintain their on-premises BizTalk expertise so they can deliver all three types of solutions to their customers.</font></p>
<p><font size="2">I know we are.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://mexia.com.au/blog/2011/12/09/biztalk-server-2010-r2-is-part-of-microsofts-overall-cloud-integration-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do you know about the Windows Azure Discovery Pack?</title>
		<link>http://mexia.com.au/blog/2011/12/06/do-you-know-about-the-windows-azure-discovery-pack/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=do-you-know-about-the-windows-azure-discovery-pack</link>
		<comments>http://mexia.com.au/blog/2011/12/06/do-you-know-about-the-windows-azure-discovery-pack/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 01:20:58 +0000</pubDate>
		<dc:creator>Dean Robertson</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Mexia]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Windows Azure AppFabric]]></category>

		<guid isPermaLink="false">http://mexia.com.au/blog/2011/12/06/do-you-know-about-the-windows-azure-discovery-pack/</guid>
		<description><![CDATA[Mexia are currently deep-diving on the Windows Azure platform because, like Microsoft, we are “all in” with the cloud. We know that the future of system integration will involve the cloud in one way or the other, and as integration &#8230; <a href="http://mexia.com.au/blog/2011/12/06/do-you-know-about-the-windows-azure-discovery-pack/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><font size="2">Mexia are currently deep-diving on the Windows Azure platform because, like Microsoft, we are “all in” with the cloud.</font>
<p><font size="2">We know that the future of system integration will involve the cloud in one way or the other, and as integration specialists working with corporate &amp; government clients, building <strong>Hybrid Integration Platforms</strong> using both Windows Azure AppFabric Middleware AND BizTalk Server is now our <em>raison d&#8217;être</em>.</font>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2011/12/image17.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2011/12/image17_thumb.png" width="322" height="83"></a>
<p><font size="2">However explaining the cloud to our customers has not been as easy as our decision to follow Microsoft into the cloud.</font>
<p><font size="2">Interestingly, we’re finding that the main pushback <u>isn’t</u> technical because they generally already <u>know</u> that the cloud gives them immediate agility, better server utilisation and a managed infrastructure service.</font>
<p><font size="2">The main resistance points that we’ve had are:</font>
<p><font size="2">&nbsp;&nbsp;&nbsp; 1.&nbsp; Perception of unquantifiable risks (information security, service uptime etc), which is tackled <a href="http://www.microsoft.com/windowsazure/Whitepapers/securityoverview/">here</a>.</font>
<p><font size="2">&nbsp;&nbsp;&nbsp; 2.&nbsp; Real unwillingness to uproot their business’ IT systems while everything is stable, which is tackled <a href="http://www.microsoft.com/windowsazure/scenarios/">here</a>.</font>
<p><font size="2">&nbsp;&nbsp;&nbsp; 3.&nbsp; Perception of unpredictable costs, which is tackled <a href="http://www.microsoft.com/windowsazure/offers/">here</a>.</font>
<p><font size="2">The third &amp; final resistance point is an interesting one, mainly because </font><font size="2">I genuinely think some of our customers genuinely LIKE buying servers and having control over their environments.&nbsp; I think this is because provided they can <u>quantify</u> the expense of buying their own infrastructure (however high it is), and as long as they are still making money, why turn everything upside down and change the way they do things?</font>
<p><font size="2">This is clearly bonkers, h</font><font size="2">owever, it’s one of the resistance points we face and we have to know how to deal with it.</font>
<p><font size="2">Enter stage left the <a href="http://www.microsoft.com/windowsazure/discoverypack/">Windows Azure Discovery Pack</a>!</font>
<p><a href="http://mexia.com.au/blog/wp-content/uploads/2011/12/image2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mexia.com.au/blog/wp-content/uploads/2011/12/image_thumb2.png" width="407" height="838"></a>
<p><font size="2">As you can see it’s a current promotion by Microsoft that gives you a 6 month block of Azure hours for <u>half-price</u>, plus <u>free training</u>, plus <u>free consulting</u> (from Mexia or your preferred Windows Azure partner).</font>
<p><font size="2">The website also says the offer expires June 30<sup>th</sup> 2012, but Microsoft’s effervescent Azure marketing specialist Margaret Synan explained to me that if you buy a DP before Xmas 2011, you’ll have time to purchase another one before the offer goes away.&nbsp; This means you’ll have effectively locked in the 50% discounted Azure pricing for 12 months!</font>
<p><font size="2"><strong>Talk about a way to quantify your Azure costs.</strong></font>
<p><font size="2">The Discovery Pack is really worth considering if Azure goodness is on your company roadmap for 2012 and you want to control your costs whilst you climb aboard the juggernaut!</font>
<p><font size="2">Get it while it’s hot, and tell them Mexia sent you! <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://mexia.com.au/blog/wp-content/uploads/2011/12/wlEmoticon-smile.png"></font></p>
]]></content:encoded>
			<wfw:commentRss>http://mexia.com.au/blog/2011/12/06/do-you-know-about-the-windows-azure-discovery-pack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Azure BizSpark StartUp Camp</title>
		<link>http://mexia.com.au/blog/2011/11/16/windows-azure-bizspark-startup-camp/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=windows-azure-bizspark-startup-camp</link>
		<comments>http://mexia.com.au/blog/2011/11/16/windows-azure-bizspark-startup-camp/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 06:11:39 +0000</pubDate>
		<dc:creator>Dean Robertson</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Mexia]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Windows Azure AppFabric]]></category>

		<guid isPermaLink="false">http://mexia.com.au/blog/2011/11/16/windows-azure-bizspark-startup-camp/</guid>
		<description><![CDATA[If you’re an aspiring young Queensland company building a cloud-hosted service or product, then you could do far worse than to attend the Windows Azure BizSpark Startup Camp in Brisbane on 2-4th December 2011. Mexia participated in the Melbourne event &#8230; <a href="http://mexia.com.au/blog/2011/11/16/windows-azure-bizspark-startup-camp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><font size="2">If you’re an aspiring young Queensland company building a cloud-hosted service or product, then you could do far worse than to attend the <a href="http://blogs.msdn.com/b/bizspark_au/archive/2011/11/10/windows-azure-bizspark-startup-camp-brisbane.aspx">Windows Azure BizSpark Startup Camp</a> in Brisbane on 2-4th December 2011.</font></p>
<p><font size="2">Mexia participated in the Melbourne event early 2011 and we loved every bit of it.&nbsp; You get free Azure developer training, one-on-one developer mentoring from Azure MVP’s such as </font><a href="http://azure.snagy.name/blog/"><font size="2">Steven Nagy</font></a><font size="2">, and advice on how to commercialise your idea.</font></p>
<p><font size="2">If you’re a Microsoft BizSpark member you can also pitch your idea to a panel of investors &amp; technical gurus, all of whom have real world experience launching technical products into the marketplace.</font></p>
<p><font size="2">It doesn’t get much better considering the price, and I heartily recommend the investment of your time to go along.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://mexia.com.au/blog/2011/11/16/windows-azure-bizspark-startup-camp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

