Category: BizTalk

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

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

    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 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: ,

  • 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

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

    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 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: ,

  • 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: ,

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

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

    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 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: ,

  • 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: 

  • Gracefully Uploading to SharePoint 2007 From BizTalk Server 2006 R1

    Scenario: I want to allow BizTalk Server 2006 (R1) to send XML (InfoPath forms) to a MOSS 2007 document library without resorting to hacks.

    Resolution: I can’t use the out-of-the-box BizTalk SharePoint adapter (only BizTalk Server 2006 R2 works natively with MOSS 2007) so I decided to utilize the available SharePoint web services to upload my file.  I wrote a wrapper web service to (a) encapsulate some additional logic (b) shield the BizTalk developer from understanding SharePoint services and (c) require no usage of the SharePoint 2007 object model.

    What did this solution look like?  I decided to use the CopyIntoItems method available on the SharePoint Copy web service.  This allows you to send a byte array of data to a document library and have it appear as a new document.  To hit the WSDL for this service, you’d go to:

    http://<your sharepoint base url>/sites/<site name>/_vti_bin/Copy.asmx

    Here you’ll see the CopyIntoItems operation.  My wrapper service starts with a couple “using” statements …

    using System.Net;   //for NetworkCredentials object
    using System.Text;  //for encoding bytes
    using System.IO;    //for stringwriter
    using System.Xml;

    Next I have my wrapper operation …

    [WebMethod]
    public string UploadXmlToSharePoint(string docToUpload,
    string siteRoot,
    string docLibrary,
    string fileName,
    string userName,
    string password,
    string domain)

    I’m taking the XML document input as a string in order to make the schema easier in BizTalk, and, ensure I don’t lose my InfoPath processing instructions when transporting over the wire (which seemed to be happening when I used an XmlDocument type input parameter).  Also note that I’m taking in a user/password/domain combo.  This is to allow for reuse later down the line.  The account used to call the SharePoint service MUST be a site administrator, so I’m making it an explicit parameter. The first thing I do inside my operation is build up the destination Uri based on the input parameters.

    //build full destination Url
    string destinationPath = siteRoot + "/" + docLibrary + "/" + fileName;

    Next I have to take the input string and convert it to the byte array required by the MOSS web service …

    //convert string to byte array
    byte[] fileIn = ConvertDocToBytes(docToUpload);
    ...
    private byte[] ConvertDocToBytes(string xmlString)
        {
            ASCIIEncoding encoding = new ASCIIEncoding();
    
            return encoding.GetBytes(xmlString);
        }

    Now I need to instantiate some values needed by the MOSS service. First we have the “result” object which conveys the state of the copy transaction. Then I have a “FieldInformation” array which can be used to pass in specific field values. Note that you CANNOT pass in a null value here, or else you get a cryptic error when calling the service. You can make it blank, but don’t use a null parameter in its place. Finally, I create a destination Uri array.

    //holds MOSS service response values
    SharePointSvc.CopyResult[] results;
    
    //required fieldinformation array
    SharePointSvc.FieldInformation fieldInfo =
        new SharePointSvc.FieldInformation();
    SharePointSvc.FieldInformation[] fieldInfoArray = { fieldInfo };
    
    //destination url (notice that it's an array, meaning
    //multiple sites COULD be targeted
    string[] destUri = { destinationPath };

    Now I can actually call this puppy. After instantiating the web service proxy class (generated by the Add Web Reference command), I need to provide explicit credentials.

    //create instance of web service proxy
    SharePointSvc.Copy copy = new SharePointSvc.Copy();
    
    //pass valid credentials
    copy.Credentials = new NetworkCredential(userName, password, domain);
    
    //call primary operation;  sourceUri, doesn't matter here
    copy.CopyIntoItems(
         "http://none",
         destUri,
         fieldInfoArray,
         fileIn,
         out results);

    The last step is to actually check the “result” object for errors and return any errors back to the caller.

    //check for error and return final result
    if (results[0].ErrorMessage != null)
      {
        return "Error: " + results[0].ErrorMessage;
      }
      else
      {
        return "Success";
      }

    Sweet.  After building and deploying this service, I can call it from any client, BizTalk (2004/06) included.  I’ll obviously want to securely store my credentials (using Enterprise Single Sign On) and not embed those in my client directly.

    So if I call my service, and pass in a plain old XML file, it shows up in my document library as expected.

    Now, if I send an InfoPath document to a Forms Library set up with an InfoPath template, the result is this …

    Nice! The document is recognized as an InfoPath document (see the icon), and, the promoted columns are properly loaded.

    So, if you’re interested in a fairly easy way to programmatically upload documents to a MOSS 2007 library, without having to use the SharePoint object model or BizTalk adapter, this web service might just work for you.

    Technorati Tags: ,

  • BizTalk Database Architecture Poster Now Available

    The BizTalk product team keeps pumping out posters, so I guess that I’ll keep highlighting them.  This particular one focuses on the core BizTalk databases, their functions, and how they relate to each other.  Specifically, you’ll find each BizTalk database alongside it’s role, functional events, data movement events and more.  Given that SQL Server databases form the heart and soul of BizTalk Server, it’s fairly important that any self-respecting BizTalk person knows this information.

    I can’t imagine that there are many more poster ideas left for the BizTalk team to produce.  I mean, what’s left?  Security roles?  Functoids?  Maybe they’ll mail it in and produce a poster of the product team itself playing a spirited game of freeze tag.

    Technorati Tags:

  • SSO Config Data Store Tool, BizTalk/WCF Scenario Source Code Available

    I’ve finally gotten around to publishing my source code for my SSO Configuration Data Store Tool.  You can download both the runtime application and underlying source code from here.  If you want to mess around with it, great, but please keep my name on there.

    Although I’m not finished with my “BizTalk + WCF” series for TopXML.com yet, I have finished the first part of the series on consuming WCF services.  So, I’ve put the source code I used for all those demonstrations right here.  The binding file is in there as well.  Once I finish the last part of the series, I’ll post that source code too.

    Enjoy.

    Technorati Tags: ,