46
Birds of the Same Feather – BizTalk and WCF K.Meena Director SymIndia Training & Consultancy Pvt Ltd Session Code:

Birds Of The Same Feather   Biz Talk Server And Wcf

Embed Size (px)

Citation preview

Page 1: Birds Of The Same Feather    Biz Talk Server And Wcf

Birds of the Same Feather – BizTalk and WCF

K.Meena Director SymIndia Training & Consultancy Pvt LtdSession Code:

Page 2: Birds Of The Same Feather    Biz Talk Server And Wcf

Agenda

OverviewWCFBizTalk

WCF-BizTalk IntegrationIntegration Scenarios

WCF Send AdaptersWCF Receive AdaptersSpecific Use cases

Page 3: Birds Of The Same Feather    Biz Talk Server And Wcf

Objectives & Pre-requisites

ObjectivesFocus on Integration issues Present many scenarios of integration

Pre-requisitesKnowledge in designing and developing with

WCF BizTalk

Page 4: Birds Of The Same Feather    Biz Talk Server And Wcf

Agenda

OverviewWCFBizTalk

WCF-BizTalk Integration ArchitectureIntegration Scenarios

WCF Send AdaptersWCF Receive AdaptersSpecific Use cases

Page 5: Birds Of The Same Feather    Biz Talk Server And Wcf

WCF Service

‘Client’Message

Message

Services pass messages described by a contractService may provide metadata

Describing the contractDescribing the policy it applies to communication

‘Service’

Metadata

Message (SOAP)

Headers: Addressing, Security, etc

Body: Payload

Page 6: Birds Of The Same Feather    Biz Talk Server And Wcf

What do I send?

Where do I send it?

How should I send it?

Contract

Address

Binding

Mechanics of Communication

‘Service’‘Client’

Transport?

Encoding?

Security?

Page 7: Birds Of The Same Feather    Biz Talk Server And Wcf

Mechanics of Communication

‘Service’‘Client’

Endpoint

ContractBindingAddress

EndpointContractBindingAddress

EndpointContractBindingAddress

Page 8: Birds Of The Same Feather    Biz Talk Server And Wcf

WCF Runtime Architecture

Page 9: Birds Of The Same Feather    Biz Talk Server And Wcf

Agenda

Architectural OverviewWCFBizTalk

WCF-BizTalk IntegrationIntegration Scenarios

WCF Send AdaptersWCF Receive AdaptersSpecific Use cases

Page 10: Birds Of The Same Feather    Biz Talk Server And Wcf

BizTalk Message Flow

Decrypt ParseResolve

Party

Message BoxDatabase

SerializeSign

Encrypt

ReceiveAdapter

SendAdapter

Receive Pipeline Send Pipeline

Orchestration

Receive Location Send Port

ManagementDatabase

TrackingDatabase

XML,Flat File,Binary

XML,Flat File,

Binary

Receive Port Send Port Group (optional)

XML

Page 11: Birds Of The Same Feather    Biz Talk Server And Wcf

Agenda

Architectural OverviewWCFBizTalk

WCF-BizTalk IntegrationIntegration Scenarios

WCF Send AdaptersWCF Receive AdaptersSpecific Use cases

Page 12: Birds Of The Same Feather    Biz Talk Server And Wcf

WCF and BizTalk Server Together

OrderPlaceme

nt

BidEvaluatio

n

OrderReceivin

g

JobCosting

CapacityPlanningBizTalk

Server

Page 13: Birds Of The Same Feather    Biz Talk Server And Wcf

Integration – How?

BizTalk Extensibility Point Adapter Framework

WCF send and receive facilities are exposed ( to and from) BizTalk

through a set of adapters

Page 14: Birds Of The Same Feather    Biz Talk Server And Wcf

BizTalk Pipeline

WCF Adapter Runtime ArchitectureCh

anne

l St

ack

Ope

ratio

n /

Rece

ive

Loca

tion

WCF

Ser

vice

Hos

t

Channel Stack

WCF Client

Send PortBizTalk WCF Receive Adapter

BizTalk WCF Send Adapter

Message Box

Orchestrations

BizT

alk

Pipe

line

WCF as Adapter for BizTalkC

hann

el

Sta

ck

WC

F S

ervi

ce H

ost

Op

era

tion

/R

ece

ive

Lo

catio

n

Biz

Talk

Pip

elin

e BizTalk P

ipeline

Send P

ort

WC

F C

lient

Channel S

tack

Page 15: Birds Of The Same Feather    Biz Talk Server And Wcf

WCF Adapter Core Features

Seven traditional BizTalk adaptersWCF-BasicHttpWCF-WsHttpWCF-NetTcpWCF-NetMsmqWCF-NetNamedPipeWCF-CustomWCF-CustomIsolated

UI Ensures ease of use and minimizes potential for mis-configuration

WCF as Adapter for BizTalk

Page 16: Birds Of The Same Feather    Biz Talk Server And Wcf

The Flow

Page 17: Birds Of The Same Feather    Biz Talk Server And Wcf

Complementary Support

WCFplatform for building services on WindowsSupport for Standard communication protocols for services on Windows

BizTalkStandards based Integration and BPM Server for WindowsInfrastructure for orchestrating and extending WCF services

Page 18: Birds Of The Same Feather    Biz Talk Server And Wcf

Use Cases

Exposing BizTalk orchestration as a WCF serviceConsuming a WCF service from BizTalk orchestration Transactional Receive and SendUsing Headers

WS-* headers for routing and message processing Custom headers

Using BizTalk as SOAP intermediary

Page 19: Birds Of The Same Feather    Biz Talk Server And Wcf

Use Cases

Using custom binding elements Using custom bindings Using BizTalk dynamic send ports Consuming a WCF Service originating from WCF-LOB Adapter (SAP, Siebel, Oracle DB, and Tibco RV)

Page 20: Birds Of The Same Feather    Biz Talk Server And Wcf

Wizards

Publishing wizardPublish WCF http service in IISPublish metadata for in-proc or out-of-proc adapter to IIS

Consuming wizardCreate message and port typesCreate a proxy equivalent

Bindings fileOperation to action mapping

Integration Made Easy

Page 21: Birds Of The Same Feather    Biz Talk Server And Wcf

Agenda

OverviewWCFBizTalk

WCF-BizTalk IntegrationIntegration Scenarios

WCF Send AdaptersWCF Receive AdaptersSpecific Use cases

Page 22: Birds Of The Same Feather    Biz Talk Server And Wcf

Scenario: Consuming WCF Service

Order Service(WCF)BizTalk

Messaging

EndpointEndpointContractContractBindingBindingAddressAddress

BasicHttpBinding

Send Port Config.ContractBindingAddress

WCF Service Consuming Wizard

Schema Info, Send Port Config. Info

Page 23: Birds Of The Same Feather    Biz Talk Server And Wcf

BizTalk Consuming WCF ServiceK. MeenaDirectorSymIndia Training & Consultancy Pvt Ltd

Page 24: Birds Of The Same Feather    Biz Talk Server And Wcf

Scenario: Publish Orchestration as WCF Service

WCF ClientBizTalk

OrchestrationBasicHttpBinding

Receive Lcation Config.ContractBindingAddress

ProxyABC Details

WCF Service Publishing Wizard

SVC Util

Endpoint Info in IIS

Page 25: Birds Of The Same Feather    Biz Talk Server And Wcf

Orchestration as WCF ServiceK. MeenaDirectorSymIndia Training & Consultancy Pvt Ltd

Page 26: Birds Of The Same Feather    Biz Talk Server And Wcf

Scenario Requirement

Client App coordinates a Distributed Transaction

WCF as Resource ManagerBizTalk WCF Receive Adapter as RM

Transaction committed only whenWCF service commitsBizTalk WCF adapter commits

Usage of Custom Pipeline component to abort transactions

Page 27: Birds Of The Same Feather    Biz Talk Server And Wcf

Transactions start and end at the message box

WCF Adapter WCF AdapterClientApp

Transaction Boundary Transaction Boundary

Message Box

subscribepublish

Scenario: Distributed Transactioning

Page 28: Birds Of The Same Feather    Biz Talk Server And Wcf

Transactional Scenarios: Two-Way

Transactions start and end at the message box

WCF Adapter WCF AdapterClientApp

Transaction Boundary Transaction Boundary

Message Box

Distributed Transactioning

Page 29: Birds Of The Same Feather    Biz Talk Server And Wcf

Place Order Client

Start Txn

WCF Service

BizTalk Server R2 WCF Adapter

Archiving

QueueCommit

Commit

Commit

Transaction Commited

Page 30: Birds Of The Same Feather    Biz Talk Server And Wcf

Place Order Client

WCF Service

Demo Overview (Abort)

BizTalk Server R2w/WCF Adapter

Archiving

QueueCommit

Abort

Abort

Start TxnAbort

Transaction Aborted

Page 31: Birds Of The Same Feather    Biz Talk Server And Wcf

Distributed TransactioningK. MeenaDirectorSymIndia Training & Consultancy Pvt Ltd

Page 32: Birds Of The Same Feather    Biz Talk Server And Wcf

ScenarioExisting WCF Service

TransactionFlow is mandatoryTransactionScope is required for “PlaceOrder” method

‘PlaceOrder’ method If message header “BeginNewPO” exists, create a key randomly and insert PO into PO tableOtherwise, Insert lineItem details in message to PODetails table

BizTalk Send Port emits a single documentPO master detailsMultiple PO LineItem details

Page 33: Birds Of The Same Feather    Biz Talk Server And Wcf

Requirement

Need to split the single BizTalk documentCreate WCF message with header for PO master detailsCreate Multiple WCF messages, one for each Line item

Initiate a transactionAs part of the same transaction

Send WCF message with PO headerSend WCF messages for each Line Item

Page 34: Birds Of The Same Feather    Biz Talk Server And Wcf

Solution

Create a Custom Binding Element in WCFWCF Message InterceptionSplit WCF Message into

Single message for Order headerMultiple messages , one for every Line Item in the orderSubmit the messages one by one

Create a Custom Binding in BizTalk Send Port Use WCF-Custom adapterConfigure binding

Custom Interceptor, Transaction FlowEncoderTransport

Page 35: Birds Of The Same Feather    Biz Talk Server And Wcf

Scenario: Custom Binding Element

WCF ServiceBizTalk

Messaging WCF-Custom Inproc adapter

CustomBinding=WCFMsgInterceptor,

TransactionFlowText Msg Encoding,

Http Transport

Contract

Send Port Config. Custom

BindingAddress

WCF Service Consuming Wizard

SVC Util

Endpoint Info in IIS

Custom

Binding

Page 36: Birds Of The Same Feather    Biz Talk Server And Wcf

WCF Adapter configured with Custom Binding Element K. MeenaDirectorSymIndia Training & Consultancy Pvt Ltd

Page 37: Birds Of The Same Feather    Biz Talk Server And Wcf

Requirement

Orchestration exposed as a WCF service endpointSecured Access to a BizTalk Receive Location

Configurable Windows groups

Write a WCF Custom Behaviour anduse it while configuring BizTalk Receive location

Page 38: Birds Of The Same Feather    Biz Talk Server And Wcf

Scenario: Custom Behaviour

WCF Client

BizTalk Orchestration

Contract

Receive Location Config. WSHttop

BindingAddress Behavior

Custom Behavior

For access check

Page 39: Birds Of The Same Feather    Biz Talk Server And Wcf

WCF Adapter with Custom BehaviorK. MeenaDirectorSymIndia Training & Consultancy Pvt Ltd

Page 40: Birds Of The Same Feather    Biz Talk Server And Wcf

Message Encoding

By themselves, WCF and BizTalk add significant valueIntegrating them provides enhances the valueLeveraging Scenarios

WS-* standards support of WCF in BizTalkWCF extensibility scenarios are easy configurable in BizTalkBizTalk as a Broker for WCF Services to communicate

Summary

Page 41: Birds Of The Same Feather    Biz Talk Server And Wcf

धन्यवा�दઆભા�ર ধন্য�বা�দ

ਧੰ�ਨਵਾ�ਦ

ଧନ୍ୟ�ବା�ଦ

நன்றி�

ధన్య�వాదాలు� ಧನ್ಯ�ವಾ�ದಗಳು

നി�ങ്ങള്‍‌ക്ക്� നിന്ദി�

Page 42: Birds Of The Same Feather    Biz Talk Server And Wcf

question & answer

Page 43: Birds Of The Same Feather    Biz Talk Server And Wcf

Related Content

Solving Enterprise Integration Challenges with BizTalkTuning BizTalk Server 2009 for Better PerformanceThe Intricacies of Enterprise Integration : SOA vs. ESB

Page 44: Birds Of The Same Feather    Biz Talk Server And Wcf

Resourceshttp://www.microsoft.com/downloads/details.aspx?familyid=a976dc7d-2296-4f88-be4d-0d314fca9e59&displaylang=en&tmhttp://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=13d6121d-c82b-4614-a160-7c88bcc037b7http://seroter.wordpress.com/2008/01/31/article-series-on-biztalk-and-wcf-part-i-operation-patterns/http://www.microsoft.com/downloads/details.aspx?familyid=70BADD79-CE7E-4CCB-BE5C-3FF74CA3A8C4&displaylang=enhttp://msdn.microsoft.com/en-us/library/cc952299.aspxhttp://msdn.microsoft.com/en-us/library/dd379134.aspxhttp://msdn.microsoft.com/en-us/library/cc950532.aspxhttp://msdn.microsoft.com/en-us/library/bb967002.aspx

Page 45: Birds Of The Same Feather    Biz Talk Server And Wcf

Track Resources

Resource 1

Resource 2

Resource 3

Resource 4

Page 46: Birds Of The Same Feather    Biz Talk Server And Wcf

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,

IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.