Article Series on BizTalk and WCF: Part IX, BizTalk Adapter Pack BizTalk Patterns

UPDATE: I have since moved these articles to my own blog and they can be found here.

Whew.  My 9th and final article for on integrating BizTalk Server and WCF is now published.  This one looks at the BizTalk Adapter Pack and how to consume the Oracle adapter from inside BizTalk Server.  I demonstrated how to insert multiple records at once, call stored procedures, build a database polling solution, and how to call the Adapter Pack from an orchestration using code.

20,500+ words and 178 screenshots later, I definitely learned a lot about WCF (and Oracle) by writing this series of articles.  I found the security and attachment topics to be challenging, the transaction topics to be quite interesting, and the BizTalk Adapter Pack to be quite compelling.  The WCF integration in BizTalk Server 2006 R2, while not as rich as it could be, is actually pretty darn well built and thought out.

When I started out on this series, I figured that writing about BizTalk/WCF and then the BizTalk Adapter Pack would be somewhat “niche” for the majority of developers, but, hopefully this helps people down the line as they begin to really investigate and evaluate these technologies together.

Series Summary
 BizTalk and WCF: Part I, Operation Patterns Get the source code!
 BizTalk and WCF: Part II, Security Patterns
 BizTalk and WCF: Part III, Transaction Patterns
 BizTalk and WCF: Part IV, Attachment Patterns
 BizTalk and WCF: Part V, Publishing Operations Patterns Get the source code!
BizTalk and WCF: Part VI, Publishing Advanced Service Patterns
BizTalk and WCF: Part VII, About the BizTalk Adapter Pack Get the source code!
BizTalk and WCF: Part VIII, BizTalk Adapter Pack Service Model Patterns
BizTalk and WCF: Part IX, BizTalk Adapter Pack BizTalk Patterns


Technorati Tags: ,


Categories: .NET, BizTalk, SOA, WCF/WF

19 replies

  1. Richard,
    Excellent series, the community has certainly benefited from the hardwork!

    Cheers, Nick.

  2. Richard, great series of articles!

    On your Order and Order Items insert scenario, how would you insert an order id generated by Oracle into the items table (like the order to order items scenario in SQL Server updategram where we use at-identity).
    Also, can you select multiple tables you want it to generate the metadata for or do you have to select one at at time?


    Thiago Almeida

  3. Hey Thiago,

    You mean that the “order id” column is a generated column? Haven’t tried that yet.

    As for multiple tables, YES, you can actually choose operations from many tables at once.

  4. Hi Richard,

    Yes, I was wondering how it would be possible to insert an order and its order items using only one call to the LOB adapter (in the same transaction) and having the auto generated column be the link between the two tables.
    I’ll have to start playing around with these adapters soon!

    Thanks, Thiago Almeida

  5. I’ve got a question about the completion of Scenario 3. I’m having trouble creating the enveloping, even after reading your posting about the SQL adapter.

    Any advice or examples you know of?

  6. Hi Matt,

    I don’t think there was an envelope in Scenario #3. You’re talking about the article this post references, the one using the Oracle adapter, right?

  7. Silly me, this is what happens when I’ve got 4 windows with your blog on them open…

    Anyhow, yes… I was asking about the oracle adapter post where you stopped short of making it “enterprise ready.”

    If you want to delete these comments, I’ll repost on the correct posting.

    • I’ll take it as a compliment that you have 4 blog posts open at once 😉

      Yes, I see the text that you are referring to. Have you made the envelope schema yet? Did you take the original schema, mark it as an envelope, and then set the body xpath? Then you’d need to create a copy of that schema, rip out everything but the innermost POLLINGSTMTRECORD. Hopefully then, the envelope would debatch and you’d end up with that secondary schema type for each output message.

  8. Very similar to the solution I finally worked out:

    1. Set the generated schema to “Envelope=yes”
    2. Set the XPath.
    3. Set the root node to POLLINGSTMT (neccessary, or the message doesn’t route). I also set the Attribute FormDefault to Unqualified like you did in your SQL example.
    4. Set max occurs to 1 on POLLINGSTMTRECORD under POLLINGSTMT
    5. DELETE the POLLINGSTMT record (high level, up with the POLLINGSTMT) in the generated schema. This conflicts with the new schema created next.
    6. Create a new schema and “include” the generated schema. Note: You must copy the namespace of the original schema.
    7. Create a new record in the schame called “POLLINGSTMTRECORD”
    8. Set this new record as the root reference and it’s datatype to POLLINGSTMTRECORD.

    Now the xml pipeline will debatch successfully.

    I’ve had comments on forum posts that I should be careful setting the root reference, but it was the ONLY way I could get the error message that a schema for “POLLINGSTMTRECORD” was not found that aligned this solution with your SQL post.

    suggestions / Feedback?

  9. Murari, you referring to the debatching of the database content? If so, then the POLLINGSTMT root schema would be marked as an envelope with another schema needed which held the POLLINGSTMTRECORD node which would get debatched. Hopefully similar to DB-debatching posts I’ve done in the past …

  10. Richard,

    Can you please answer Thiago’s question on multiple tables inserts within the same transaction using WCF-SQL adapter?


  11. Durga,

    Haven’t tried it yet with taking the auto-generated ID returned from one table and making that a key in the second table while keeping it all under the same transaction.

  12. I searched so many applications but i did not find anything,luckily i got this links It is very useful to me.thanks to richards.

  13. Links are not opening allow to open the site.


  1. BizTalk WCF Adapter Pack Articles on « Connected Thoughts
  2. Article Series - BizTalk and 2006 - Riaan's Blog
  3. Excellent BizTalk/WCF Resources by « Miguel’s BizTalk Blog

Leave a Reply to Richard Seroter Cancel reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: