WCF LOB SDK from CodeMastery

23

Click here to load reader

Transcript of WCF LOB SDK from CodeMastery

Page 1: WCF LOB SDK from CodeMastery

EXPLORING THE WCF LOB SDKBEN CLINESr. Consultant, BizTalk MVP

Page 2: WCF LOB SDK from CodeMastery

About Ben Cline – [email protected]

Speaker Profile• Sr. Consultant• Work on BizTalk, WF,

WCF, SharePoint projects

• Blog: msinnovations.spaces.live.com

Community Focuses• BizTalk MVP 2009-

2010• MSDN Forums

Poster, Moderator• Active in testing

Connect releases – VS 2010

Page 3: WCF LOB SDK from CodeMastery

Objectives and Takeaways• Introductions • Overview of the WCF LOB SDK• Demo - SqlBinding• Architecture of the SDK• Enterprise LOB and Generic Datasource Scenarios• Demo - SalesForceBinding

Page 4: WCF LOB SDK from CodeMastery

OVERVIEW OF THE WCF LOB SDK

Page 5: WCF LOB SDK from CodeMastery

What is the WCF LOB SDK?• Free Toolkit from Microsoft based on WCF

custom bindings• Provides client manageability, usability

improvements for using custom bindings• LOB = [classic ERP] datasource • Can be used for any system that needs to

provide metadata or context to developers• Architectural foundation for BizTalk Adapter Pack

Page 6: WCF LOB SDK from CodeMastery

What is provided?• VS client-side integration• Wizards for creating custom binding adapters

(Code gen)• Metadata explorer• WCF Service wrapper extension• SDK, samples• Add custom binding to machine.config code• Setup project example

Page 7: WCF LOB SDK from CodeMastery

Comparing WCF and WCF LOB SDK

WCF• Service, client• Default, standard

bindings• Custom bindings based

on binding elements• Add Service Reference• .NET compatible config

file elements

WCF LOB SDK• Adapter, client, optional

service• Custom bindings based

on binding elements• Add Adapter Service

Reference• .NET compatible config

file elements

Page 8: WCF LOB SDK from CodeMastery

Demo - Using the sqlBinding in VS 2008

Observations• Wizard-like form similar to Add Service Ref• Object browser enables quick selection of

datasource objects• After wizard executes, new proxy class added• DataContracts created for parameters, results• When used with BizTalk, XSDs are generated• Proxy generation options like with SvcUtil

Page 9: WCF LOB SDK from CodeMastery

Web Service

BizTalk ServerBizTalk WCF

Adapter

WCF Channel Model

WCF Service Model

WCF Transport

(HTTP, TCP, …)

WCF

Custom.NET

Application

SharePointServer

ASP.NET 2.0

WCF LOB Landscape

SAP Adapter

Adapter SDK

RuntimeSQL

Adapter

Adapter SDK Runtime

Oracle DBAdapter

Adapter SDK Runtime

SQLServer

ADO.NETProvider

SAP Siebel Oracle DBAny LOB System

Any LOBAdapter

Adapter SDK

Runtime

Page 10: WCF LOB SDK from CodeMastery

Questions?

FAQ:• What about VS 2010 support?• The add adapter service reference not showing

up after install. Why?• Compatible w/ EF?

Page 11: WCF LOB SDK from CodeMastery

ENTERPRISE LOB & GENERIC DATASOURCE SCENARIOS

Page 12: WCF LOB SDK from CodeMastery

Enterprise LOB Scenario• Enterprise system storing data: SAP, Oracle,

PeopleSoft, Siebel, CRM, etc.• System-specific formats, connectivity, supporting

infrastructure• WCF LOB SDK provides foundation for custom

bindings/adapters based on your code:– Example: Custom Oracle binding from WCF LOB SDK +

ODP.Net APIs

• WCF LOB SDK service wrapper acts as protocol transition/bridge layer

Page 13: WCF LOB SDK from CodeMastery

Generic Datasource Scenario• LOB<T> where T : YourDataSource• Foundation for exposing data or O/R layer• Middle tier service layer• CSLA service layer

Page 14: WCF LOB SDK from CodeMastery

Other Uses for the SDK• Client for connecting to ESB or SOA resources• Light weight UDDI explorer• Centralize connectivity management• Client for missing VS functionality – for

referencing Web 2.0 services

Page 15: WCF LOB SDK from CodeMastery

Questions?

FAQ:• What are the licensing terms of the BizTalk

Adapter Pack?• What do you mean by “protocol transition” or

“protocol bridging”?

Page 16: WCF LOB SDK from CodeMastery

ARCHITECTURE OF THE WCF LOB SDK

Page 17: WCF LOB SDK from CodeMastery

Run Time

WCF Application

Design Time

Tracing/Perf Counters

MetadataExchanger

Adapter MetadataUtility Tool

Connection URI Builder

WCF Connection

Connection PoolManagement

MetadataManagement

WSDLBuilder

MetadataBrowse/Search

Channel Implementation

Component Architecture

Page 18: WCF LOB SDK from CodeMastery

WCF LOB SDK Development Lifecycle• Wizard based metadata code generation• Setup projects based on samples• Connection, URI, Property Grid Type Editors• Binding Elements if required• Metadata Browser and Search• WSDL customizations

Page 19: WCF LOB SDK from CodeMastery

Demo – SalesForce CustomBinding• No supported SalesForce VS extension

currently was available• SalesForce provides REST and SOAP APIs

but has specialized implementation• Async operations only exposed on REST,

would be useful if called via SOAP and bridged from REST

Page 20: WCF LOB SDK from CodeMastery

APPENDIX

Page 21: WCF LOB SDK from CodeMastery

Example of a custom binding (WCF)<configuration> <system.serviceModel> <bindings> <customBinding> <binding name="myBinding"> <textMessageEncoding

messageVersion="Soap11" /> <httpTransport /> </binding> </customBinding> </bindings> <services> <service behaviorConfiguration="WcfServiceLibrary1.Service1Behavior"

name="WcfServiceLibrary1.Service1"> <endpoint address="" binding="customBinding" bindingConfiguration="myBinding" contract="WcfServiceLibrary1.IService1"> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/" /> </baseAddresses> </host> </service> </services>

Page 22: WCF LOB SDK from CodeMastery

Comparing WCF LOB with BizTalk

WCF LOB SDK• Custom Binding centric• Custom Bindings shown

in Add Adapter Service wizard

• .NET project: add adapter service

• Generates client proxy

BizTalk• Adapter centric• Custom Bindings shown

in WCF-Custom adapter• BizTalk project: Add

generated items \ consume adapter service

• Generates BizTalk schema, binding file

Page 23: WCF LOB SDK from CodeMastery

Resources• WCF LOB SDK for VS 2008 (Get SP2

separately):• http://www.microsoft.com/downloads/

details.aspx?FamilyID=56278fde-b708-469c-987e-ded9c6c5e580&DisplayLang=en

• Links to Documentation, Webcasts: http://msinnovations.spaces.live.com/blog/cns!62E68922E47BC425!1169.entry