The EnvelopeProcessing sample demonstrates how to process messages and message envelopes in BizTalk Server pipelines. Further, it shows how to process flat file messages into XML messages.
This sample configures the folder EnvInput as a receive location. When you place a file, such as the sample file EnvelopeProcessing_in.txt, in this folder, BizTalk Server processes the messages in this file using the following steps:
- BizTalk Server retrieves the message file from the receive location folder EnvInput.
- In the receive pipeline, use the Flat File Disassembler pipeline component to remove the header and trailer from the flat file messages, and parse them into individual messages.
- In the MessageBox database, route the messages to the send port.
- In the send pipeline of the send port, use the XML Assembler pipeline component to wrap the messages in XML envelopes and then place them into the send adapter folder EnvOutput.
Note For important information about all samples in this SDK, see Samples.
To download the updated BizTalk Server 2004 SDK, go to http://go.microsoft.com/fwlink/?LinkId=24723.
Location in SDK
<Samples Path>\Pipelines\AssemblerDisassembler\EnvelopeProcessing\
File Inventory
The following table shows the files in this sample and describes their purpose.
| File(s) | Description |
| Cleanup.bat | Used to undeploy assemblies and remove them from the global assembly cache (GAC). Removes send and receive ports. Removes Microsoft Internet Information Services (IIS) virtual directories as needed. |
| EnvelopeProcessing.btproj, EnvelopeProcessing.sln | Project and solution files for this sample. |
| EnvelopeProcessing_in.txt | Sample input file. |
| Header.xsd, PO.xsd, Trailer.xsd | Schema for flat file header, body, and trailer, respectively. |
| XmlEnvelope.xsd | Schema for outbound XML envelope. |
| EnvReceivePipeline.btp, EnvSendPipeline.btp | BizTalk Server receive and send pipeline files with the Flat File Disassembler and XML Assembler pipeline components, respectively. |
| EnvelopeProcessingBinding.xml | Used for automated setup such as port binding. |
| Setup.bat | Used to build and initialize this sample. |
To Build and Initialize This Sample
Use the following procedure to build and initialize the EnvelopeProcessing sample.
- In a command window, navigate to the following folder:
<Samples Path>\Pipelines\AssemblerDisassembler\EnvelopeProcessing
- Run the file Setup.bat, which performs the following actions:
Note You should confirm that BizTalk did not report any errors during the build and initialization process before attempting to run this sample.
Note If you choose to open and build the project in this sample without running the file Setup.bat, you must first create a strong name key pair using the .NET Framework Strong Name utility (sn.exe). Use this key pair to sign the resulting assembly.
Note To undo changes made by Setup.bat, run Cleanup.bat. You must run Cleanup.bat before running Setup.bat a second time.
To Run This Sample
Use the following procedure to run the EnvelopeProcessing sample.
- Put a copy of the file EnvelopeProcessing_in.txt into the folder EnvInput.
- Observe the three .xml files created in the folder EnvOutput. The names of these .xml files are based on their message ID GUIDs. They contain the messages extracted from the input file, subsequently wrapped in envelopes.
See Also
Pipelines (BizTalk Server Samples Folder)
To download updated BizTalk Server 2004 Help from www.microsoft.com, go to
http://go.microsoft.com/fwlink/?linkid=20616.
Copyright © 2004 Microsoft Corporation.
All rights reserved.