Tool: BizTalk Send Port Duplicator

Often times during development, and even in production, you have a need to create new BizTalk ports that are virtually identical to an existing one.

For instance, in a “content based routing” scenario, odds are you would test this by creating multiple send ports, all with a slight deviation in subscription criteria and destination path. We also have a case where data received by SAP is sent to a series of virtually identical send ports. Because all the SOAP send ports use the same proxy class for transmitting the service, the ONLY difference is the URL itself. But, it’s a hassle to create a new send port each time.

So, I took a few minutes yesterday, and using a BizTalk SDK example as inspiration, wrote a small tool that duplicates existing send ports. If I felt more ambitious I’d make it a custom MMC action, but alas, I’m not that motivated.

When you fire the BizTalk Send Port Duplicator (patent pending) up, the first thing you do is set the server where the BizTalk Management Database resides.

Then, you optionally choose which BizTalk “application” has the port you wish to copy. If you don’t choose an application from the drop down list, then you’ll get all send ports in your BizTalk environment.

Next, select the send port from the listbox, and type in a name that will be used for the port copy.

The copied send port shows up in the BizTalk Administration Console in the same “application” as the source send port. You can open it up and see nearly all properties copied across. What properties are included? You can copy one-way or two-way ports, filter/subscription, primary transport details (address, retry, handlers), maps, and pipelines. At the moment, I’m not copying secondary transport details, certificates, tracking details, or dynamic ports.

You can download the BizTalk Send Port Duplicator here. I’ve included the source code as well, so feel free to mess around with it.

[UPDATE (10/02/2007)] I’ve updated the application to also support choosing the name of the Management database. Prior, I had hard-coded this value.

Technorati Tags:



Categories: BizTalk

15 replies

  1. Nice tool Richard. However, it looks like it has an issue running under 64-bit BizTalk 2009 machines. I get the following exception:
    Error occurred: Details: Microsoft.BizTalk.ExplorerOM.BtsException: Explorer OM is not supported in a 64bit process. Do you know of a workaround?

    • Hmm. Wasn’t aware that the ExplorerOM didn’t work on 64 bit.

      • Monish,
        You just need to recompile the project from the source code, under Project Properties > Build > Set platform target to x86. Then this works very well.

        Also seems to work on BizTalk 2009.

        Thanks for the tool Richard.

      • I a running ESB 1.0
        Getting the following error when I try to browse the Portal:

        Event Type: Error
        Event Source: Microsoft.Practices.ESB
        Event Category: None
        Event ID: 6010
        Date: 2009/06/17
        Time: 12:25:14 PM
        User: N/A
        Computer: ZAGBLCPTBPM01
        Description:
        Explorer OM is not supported in a 64bit process.

        Source: Microsoft.Practices.ESB.BizTalkOperations.BizTalkQuery

        Method: Void .ctor()

        Error Source: Microsoft.BizTalk.ExplorerOM

        Error TargetSite: Void .ctor()

        Error StackTrace: at Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer..ctor()
        at Microsoft.Practices.ESB.BizTalkOperations.BizTalkQuery..ctor()

  2. Thanks for tool, but may be you know how to send same message to number of different ports without modifiying orchestration – directly from Administration Console?

    • Pavel, is your orchestration doing a synchronous communication or async? If your orchestration is sending out a message and not waiting for a response, you can use Direct Binding and have any number of ports listen to that message and send something out.

  3. Great little tool, I used it for the first time yesterday and it saved me significant amounts of time. I’m wondering if it would be easily feasible to set this up to copy ports between Biztalk servers (ie, from TEST to QA). I haven’t studied your code yet, but if your using the Explorer OM l i’m guessing I could just instantiate another OM object to the 2nd server and change the code to copy to this OM…?

  4. Hey very cool tool ! The only thing that is missing is the copy of the pipepline parameters ! Cheers

  5. download is not working

Trackbacks

  1. Changing Roles « Richard Seroter’s Architecture Musings
  2. Duplicating a SendPort in BizTalk - MyLifeIsMyMessage.net

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: