BizTalkComponents.PipelineComponents.MessageContextCopier
1.0.0
dotnet add package BizTalkComponents.PipelineComponents.MessageContextCopier --version 1.0.0
NuGet\Install-Package BizTalkComponents.PipelineComponents.MessageContextCopier -Version 1.0.0
<PackageReference Include="BizTalkComponents.PipelineComponents.MessageContextCopier" Version="1.0.0" />
paket add BizTalkComponents.PipelineComponents.MessageContextCopier --version 1.0.0
#r "nuget: BizTalkComponents.PipelineComponents.MessageContextCopier, 1.0.0"
// Install BizTalkComponents.PipelineComponents.MessageContextCopier as a Cake Addin #addin nuget:?package=BizTalkComponents.PipelineComponents.MessageContextCopier&version=1.0.0 // Install BizTalkComponents.PipelineComponents.MessageContextCopier as a Cake Tool #tool nuget:?package=BizTalkComponents.PipelineComponents.MessageContextCopier&version=1.0.0
This component copies the message context properties to the received message in BizTalk so they can be retrieved and used in BizTalk Maps. Because of the component's behavior so it should be used at the receiving side, and it is recommended to be the last component in the receive pipeline. The properties and their info would be available as end of the message before closing the root node. The message context would appear in one of the following formats based on the component's settings:
<messagecontext>
<property name="prop1" namespace="http://somenamespace" promoted="false" >some value</property>
</messagecontext>
-- or --
<messagecontext>
<property>
<name>prop1</name>
<namespace>http://somenamespace</namespace>
<promoted>False</promoted>
<value>some value</value>
</property>
</messagecontext>
In the map, the properties can be retrieved using the following C# function:
<msxsl:script language="C#" implements-prefix="CSharp">
<msxsl:assembly name="System.Globalization"/>
<msxsl:using namespace="System.Xml"/>
<![CDATA[
public object ConvertToNode(string value)
{
if(string.IsNullOrEmpty(value))
value = "<messagecontext />";
var doc = new System.Xml.XmlDocument();
doc.LoadXml(value);
var nav = doc.CreateNavigator();
var ret = nav.Select("messagecontext");
return ret;
}
]]>
</msxsl:script>
<xsl:variable name="msgctx" select="CSharp:ConvertToNode(//comment()[starts-with(.,'<messagecontext>')])"/>
<xsl:value-of select="$msgctx/property[@name='prop1' and @namespace='http://somenamespace']/text()"/>
or
<xsl:value-of select="$msgctx/property[name/text()='prop1' and namespace/text()='http://somenamespace']/text()"/>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 1,402 | 4/15/2019 |
Initial release.