Click to Rate and Give Feedback
MSDN
MSDN Library
BizTalk Server
BizTalk Server 2004
SDK
Samples
 EnvelopeProcessing (BizTalk Server ...

  Switch on low bandwidth view
Microsoft BizTalk Server 2004
EnvelopeProcessing (BizTalk Server Sample)

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:

  1. BizTalk Server retrieves the message file from the receive location folder EnvInput.
  2. 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.
  3. In the MessageBox database, route the messages to the send port.
  4. 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.

  1. In a command window, navigate to the following folder:

    <Samples Path>\Pipelines\AssemblerDisassembler\EnvelopeProcessing

  2. Run the file Setup.bat, which performs the following actions:
    • Creates the input (EnvInput) and output (EnvOutput) folders for this sample in the folder:

      <Samples Path>\Pipelines\AssemblerDisassembler\EnvelopeProcessing\

    • Compiles and deploys the Visual Studio .NET project for this sample.
    • Creates and binds the BizTalk Server receive location, and the send and receive ports.

      Note  This sample displays the following warnings when creating and binding ports:

      Warning: Receive handler not specified for receive location "EnvelopeProcessing_RL"; updating with first receive handler with matching transport type.
      Warning: Host not specified for orchestration "EnvelopeProcessing"; updating with first available host.
      You can safely ignore these warnings. (To accommodate for possible naming differences in user installations, the host name and receive handler have been omitted from the binding file. The utility Btsdeploy.exe uses the first receive handler that supports the adapter type and the default host.)
    • Enables the receive location, and starts the send port.

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.

  1. Put a copy of the file EnvelopeProcessing_in.txt into the folder EnvInput.
  2. 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.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker