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

Whew.  My 9th and final article for TopXML.com 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 Source code coming soon!
BizTalk and WCF: Part VI, Publishing Advanced Service Patterns
BizTalk and WCF: Part VII, About the BizTalk Adapter Pack
BizTalk and WCF: Part VIII, BizTalk Adapter Pack Service Model Patterns
BizTalk and WCF: Part IX, BizTalk Adapter Pack BizTalk Patterns

 

Technorati Tags: ,

Article Series on BizTalk and WCF: Part VIII, BizTalk Adapter Pack Service Model Patterns

So how would you use the BizTalk Adapter Pack to build a RESTful HTTP URI on top of an Oracle database table?  What about calling Oracle stored procedures that made use of either strong or weak ref cursors?  In my latest article for TopXML.com,  I explore how to consume the Microsoft BizTalk Adapter Pack’s Oracle adapter using the WCF service model.

Specifically, I show how to …

  • Insert multiple records into an Oracle table using a single WCF operation call
  • Call Oracle stored procedures and process their result sets in either a strongly typed or weakly typed fashion
  • Using the adapter’s “polling” mechanism to build an Oracle database polling WCF host
  • Apply RESTful WCF attributes from the .NET Framework 3.5 to the BizTalk Adapter Pack

This was a fun article to write.  The ability of the adapter to poll an Oracle database and kick off an event introduces a number of possibilities.  Also, applying  some of the things that I had read about the new RESTful WCF attributes with the auto-generated Oracle adapter bits proved to me a useful exercise.

Feedback?  Let me know.

 

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 Source code coming soon!
BizTalk and WCF: Part VI, Publishing Advanced Service Patterns
BizTalk and WCF: Part VII, About the BizTalk Adapter Pack
BizTalk and WCF: Part VIII, BizTalk Adapter Pack Service Model Patterns
BizTalk and WCF: Part IX, BizTalk Adapter Pack BizTalk Patterns

Technorati Tags: ,

Next Version of BizTalk Server Announced

Today, Steve Martin announced a few details about the next version of BizTalk that will be available in early 2009.   Called BizTalk Server 2006 R3, this amounts to an incremental release of the product that does NOT correspond to the Oslo wave.  The “headline” for this release is compatibility with the latest version of the Microsoft platform (Windows Server 2008, SQL Server 2008, Visual Studio.NET 2008).   Looks like a couple additional nuggets will be added, such as new and enhanced adapters (such as WCF SQL adapter?).

I’m not a fan of the naming.  Why not call it BizTalk Server 2000 R7?  If the software is going to have a “year” attached to its name, seems like a good idea to actually increment it.  All joking aside, the name makes SOME sense because this is really just a service pack on the existing BizTalk Server 2006 code base.  Calling it BizTalk Server 2009 would create a perception of a brand new product, which this is not.

Technorati Tags: 

Article Series on BizTalk and WCF: Part VII, About BizTalk Adapter Pack

I just posted another article for TopXML.com as part of my series on BizTalk + WCF.   In this article, I explore the new BizTalk Adapter Pack.

This article is mainly an introduction to the BizTalk Adapter Pack, with a couple demonstrations using the Oracle adapter.  I show how to use the WCF Oracle adapter to query Oracle data using both standard .NET code and and a BizTalk project. 

Next up, I’ll close out the series with a couple articles highlighting key use cases for the Adapter Pack and how to execute those use cases via code or BizTalk.

 

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 Source code coming soon!
BizTalk and WCF: Part VI, Publishing Advanced Service Patterns
BizTalk and WCF: Part VII, About the BizTalk Adapter Pack
BizTalk and WCF: Part VIII, BizTalk Adapter Pack Service Model Patterns
BizTalk and WCF: Part IX, BizTalk Adapter Pack BizTalk Patterns

Technorati Tags: ,

More MVP Summit Thoughts

Yesterday, me and the other BizTalk (and Connected Systems) MVPs began participating in a software design review of Oslo.  Not much we can talk about, but needless to say, the Microsoft team’s been busy.  Interesting stuff so far.

On top of the great group of folks I had met up with the day before, it was more of the same yesterday.  Got a chance to chat with Jesus Rodriguez, Jon Flanders, Winson Woo, Yossi Dahan, Saravana Kumar, Kent Weare, Matt Meleski and Eric Stott.  It’s quite beneficial to get the insights and perspectives of the folks who use the software vs. just those who build it.

Technorati Tags:

MVP Summit Thoughts

Here at the Microsoft MVP Summit in Seattle and it’s been fun bumping into old friends and putting names with faces.  Had a chance to hang out with Scott ColestockCharles Young, Brian Loesgen, Stephen Thomas, Tim Rayburn, Alan Smith, Paul Somers, Tomas Restrepo and Bill Chesnut.  It’s pretty wild to be around some of the smartest BizTalk folks on the planet.

Today’s MVP Summit sessions were intentionally unfocused and meant to be conversations among folks with similar technology interests.  I spent my first session in a WCF roundtable moderated by Michele Leroux Bustamante where I walked away with lots of ideas and items to research (WCF null channels, security token services, etc). 

I next sat in on a “patterns and practices” discussion, and quickly realized how fortunate BizTalk developers are to “get” many concepts that other developers may struggle with.  I asked the group how they handled asynchronous design patterns, and that spawned a 30 minute discussion on the challenges of asynchronous designs (specifically on the UI) and how many developers are leery to embrace it.  There was further discussion the challenges around exception management, logging and transactions.  Charles Young and I were chatting and agreed that many of these areas which plague “regular” developers are things that a BizTalk developer has encountered and conquered years ago.  For instance, any reasonable BizTalk developer understands the value of asynchronous messaging, and is adept and dealing with callbacks and correlation.  For exception handling, the BizTalk engine itself handles exceptions fairly well by suspending instances, without the developer explicitly telling it to please not discard the instance or messages. 

If I take a step back and ignore any features I WISH BizTalk had, I still have to admit that the evolution from BizTalk 2002 to 2004 is one of the greatest software engineering feats that Redmond has produced.  Think about all the well constructed architectural changes ( messaging engine, adapters, .NET assemblies) and new features (SSO, BRE, BAM, VS.NET integration) that were included in a single release cycle, and still hold up today.  Impressive, well thought out stuff.  Not that everything’s perfect, or close to it, but BizTalk developers are exposed to a lot of broad architectural principles that benefit them even in non-BizTalk solution scenarios.  And yes, the Kool-Aid is flowing in Seattle this week.

Technorati Tags: ,

Using the BizTalk Adapter Pack to Load Oracle Data into InfoPath 2007 Forms

One of the glaring omissions from InfoPath 2007 is integration with non SQL Server data repositories.  For retrieving reference data (query data), your only choice is SQL Server.  That’s lousy.  For submitting data, your only choice is SQL Server or Microsoft Access, and, you can only submit to a database when using the thick client version of InfoPath.  That is, you can’t do a direct database submission on the InfoPath Forms Services version of a form.  This also sucks.  SharePoint isn’t much better, as the SharePoint Designer integration with ODBC data sources (such as Oracle) is clumsy at best, and in our experience, not really functional.

But, complaining gets me nowhere.  So, how can I cleanly interface between InfoPath and Oracle, which is the overwhelming database preference in my current environment?  What I’ll show here is how to use the BizTalk Adapter Pack to generate the service stubs I need to query and publish to Oracle databases.  I’ll be publishing another article on TopXML.com that digs deeply into the BizTalk Adapter Pack, so I won’t go into great depth here on what it is.   But the short description is:  the BizTalk Adapter Pack contains Line of Business (LOB) adapters that use a common WCF infrastructure which can be consumed by WCF clients, ADO.NET clients (for ETL scenarios), BizTalk clients (for robust workflow, EAI scenarios), or basic SOAP clients (for single operation scenarios).  I’m building an example for the last option.

First off, I need data in my Oracle database tables.  If you are a regular Visual Studio.NET user, you know that you can access ODBC data sources (such as Oracle) using the built-in Server Explorer.  This works fine for data entry, but if you want true control over the database, you need more.  One really nice option (from Oracle itself) is the Oracle Developer Tools for Visual Studio.   This is a nice plug in for VS.NET that gives you most of what you need for Oracle design tasks.

Lots of great stuff in there.  For my purposes, I needed a new table to start with.

Then I had to fill in some initial data.

Now we can actually build the service which interacts with this table.  First, I created a new “WCF Service Library” project in Visual Studio.NET.  From there, once the BizTalk Adapter Pack is installed, I can select Add Adapter Service Reference from the “Add” menu.

This opens a window where I can select my connection criteria, browse objects in my repository, and select the operations I want.  The first thing to do is configure the URI.  After choosing which binding to use (in my case, the OracleDbBinding), I have to set the DataSourceName value.  This is the identifier in my Oracle tnsnames.ora file.  We no longer use System DSN entries to connect to Oracle and instead put database details in the tnsnames.ora file.  After setting the data source, I have to put the username and password for my Oracle database.

Once all my connection details are set, I can connect to my database.  Now, I can search (*new feature alert*) and browse the database tables, views, functions, packages and procedures.

After choosing my database table operation (”Select”) and closing out the window, I get an auto-generated application configuration file, and, a class containing all the interfaces, contracts and proxy code needed to consume this database service.  Now, as stated earlier, I want to take this WCF service, and expose it out for basic SOAP clients (i.e. InfoPath/SharePoint).  Before building the web service proxy around this WCF client, I want to add a brand new service interface.  I don’t want to directly expose the Adapter Pack interface, but rather, put a simpler interface out to my SOAP clients.

So, in this WCF Service Library project, I added a new class containing a WCF ServiceContract and OperationContract, as well as the service which implements those contracts and calls my auto-generated Adapter Pack proxy.

So I have a friendly service interface which abstracts some of the BizTalk Adapter Pack details, but calls the auto-generated Oracle Adapter bits when it’s operation is invoked.

Now, I need to put this service into a web-ready container.  All I have now is the library project.  So, I created a new “Web Site” project of type “WCF Service.”  I don’t need much from this service, so the underlying “cs” file can be deleted.  Then, after adding a reference to my WCF Service Library project, I have to modify the Service.svc file so that it points at my implementation class (”Seroter.Demo.BizTalkAdapterPack.CustomerSvcLibrary.CustomerQuery”) for it’s “Service” attribute.    After this, all that remains is to set up the web.config file to both see my Oracle Adapter endpoint (as a service) and expose new endpoints for my SOAP clients.  After copying the information from the auto-generated app.config file (that should still be in the WCF Service Library project) into my web.config, I can launch the Service Configuration Editor to make the remaining web.config changes.  Specifically, I need to add a new service (and endpoint), and provide a metadata behavior so that clients can query the service metadata.

So now I have a client endpoint (which uses the BizTalk Adapter Pack Oracle binding), and a new service with an HTTP endpoint that basic SOAP clients can use.  After creating a new virtual directory in IIS 6.0, and pointing to the WCF Service project, I now have a ready-to-go database access service.

From InfoPath 2007, I can now call and consume this service to pull reference data from Oracle.  Specifically, I created a new data connection, pointed to the IIS service, and chose the operation I needed.

Now I can drag the repeating results node to the InfoPath form and create a table.  If I preview the form, the service gets called, and the results are displayed.

That was easy!  Took about a dozen lines of code and a configuration file setup.   In a later post, I’ll show how to use this service to populate data forms in SharePoint as well.

Technorati Tags:  ,

Article Series on BizTalk and WCF: Part VI, Publishing Advanced Services Patterns

I just posted another article for TopXML.com as part of my series on BizTalk + WCF.   This post digs into exposing WCF services out of BizTalk that utilize security features, MTOM attachments, and transactions.

Topics include: message-based security, transport security, custom role based authorization, MTOM attachments, and how to send messages to BizTalk as part of a client transaction.  I observed some odd behavior with regards to MTOM where the “request” on the request/response port correctly attached the binary content as a MIME part, but the “response” message kept the binary string inside the XML payload itself.

 

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 Source code coming soon!
BizTalk and WCF: Part VI, Publishing Advanced Service Patterns
BizTalk and WCF: Part VII, About the BizTalk Adapter Pack
BizTalk and WCF: Part VIII, BizTalk Adapter Pack Service Model Patterns
BizTalk and WCF: Part IX, BizTalk Adapter Pack BizTalk Patterns

Technorati Tags: ,

New Collection of WCF Security Task Guidance

If you’re looking to dig a bit deeper into WCF security, and specifically how to perform particular tasks, go check out J.D. Meier’s blog for a link list of new “how tos” and videos recently posted to CodePlex.

Specifically, you’ll find some useful demonstrations for creating temporary certificates for message-based security, some interesting looks at impersonation, using SQL Role Providers for authentication, and more.

Technorati Tags: 

BizTalk Environment Migration Checklist

My company’s “standard operating procedure” for BizTalk Server doesn’t call out the specific requirements to deploy among environments (development to test, test to production, etc), so I’m trying to help the team get those articulated.  Here’s my first stab at a checklist that should be followed for BizTalk application migration between environments.   I don’t want the list to be abusive, but want it to be as comprehensible as possible.  Any feedback is appreciated.

Migrate from Local Development to Shared Development
  Task Comments
1. Code review executed by BizTalk team Refer to BizTalk Code Review guidelines
2. Consistent system artifact naming in place System DSNs, application configuration settings
3. Server access request approved BizTalk Administrator rights ok
4. User has taken BizTalk developer training, and optionally, BizTalk administrator training  
5, BizTalk application and host usage defined Are standard hosts used, or are additional ones defined? Does this project belong in an existing BizTalk Application, or a new one?
6, Reusable assets are factored into common applications and assemblies Schemas, web services, business rules
7. Application security requirements are clearly identified Authentication and authorization

 

Migrate from Shared Development to Test
  Task Comments
1. Code successfully builds and runs all core use cases  
2. Code review is re-executed if significant deviations discovered during initial code review  
3. Performance test plan is in place Test expected load + 25%; test LOB adapters to confirm downstream system load acceptance
4. Repeatable release management from development environment is set up Binding files created, MSI built, scripts constructed; helper components and web services added to MSI
5. Exception handling strategy is confirmed System retries, exception logging, resuming suspended messages
6. Application is ready for multi-box deployment All hard-coded file system references considered
7. List prepared of all encountered application and system exceptions, and resolution strategy for each Used for testing and eventual administration purposes
8. Need for new host instances or changes to throttling settings considered  
9. All web services are managed by governance platform [SOA Software]  

 

Migrate from Test to Production
  Task Comments
1. Application monitoring requested and configured [Microsoft Operations Manager] Identify events to monitor and notification recipients
2. Appointed application administrator has BizTalk Operator rights approved  
3. All web services are managed by governance platform [SOA Software]  
4. Debug statements removed and Event Log trace statements removed  

Technorati Tags: 

Next Page »


Disclaimer

Entries and comments here do not necessarily reflect the opinions, attitudes, and statements of my employer, my friends, or anyone associated with me.

Contact Me

Syndication

Categories