Skip to content

Commit 740065f

Browse files
committed
BizTalk Server Recipe: Calling multiple Disassemblers in a Receive pipeline
1 parent e23f643 commit 740065f

25 files changed

+445
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8AFF472A-9CE9-497A-A0F5-83A1B0338163}"
7+
ProjectSection(SolutionItems) = preProject
8+
samples.snk = samples.snk
9+
SharedAssemblyInfo.cs = SharedAssemblyInfo.cs
10+
EndProjectSection
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PipelineComponents", "PipelineComponents\PipelineComponents.csproj", "{7DB93D4C-DF46-4FDA-989B-37E5D41DFD48}"
13+
EndProject
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pipelines", "Pipelines\Pipelines.btproj", "{FC151E4B-B76C-41F1-ACA3-A338E4B60F0D}"
15+
EndProject
16+
Global
17+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
18+
Debug|Any CPU = Debug|Any CPU
19+
Release|Any CPU = Release|Any CPU
20+
EndGlobalSection
21+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
22+
{7DB93D4C-DF46-4FDA-989B-37E5D41DFD48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23+
{7DB93D4C-DF46-4FDA-989B-37E5D41DFD48}.Release|Any CPU.ActiveCfg = Release|Any CPU
24+
{7DB93D4C-DF46-4FDA-989B-37E5D41DFD48}.Release|Any CPU.Build.0 = Release|Any CPU
25+
{FC151E4B-B76C-41F1-ACA3-A338E4B60F0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26+
{FC151E4B-B76C-41F1-ACA3-A338E4B60F0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
27+
{FC151E4B-B76C-41F1-ACA3-A338E4B60F0D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
28+
{FC151E4B-B76C-41F1-ACA3-A338E4B60F0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{FC151E4B-B76C-41F1-ACA3-A338E4B60F0D}.Release|Any CPU.Build.0 = Release|Any CPU
30+
{FC151E4B-B76C-41F1-ACA3-A338E4B60F0D}.Release|Any CPU.Deploy.0 = Release|Any CPU
31+
EndGlobalSection
32+
GlobalSection(SolutionProperties) = preSolution
33+
HideSolutionNode = FALSE
34+
EndGlobalSection
35+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
using Microsoft.BizTalk.Component;
2+
using Microsoft.BizTalk.Component.Interop;
3+
using Microsoft.BizTalk.Message.Interop;
4+
using System;
5+
using System.Collections.Generic;
6+
7+
namespace VirtualGreen.Samples.MultiDisassembler.PipelineComponents
8+
{
9+
[ComponentCategory(CategoryTypes.CATID_PipelineComponent)]
10+
[ComponentCategory(CategoryTypes.CATID_DisassemblingParser)]
11+
[System.Runtime.InteropServices.Guid("12345678-90AB-CDEF-FEDC-BA0987654321")]
12+
public class ExtractingXmlDisassembler : IBaseComponent, IPersistPropertyBag, IComponentUI, IDisassemblerComponent
13+
{
14+
private FFDasmComp ffDasmPC = new FFDasmComp();
15+
private Queue<IBaseMessage> messages = null;
16+
17+
public void Disassemble(IPipelineContext pContext, IBaseMessage pInMsg)
18+
{
19+
SetFFDasmProperties(ffDasmPC);
20+
ffDasmPC.Disassemble(pContext, pInMsg);
21+
}
22+
23+
public IBaseMessage GetNext(IPipelineContext pContext)
24+
{
25+
if (messages == null)
26+
{
27+
messages = new Queue<IBaseMessage>();
28+
IBaseMessage msgS1 = null;
29+
while ((msgS1 = ffDasmPC.GetNext(pContext)) != null)
30+
{
31+
XmlDasmComp xmlDasmPC = new XmlDasmComp();
32+
SetXmlDasmProperties(xmlDasmPC);
33+
xmlDasmPC.Disassemble(pContext, msgS1);
34+
IBaseMessage msgS2 = null;
35+
while ((msgS2 = xmlDasmPC.GetNext(pContext)) != null)
36+
{ messages.Enqueue(msgS2); }
37+
}
38+
}
39+
40+
if (messages.Count > 0)
41+
{ return messages.Dequeue(); }
42+
return null;
43+
}
44+
45+
46+
private void SetXmlDasmProperties(XmlDasmComp pc)
47+
{ pc.AllowUnrecognizedMessage = true; }
48+
49+
private void SetFFDasmProperties(FFDasmComp pc)
50+
{ pc.ValidateDocumentStructure = false; }
51+
52+
#region plumbing
53+
public void GetClassID(out Guid classID)
54+
{ classID = Guid.Parse("12345678-90AB-CDEF-FEDC-BA0987654321"); }
55+
56+
public void InitNew()
57+
{ }
58+
59+
public void Load(IPropertyBag propertyBag, int errorLog)
60+
{ }
61+
62+
public void Save(IPropertyBag propertyBag, bool clearDirty, bool saveAllProperties)
63+
{ }
64+
65+
public IntPtr Icon
66+
{ get { return IntPtr.Zero; } }
67+
68+
public System.Collections.IEnumerator Validate(object projectSystem)
69+
{ return null; }
70+
71+
public string Description
72+
{ get { return "Nothing"; } }
73+
74+
public string Name
75+
{ get { return "ExtractingXmlDisassembler"; } }
76+
77+
public string Version
78+
{ get { return "1.0"; } }
79+
#endregion
80+
}
81+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{7DB93D4C-DF46-4FDA-989B-37E5D41DFD48}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>VirtualGreen.Samples.MultiDisassembler.PipelineComponents</RootNamespace>
11+
<AssemblyName>VirtualGreen.Samples.MultiDisassembler.PipelineComponents</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<PropertyGroup>
33+
<SignAssembly>true</SignAssembly>
34+
</PropertyGroup>
35+
<PropertyGroup>
36+
<AssemblyOriginatorKeyFile>..\samples.snk</AssemblyOriginatorKeyFile>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="Microsoft.BizTalk.Pipeline, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
40+
<SpecificVersion>False</SpecificVersion>
41+
<HintPath>C:\Program Files (x86)\Microsoft BizTalk Server 2013\Microsoft.BizTalk.Pipeline.dll</HintPath>
42+
</Reference>
43+
<Reference Include="Microsoft.BizTalk.Pipeline.Components, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
44+
<SpecificVersion>False</SpecificVersion>
45+
<HintPath>C:\Program Files (x86)\Microsoft BizTalk Server 2013\Pipeline Components\Microsoft.BizTalk.Pipeline.Components.dll</HintPath>
46+
</Reference>
47+
<Reference Include="Microsoft.BizTalk.Streaming, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
48+
<SpecificVersion>False</SpecificVersion>
49+
<HintPath>C:\Program Files (x86)\Microsoft BizTalk Server 2013\Microsoft.BizTalk.Streaming.dll</HintPath>
50+
</Reference>
51+
<Reference Include="System" />
52+
<Reference Include="System.Core" />
53+
<Reference Include="System.Xml.Linq" />
54+
<Reference Include="System.Data.DataSetExtensions" />
55+
<Reference Include="Microsoft.CSharp" />
56+
<Reference Include="System.Data" />
57+
<Reference Include="System.Xml" />
58+
</ItemGroup>
59+
<ItemGroup>
60+
<Compile Include="..\SharedAssemblyInfo.cs">
61+
<Link>SharedAssemblyInfo.cs</Link>
62+
</Compile>
63+
<Compile Include="ExtractingXmlDisassembler.cs" />
64+
<Compile Include="Properties\AssemblyInfo.cs" />
65+
</ItemGroup>
66+
<ItemGroup>
67+
<None Include="..\samples.snk">
68+
<Link>samples.snk</Link>
69+
</None>
70+
</ItemGroup>
71+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
72+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
73+
Other similar extension points exist, see Microsoft.Common.targets.
74+
<Target Name="BeforeBuild">
75+
</Target>
76+
<Target Name="AfterBuild">
77+
</Target>
78+
-->
79+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("VirtualGreen.Samples.MultiDisassembler.PipelineComponents")]
9+
[assembly: AssemblyDescription("")]
10+
//[assembly: AssemblyProduct("VirtualGreen Samples MultiDisassembler")]
11+
//[assembly: AssemblyCopyright("Copyright © 2018")]
12+
//[assembly: AssemblyCompany("")]
13+
[assembly: AssemblyConfiguration("")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("f7d0879e-6a54-4b4a-9525-414f9bd38080")]
24+
25+
//[assembly: AssemblyVersion("1.0.0.0")]
26+
//[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
P:\pjv.virtualgreen\VirtualGreen\Samples\MultiDisassembler\PipelineComponents\obj\Debug\PipelineComponents.csprojResolveAssemblyReference.cache
2+
P:\pjv.virtualgreen\VirtualGreen\Samples\MultiDisassembler\PipelineComponents\bin\Debug\VirtualGreen.Samples.MultiDisassembler.PipelineComponents.dll
3+
P:\pjv.virtualgreen\VirtualGreen\Samples\MultiDisassembler\PipelineComponents\bin\Debug\VirtualGreen.Samples.MultiDisassembler.PipelineComponents.pdb
4+
P:\pjv.virtualgreen\VirtualGreen\Samples\MultiDisassembler\PipelineComponents\obj\Debug\VirtualGreen.Samples.MultiDisassembler.PipelineComponents.dll
5+
P:\pjv.virtualgreen\VirtualGreen\Samples\MultiDisassembler\PipelineComponents\obj\Debug\VirtualGreen.Samples.MultiDisassembler.PipelineComponents.pdb

Working-with-Pipelines/Calling-multiple-Disassemblers-in-Receive-pipeline/PipelineComponents/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

Whitespace-only changes.

Working-with-Pipelines/Calling-multiple-Disassemblers-in-Receive-pipeline/PipelineComponents/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

Whitespace-only changes.

Working-with-Pipelines/Calling-multiple-Disassemblers-in-Receive-pipeline/PipelineComponents/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<SchemaVersion>2.0</SchemaVersion>
7+
<ProjectGuid>{FC151E4B-B76C-41F1-ACA3-A338E4B60F0D}</ProjectGuid>
8+
<ProjectTypeGuids>{EF7E3281-CD33-11D4-8326-00C04FA0CE8D};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
9+
<OutputType>library</OutputType>
10+
<GenericProcessing>true</GenericProcessing>
11+
<RootNamespace>VirtualGreen.Samples.MultiDisassembler.Pipelines</RootNamespace>
12+
<AssemblyName>VirtualGreen.Samples.MultiDisassembler.Pipelines</AssemblyName>
13+
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
14+
<BpelCompliance>True</BpelCompliance>
15+
<FileUpgradeFlags>
16+
</FileUpgradeFlags>
17+
<UpgradeBackupLocation>
18+
</UpgradeBackupLocation>
19+
<OldToolsVersion>4.0</OldToolsVersion>
20+
<PublishUrl>publish\</PublishUrl>
21+
<Install>true</Install>
22+
<InstallFrom>Disk</InstallFrom>
23+
<UpdateEnabled>false</UpdateEnabled>
24+
<UpdateMode>Foreground</UpdateMode>
25+
<UpdateInterval>7</UpdateInterval>
26+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
27+
<UpdatePeriodically>false</UpdatePeriodically>
28+
<UpdateRequired>false</UpdateRequired>
29+
<MapFileExtensions>true</MapFileExtensions>
30+
<ApplicationRevision>0</ApplicationRevision>
31+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
32+
<IsWebBootstrapper>false</IsWebBootstrapper>
33+
<UseApplicationTrust>false</UseApplicationTrust>
34+
<BootstrapperEnabled>true</BootstrapperEnabled>
35+
</PropertyGroup>
36+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
37+
<DebugSymbols>true</DebugSymbols>
38+
<DebugType>full</DebugType>
39+
<Optimize>false</Optimize>
40+
<OutputPath>bin\Debug\</OutputPath>
41+
<DefineConstants>DEBUG;TRACE</DefineConstants>
42+
<ErrorReport>prompt</ErrorReport>
43+
<WarningLevel>4</WarningLevel>
44+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
45+
</PropertyGroup>
46+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
47+
<DebugType>pdbonly</DebugType>
48+
<Optimize>true</Optimize>
49+
<OutputPath>bin\Release\</OutputPath>
50+
<DefineConstants>TRACE</DefineConstants>
51+
<ErrorReport>prompt</ErrorReport>
52+
<WarningLevel>4</WarningLevel>
53+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
54+
</PropertyGroup>
55+
<PropertyGroup>
56+
<SignAssembly>true</SignAssembly>
57+
</PropertyGroup>
58+
<PropertyGroup>
59+
<AssemblyOriginatorKeyFile>..\samples.snk</AssemblyOriginatorKeyFile>
60+
</PropertyGroup>
61+
<ItemGroup>
62+
<Reference Include="System">
63+
<Name>System</Name>
64+
</Reference>
65+
<Reference Include="System.Xml">
66+
<Name>System.XML</Name>
67+
</Reference>
68+
<Reference Include="System.Configuration">
69+
<Name>System.Configuration</Name>
70+
</Reference>
71+
<Reference Include="Microsoft.BizTalk.Pipeline">
72+
<SpecificVersion>False</SpecificVersion>
73+
</Reference>
74+
<Reference Include="Microsoft.BizTalk.DefaultPipelines">
75+
<Name>Microsoft.BizTalk.DefaultPipelines</Name>
76+
</Reference>
77+
<Reference Include="Microsoft.BizTalk.GlobalPropertySchemas">
78+
<Name>Microsoft.BizTalk.GlobalPropertySchemas</Name>
79+
</Reference>
80+
<Reference Include="Microsoft.BizTalk.TestTools">
81+
<Name>Microsoft.BizTalk.TestTools</Name>
82+
</Reference>
83+
<Reference Include="Microsoft.XLANGs.BaseTypes">
84+
<Name>Microsoft.XLANGs.BaseTypes</Name>
85+
</Reference>
86+
</ItemGroup>
87+
<ItemGroup>
88+
<Compile Include="..\SharedAssemblyInfo.cs">
89+
<Link>SharedAssemblyInfo.cs</Link>
90+
</Compile>
91+
<Compile Include="Properties\AssemblyInfo.cs" />
92+
</ItemGroup>
93+
<ItemGroup>
94+
<None Include="..\samples.snk">
95+
<Link>samples.snk</Link>
96+
</None>
97+
</ItemGroup>
98+
<ItemGroup>
99+
<Pipeline Include="ExtractXmlReceive.btp">
100+
<TypeName>ExtractingXmlReceive</TypeName>
101+
<Namespace>VirtualGreen.Samples.MultiDisassembler.Pipelines</Namespace>
102+
<SubType>Task</SubType>
103+
</Pipeline>
104+
</ItemGroup>
105+
<ItemGroup>
106+
<BootstrapperPackage Include=".NETFramework,Version=v4.6">
107+
<Visible>False</Visible>
108+
<ProductName>Microsoft .NET Framework 4.6 %28x86 and x64%29</ProductName>
109+
<Install>true</Install>
110+
</BootstrapperPackage>
111+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
112+
<Visible>False</Visible>
113+
<ProductName>.NET Framework 3.5 SP1</ProductName>
114+
<Install>false</Install>
115+
</BootstrapperPackage>
116+
</ItemGroup>
117+
<ItemGroup>
118+
<ProjectReference Include="..\PipelineComponents\PipelineComponents.csproj">
119+
<Project>{7db93d4c-df46-4fda-989b-37e5d41dfd48}</Project>
120+
<Name>PipelineComponents</Name>
121+
</ProjectReference>
122+
</ItemGroup>
123+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
124+
<Import Project="$(MSBuildExtensionsPath)\Microsoft\BizTalk\BizTalkC.targets" />
125+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<PublishUrlHistory />
5+
<InstallUrlHistory />
6+
<SupportUrlHistory />
7+
<UpdateUrlHistory />
8+
<BootstrapperUrlHistory />
9+
<ErrorReportUrlHistory />
10+
<FallbackCulture>en-US</FallbackCulture>
11+
<VerifyUploadedFiles>false</VerifyUploadedFiles>
12+
</PropertyGroup>
13+
<ProjectExtensions>
14+
<VisualStudio>
15+
<FlavorProperties GUID="{EF7E3281-CD33-11D4-8326-00C04FA0CE8D}">
16+
<Files />
17+
</FlavorProperties>
18+
</VisualStudio>
19+
</ProjectExtensions>
20+
</Project>

0 commit comments

Comments
 (0)