Dynamic Send Port in BizTalk 2004

There are two types of dynamic ports in BizTalk 2004. They are Dynamic One-Way Port and Dynamic Solicit-Response Port. The following sample is based on Dynamic One-Way Port, using the other one will be very similar.

1. Create a new BizTalk project.
2. Create a schema to the new project.
    108994583 c13a155743
3. Promote “Destination” to be a distinguished field.
4. Create an orchestration to the project. “DynamicSendPort” is a configure port with “Dynamic” port binding.
    108994582 6345d3dde7
5. Add the following statement into expression shape. “MsgSample” is the message created in orchestration view
          DynamicSendPort(Microsoft.XLANGs.BaseTypes.Address) = MsgSample.Destination;
6. Associate the strong name key to the project and deploy it.
7. Create receive port in BizTalk Explorer pointing to a local file directory.
8. Bind the receive port to orchestration and start the orchestration.
9. Drop the XML instance file to the receive location and you will see the message sent to the location defined in the instance file. The XML instance file should look like the following.

109001266 be2a57c3e3 
Destinations could be on different protocols as long as the URI is correct. BizTalk will generate “The outbound transport could not be resolved” error if URI couldn't be found. The following are some valid formats.
    file://c:\file\Dynamic\Output\%MessageID%.xml
    msmq://.\private$\TestQueue
    http://orders.mycompany

…Edmund Zhao

This article is part of the GWB Archives. Original Author: Edmund Zhao

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.