WCF LOB Adapter SDK Tutorial and BizTalk 2006 R2

I recently went through the WCF LOB Adapter SDK Tutorial, and tried to use the echo adapter from BizTalk. It worked after a couple of tweaks.

Consuming the outbound part of the adapter involved the following gotchas:

  • Remember to specify the SOAP header action in the send port properties.

    Sendport properties

  • I hadn’t touched Abort() and ClearContext() in EchoAdapterConnection, either because I didn’t follow the tutorial properly or because it doesn’t say to do so. Either way, I got NotImplementedException. So I removed the line throwing this exception from these two methods.

When consuming the inbound part, I had trouble with the action. There is no place to input the action in the receive location configuration dialogue. And without action, I got the following error:

The Messaging Engine failed to update the configuration for the receive location "EchoAdapterSample" with URL "echov2://localhost/echolob?enableAuthentication=False" for adapter "WCF-Custom". Reason: "Microsoft.ServiceModel.Channels.Common.AdapterException: Unable to receive any actions for inbound handler to start listening.

The simplest way to solve this is to add an extra parameter action to the address, e.g. echov2://localhost/echolob?enableAuthentication=False&action=Echo/OnReceiveEcho.

A more complex (but perhaps cleaner) way is create a new endpoint behavior. This is described in How To: Obtain a list of receive actions when an ASDK-based Adapter is used with BizTalk in a Receive Location. One or more actions can now be input by inserting the new behavior on the Behavior tab. See the blog post Using EchoAdapter in BizTalk 2006 R2 for a screen shot.

Advertisements

One thought on “WCF LOB Adapter SDK Tutorial and BizTalk 2006 R2”

  1. Thank you for this post, it was exactly what I needed. Your clear and concise explanation shows your expertise in this area.

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