biztalk server design and implementation - springer978-1-4302-11… ·  · 2017-08-29biztalk...

15
BizTalk Server 2002 Design and Implementation XINCHEN APress Media, LLC

Upload: doananh

Post on 15-May-2018

223 views

Category:

Documents


1 download

TRANSCRIPT

BizTalk Server 2002 Design and

Implementation XINCHEN

APress Media, LLC

BizTalk Server 2002 Design and Implementation Copyright ©2003 by Xin Chen

Originally published by Apress in 2003

All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.

ISBN 978-1-59059-034-8 ISBN 978-1-4302-1105-1 (eBook) DOI 10.1007/978-1-4302-1105-1

Thademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

Technical Reviewer: Gordon Mackie Editorial Directors: Dan Appleman, Gary Cornell, Jason Gilmore, Simon Hayes, Karen Watterson, John Zukowski Managing Editor: Grace Wong Project Manager: Sofia Marchant Development Editor: Andy Carroll Copy Editor: Ami Knox Compositor: Impressions Book and Journal Services, Inc. Indexer: Nancy Guenther Cover Designer: Kurt Krames Production Manager: Kari Brooks Manufacturing Manager: Tom Debolski Marketing Manager: Stephanie Rodriguez

The information in this book is distributed on an "as is" basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work.

For my father

Contents at a Glance

Foreword ............................................................ . xiii

About the Author ................................................... . xv

About the Technical Reviewer .................................... . xvi

Acknowledgments ................................................... . xvii

Chapter 1 Introduction to BizTalk Server 2002 .................. 1

Chapter 2 BizTalk Server 2002 Installation .................... 23

Chapter 3 Planning a BizTalk Server Solution ................. .45

Chapter 4 Starting with BizTalk Messaging ..................... 63

Chapter 5 Implementing BizTalk Orchestration ................. 121

Chapter 6 Configuring BizTalk Messaging for

Outgoing Documents .................................... 171

Chapter 7 Flat Files and Mapping ............................... 193

Chapter 8 Other BizTalk Server Features ....................... 219

Chapter 9 Advanced BizTalk Messaging Features ............... 239

Chapter 10 Advanced BizTalk Orchestration Features ........... 297

Chapter 11 BizTalk Server Programming .......................... 351

Chapter 12 Securing BizTalk Server ............................. .423

Chapter 13 Building an Effective BizTalk Application ........ 463

Chapter 14 Deployment Strategies and Solutions ............... 517

v

Chapter 15 BizTalk Server with Microsoft

Operations Manager .................................... 559

Appendix A Microsoft Message Queue ............................ .. 607

Appendix B BizTalk Server API Reference ........................ 645

Index ................................................................ 657

vi

Contents

Foreword ............................................................ . xzn About the Author ................................................... . xv About the Technical Reviewer .................................... . xvi Acknowledgments ................................................... . xvii

Chapter 1 Introduction to BizTalk Server 2002 ...... 1

What 1s BizTalk Server? ............................................. 1 BizTalk Server Quick Overview ...................................... 8 New Features in BizTalk Server 2002 .............................. 19 Summary ............................................................... 21

Chapter 2 BizTalk Server 2002 Installation .......... 23

BizTalk Server System Requirements ............................... 23 1nstalling BizTalk Server 2002 ................................... 27 Post-1nstallation Configuration ................................. .42 Summary ............................................................... 43

Chapter 3 Planning a BizTalk Server Solution ...... .45

Bob I s Plan ........................................................... 45

Mike I s To-Do List ................................................... 48

A BizTalk Server Solution ........................................ . 50 The BizTalk Server Solution in Detail ........................... 52 Summary ............................................................... 62

Chapter 4 Starting wi th BizTalk Messaging ........... 63

Document Speci ficat ion ............................................. 63

Ports and Channels .................................................. 78 Data Entry Points ................................................... 95

Summary ............................................................. . 120

vii

Contents

Chapter 5 Implementing BizTalk Orchestrat ion ...... 121

Designing Business Processes ..................................... 121 Implementing Business Processes ................................. 125 Executing Business Processes ..................................... 127 Bob I s Business Processes ......................................... 128 Building a Workflow from Scratch ................................ 129 Testing the Workflow .............................................. 164 Summary ............................................................. . 170

Chapter 6 Configuring BizTalk Messaging for Outgoing Documents ............................. 171

Returning Documents to Clients .................................. 171 Secure Communication with BizTalk Messaging ................... 175 Channels and Ports Revisited ..................................... 188 Summary .............................................................. 192

Chapter 7 Flat Files and Mapping ....................... 193

Creat ing Non-XML Document Specifications in XML BizTalk Editor ......................................... 193

Creat ing an XSL T File Using BizTalk Mapper ................... . 200 Defining a Flat File Envelope .................................... 214 Summary .............................................................. 217

Chapter 8 Other BizTalk Server Features ............. 219

Destination Protocols ............................................. 219 BizTalk Editor Features ........................................... 224 The While Shape in Orchestrat ion ................................ 226 More Functoid Examples ........................................... . 230 Summary .............................................................. 237

viii

Contents

Chapter 9 Advanced BizTalk Messaging Features .... 239

Using HTTP Receive Functions ..................................... 239 Using Open Destination Ports ..................................... 249 Using Open Source Channels ....................................... 253 Using Distribution Lists ......................................... 255 Tracking Documents ................................................. 258 Using Reliable Messaging ......................................... 273 Using the BizTalk SEED Package .................................. 282 Summary .............................................................. 296

Chapter 10 Advanced BizTalk Orchestration Features ...................... 297

Using Orchestrat ion Transactions (Short, Long, and Timed) ...................................... 297

Using XLANG Schedule Throttling ................................. 317 Dehydrating and Rehydrating XLANG Schedules ................... 321 Using Orchestrat ion Correlation ................................. 324 Using Dynamic Port Binding ....................................... 338 Using Web Services in BizTalk Orchestration .................. . 340 Summary ............................................................. . 350

Chapter 11 BizTalk Server Programming ................ 351

lnterchange lnterface ............................................. 351 AlC .................................................................. 358 BizTalk Tracking Object Model .................................... 389 BizTalk Messaging Configuration Object Model .................. 397 lWFWorkflowlnstance and lWFProxy ............................... .417 Summary .............................................................. 421

Chapter 12 Securing BizTalk Server ................... .423

BizTalk Server COM+ Application Security ...................... .423 Secu ring BizTalk Server Tools and Services ................... .434 Document ldenti fication .......................................... .443 Summary ............................................................. . 460

ix

Contents

Chapter 13 Building an Effective BizTalk Application ......................... .463

BizTalk Server Groups ............................................ .463 Resource Clustering .............................................. .471 MSMQ Message Size Limit and Its Implications for

BizTalk Server Development ................................... 482 BizTalk Server Application Design .............................. .492 Optimizing BizTalk Server ....................................... .499 Performance Moni toring ........................................... . 508 Handling Errors Effectively ..................................... . 509 Summary .............................................................. 515

Chapter 14 Deployment Strateg ies and Solutions ................................... 517

Deployment Overview ............................................... 517 Application Center Deployment .................................... 525 Script Deployment .................................................. 533 Summary .............................................................. 558

Chapter 15 BizTalk Server with Microsoft Operations Manager ........................... 559

Introducing MOM .................................................... 559 Setting Up MOM ..................................................... 561 Monitoring MOM .................................................... . 601

MOM Management Package ........................................... . 603

Summary ............................................................. . 606

Appendix A Microsoft Message Queue ................... . 607

MSMQ Overview ...................................................... . 607 Message Queuing .................................................... 613 MSMQ Programming Model ............................................ 617 New Features in MSMQ 3. O ......................................... 641 Addi tional Resources on MSMQ ..................................... 643

Summary .............................................................. 643

x

Contents

Appendix B BizTalk Server API Reference ............. 645

IInterchange Methods .............................................. 645 IBTSAppIntegration Method ........................................ 646 IPipelineComponent Methods ....................................... 646

IPipelineComponentAdmin Methods .................................. 646 IBTSCustomProcess Methods ........................................ 646 IBizTalkTrackData Methods ........................................ 647

IBizTalkConfig Methods ............................................ 647 IBizTalkChannel Properties ....................................... 648 IBizTalkChannel Methods ........................................... 649

IBizTalkDocument Properties ..................................... . 650 IBizTalkDocument Methods ........................................ . 650 IBizTalkOrganization Properties ................................. 651 IBizTalkOrganization Methods ..................................... 651

IBizTalkPort Properties ........................................... 652 IBizTalkPort Methods .............................................. 653

IBizTalkEnvelope Properties ...................................... 653

IBizTalkEnvelope Methods ......................................... 654 IBizTalkPortGroup Properties ..................................... 654

IBizTalkPortGroup Methods ........................................ 655 IWFWorkflowInstance Properties .................................. 655 IWFWorkflowInstance Method ....................................... 656 IWFProxy Properties ............................................... 656

Index .............................................................. 657

xi

Foreword

CREATING A COMPANY is a wonderfully precarious endeavor. In spearheading this effort, I had a mix of emotions: pride and excitement matched with fear; wide­eyed naivete anchored with plenty of lessons learned. All of the challenges of tuming an idea into tangible results, however, pale in comparison to breathing life into a nascent company while the world around you falls into chaos. This was the reality that we faced when we launched i-Deal LLC, a provider of new issue technologies to the global financial marketplace, in late August of 2001. We had worked through most of 200 1, starting development, securing partners and fund­ing, and trying to keep morale up while my staff sat shoulder to shoulder at card tables, pushing each other toward success. Less than a month later, all of our hard work almost ended on September Il, 2001, when we watched the World Trade Center burst into flarnes from our oftice window on Fulton Street and Broadway.

Life was uncertain after that. We didn't know whether our founding partners, Merrill Lynch, Salomon Smith Bamey, Thomson Financial, and Microsoft, would pull the plug, given most had suffered such devastating losses and had so much aftershock to deal with. To their credit, they kept our drearn alive and gave us the chance we needed to develop our platform and test the commercial waters with our software. Even more credit is to be given to the dozen of employees and con­sultants, Xin Chen being one of them, who carne back to work across the street from Ground Zero every day to finish the job that they started. We worked side by side, supported one another, and immersed ourselves in our work, trying to erase images of madness and shards of a once mighty edifice.

Today our company is alive and well, almost 180 strong, and back on track to meet the challenge of delivering the world's only global new-issue platform that supports equities, fixed income, and municipal offerings. Delivering on such a wide and complex mandate is a tall order. First and foremost, our clients are the brokerage firms whose bread and butter is the new issue business. It is their crown jewel, so nothing but the best, most efticient solution would be sufficient to meet their heavy global demands. Second, as a business that is an ASp, we have to give our clients the comfort that their information is secure, yet readily acces­sible to only authenticated users. Third, we had to have the ability to map their proprietary business processing to our internal business processes and make the integration and data exchange seamless. The new issue business, by nature, involves a "syndicate" that needs to collaborate in order to execute a transaction. Whether the requirement is pure data exchange or system-to-system interoperability, data exchange needs to be robust, flexible, secure, and redundant. We chose BizTalk Server to meet this business need.

xiii

Foreword

xiv

Xin was one of the key developers who utilized BizTalk Server to enable our clients to map large feeds of standing data and historical information, and he paved the way for what ultimately became our straight -through -processing solution. BizTalk Server and BizTalk Orchestration allow i-Deal to react to our clients' diverse business needs and processing requirements. It allows our com­pany to easily deploy and manage integrated solutions, which is the lifeblood for an ASP business model with a client base of financial institutions. Xin was instru­mental in delivering our solution-his discovery and thoughtfulleadership allowed us to simplify many tasks that are typically complex and time consum­ing, thus minimizing project risks.

When Xin contacted me about writing the foreword for his book, the tirst thought that came to mind was, "When did he find the time to write a book? He was always working!" Then I thought about it further and it was clear that he had always been consumed by the adventure of learning and teaching, and it alI made perfect sense. His dedication to his craft has always been unquestioned and unequaled. Ris ability to break down a problem set into manageable tasks and deliver an easily understood solution has always been his strength. The reader of this book will tind more of the same.

Prank LaQuinta ChiefTechnology Officer i-DealUC New York City, New York September 18, 2002

About the Foreword Writer

Frank LaQuinta is a tinancial services technology veteran with over 18 years of experience. Frank has been i-Deal's chieftech­nology officer from the company's inception. In addition to having the responsibility for i-Deal's technology strategy and vision, Frank oversees the day-to-day development and imple­mentation of the tirm's core initiatives.

Previously, Frank led technology product management and development for e-syndicate activity at Merrill Lynch's Direct Markets (MLX) institutional e-commerce group. In addition, he was responsible for building the original suite of new issuance technology that is the framework of i -Deal's platform.

Frank eamed his BBA and MBA in information systems from Pace University.

About the Author

Xin eben is a solution development consultant at Avanade Ca joint venture between Microsoft and Accenture). His pro­fessional career has been focused on Web and B2B application development with Microsoft technology from the old DNA days to the developments of .NET today. Chen is very proud that he designed and built the very first BizTalk Server

application for the U.S. financial industry, a chance that comes only once a life­time. He is also a contributing author of BizTalk Server: The Complete Reference. Xin Chen holds MCSD, MCSE, and MCDBA certifications. He earned his MS in statistics from Columbia University.

xv

xvi

About the Technical Reviewer

Gordon Mackie works as a senior developer consultant for The Mandelbrot Set (nowpart ofCharteris pIc). Re has worked with Visual Basic from the early days, mostly at the coalface as a contract programmer for various banks and large corpo­rations, but also as a trainer and consultant. Re recently spent 8 months working at Microsoft on .NET projects. Gordon can be reached at gordon. [email protected].

Acknowledgments

1 FIRST THOUGHT about writing a BizTalk Server book when I rolled off a project at i -Deal where I was helping to build a BizTalk Server application. I've seen what BizTalk Server offers firsthand and have come to appreciate it. I've also seen many people reject BizTalk Server based on their lack of knowledge about the product. That's when I decided to write a book to tell the story of what I leamed about BizTalk Server.

BizTalk Server introduced many new concepts for building an application compared to other server products out there. I felt that the traditional "manual­style" writing wouldn't deliver these concepts efficiently, since many of BizTalk Server's features and their applications are rather difficult to grasp at first glance. The book would be much more comprehensible if I could talk about these fea­tures in a context that alIowed readers to come to understand not only each aspect of BizTalk Server but also how they alI fit together in the overalI picture. So I carne up with a fictitious story of two characters and a project to make learning BizTalk Server an enjoyable experience.

Writing a book is a long process and requires great dedication. However, it has never entered my mind that it's tiresome work. I guess that perception is due to a familiar influence. My father wrote several books when I was still in elemen­tary school. He was always writing and rarely played with me. In the mind of a 6-year-old child, that seemed like it was so much fim. Many years later, I found myself doing the exact sarne thing. That's just one more instance of something you find out later in life that confirms your parents are always right.

In process of bringing this book to you, many people have spent a consider­able arnount of effort. I want to thank Karen Watterson for her unreserved support and dedication to my book; Andy Carroll for agreat job editing my book to make it more enjoyable to read; Gordon Mackie for helping ensure the techni­cal accuracy of each chapter and providing a number of great ideas that I have included in the book; Sofia Marchant for ensuring an effective collaboration arnong author, editors, and reviewers during the whole process; and Ami Knox, Karl Brooks, and many other Apress professionals for working hard together to make this book possible. I also want to give special thanks to Frank LaQuinta for writing such a wonderful and resonating foreword and for providing me an invaluable opportunity from which my experiences in BizTalk Server originated, and Ralph Foster, a good friend and admirable colleague, for mentoring me on BizTalk Server and many other technologies of personal interest.

xvii