Welcome to MSDN Blogs Sign in | Join | Help

WCF LOB Adapter SDK and BizTalk Adapter Pack

The BizTalk Adapter Pack, comprising of the SAP, Siebel, OracleDB, OracleEBS and SQL WCF Bindings / Adapters which can be used with BizTalk Server 2006 R2 and R3. The Windows Communication Foundation (WCF) Line Of Business (LOB) Adapter SDK.

Syndication

News

CTP4 released (Adapter Pack V2, Adapter SDK V1 SP2) on October 21, 2008

Other Blogs Related to BizTalk Adapter Pack

How To: Obtain a list of receive actions when an ASDK-based Adapter is used with BizTalk in a Receive Location

The WCF LOB Adapter SDK (ASDK) contains a behavior named "InboundActionEndpointBehavior" which you can add to your ServiceHost in inbound scenarios. What this behavior does is, at runtime, analyzes the contract deployed, determines the Actions on the Contract, and passes those to the adapter in the StartListener() call (on the IInboundHandler interface) via the "string[] actions" parameter. This allows the adapter to determine what actions the user is listening for, and send only messages of those type.

More information on this can be found at: http://blogs.msdn.com/sonuarora/archive/2007/06/11/passing-soap-actions-to-adapter-inbound-handler-for-filtering-type-of-listeners.aspx

What do you do when the adapter is used in a Receive Location from BizTalk? The WCF Adapter allows you specify endpoint behaviors for the ServiceHost which it creates, and that's how you can plug in the InboundActionEndpointBehavior. However, this doesnt work as expected. Reason - the WCF Adapter uses an "untyped" contract for the Service, i.e., the Action/ReplyAction is specified as "*" / "*". Hence, even if you add the endpoint behavior, the "string[] actions" array just contains "*". How would a user let the adapter know what operations he is interested in?

Attached is a sample endpoint behavior which you can use. The primary difference between this behavior and the one which ships with ASDK is this - the ASDK behavior determines the list of actions from the deployed contract, and passes those to the adapter. On the other hand, the sample endpoint behavior (attached) gets the list of actions via user input. That is, while configuring your receive location, add this endpoint behavior (via the behaviors tab), and you'll see two properties: "receiveActions" and "delimiter". You need to concatenate all the actions into a single string and set it on the "receiveActions" property. Also, specify the delimiter you used in the "delimiter" property. The behavior will then split the concatenated string into a list of actions, store them in an ASDK specific class, and add this object to the Binding Parameter Collection. ASDK will then pick out the actions from there and pass them to the adapter in the StartListener call.

The attached .cs file contains comments towards the top of the file detailing how it needs to be compiled, and what entries need to be made in machine.config.

Published Friday, January 18, 2008 5:46 AM by mdoctor

Filed under:

Attachment(s): Program.cs

Comments

No Comments

Anonymous comments are disabled
Page view tracker