190 likes | 311 Views
Module 14: WCF Send Adapters. Overview. Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from Orchestrations Lesson 4: WCF Send Adapter Security. Lesson 1: Introduction to WCF Send Adapters. WCF Send Adapter Scenarios
E N D
Overview • Lesson 1: Introduction to WCF Send Adapters • Lesson 2: Consuming a Web Service • Lesson 3: Consuming Services from Orchestrations • Lesson 4: WCF Send Adapter Security
Lesson 1: Introduction to WCF Send Adapters • WCF Send Adapter Scenarios • WCF Send Adapter Architecture
WCF Send Adapter Scenarios Microsoft BizTalk Server 2010 Partner Supply Chain System Query Warehouse DB for inventory Send Invoice to Web Service Atomic Transaction Oracle DB Send PO to Vendor and to Purchasing DB Vendor Web Service SQL Server 2008
WCF Send Adapter Architecture Send Port PO Message Send Adapter WCF Channel SendPipeline Channel Layer Map MessageBoxDatabase
Lesson 2: Consuming a Web Service • Steps for Consuming a Web Service • The BizTalk WCF Service Consuming Wizard • Demonstration: Consuming a Web Service
Steps for Consuming a Web Service Running the BizTalk WCF Service Consuming Wizard Consumes a WSDL document Generates XML schemas and orchestration type definitions Generates bindings files Generated files added to a Visual Studio 2010 BizTalk Project Add Generated Item : Consume WCF Service 1 Complete the BizTalk WCF Service Consuming Wizard 2 Build and Deploy the Project 3 Import Generated Binding File 4
The BizTalk WCF Service Consuming Wizard Complete the BizTalk WCF Service Consuming Wizard Add Generated Item : Consume WCF Service 2 1
Demonstration: Consuming a Web Service In this demonstration, you will see how to: • Run the WCF Service Consuming Wizard • Deploy the Generated Schemas • Import the Generated WCF Send Port Binding
Lesson 3: Consuming Services from Orchestrations • Steps for Consuming a Service from an Orchestration • Mapping Operations to Actions • Formatting the Request Message • Selecting Content from the Response Message • Demo: Consuming a Service from an Orchestration
Steps for Consuming a Service from an Orchestration Calling a Web Service from an Orchestration A web service is represented as an orchestration send port Each web service operation maps to a send port operation Type definitions created by WCF Service Consuming Wizard Create a new configured port in the orchestration 1 Define message variables of the generated types 2 Construct the web service request message 3 Connect send and receive shapes to the new port 4
Mapping Operations to Actions SOAP Action Header Required header in request message Value that corresponds to the service operation being called Configure with a simple string if send port always calls the same operation Otherwise, configure with a list of operation names and corresponding actions
Formatting the Request Message Outbound Message Body Default is to send BizTalk Message as body of the SOAP message Use the Template option to customize the SOAP message body Template Option Requires a template that defines a wrapper for the BizTalk message body Use the bts-msg-body element to specify the location of BizTalk message body Can specify encoding of XML node Resulting XML is used as SOAP body
Selecting Content from the Response Message Propagate fault message Option to publish detailed fault messages to the MessageBox Default is a generic error message
Demo: Consuming a Service from an Orchestration In this demonstration, you will see how to: • Set up a Web Service Call in the Orchestration Designer
Lesson 4: WCF Send Adapter Security • Configuring WCF Send Adapter Security • Configuring WCF-Custom Send Adapter Security
Configuring WCF Send Adapter Security Transport Specific Adapters Select a Security mode Configure properties required by mode Username Credentials Can assign a set of static credentials to be used for all messages Use Single Sign-On to allow BizTalk to look up user’s credentials for each message
Configuring WCF-Custom Send Adapter Security WCF-Custom Security Options Credentials Tab User name and password Single Sign-On Proxy credentials for http(s) Behavior Tab Use for other types of client credentials Must configure WCF endpoint behavior
Lab: Calling a Web Service from an Orchestration • Exercise 1: Set up a web service call in the Orchestration Designer • Exercise 2: Configure the Orchestration and Send Ports • Exercise 3: Test the Orchestration