1. Exploring the WCF LOB SDK Ben Cline Sr. Consultant at Magenic, BizTalk MVP
2. About Me – BenC@magenic.com 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, BizTalk 2009, 2010
3. Agenda 1 Overview of the WCF LOB SDK 2 Demo – SqlBinding 3 Enterprise LOB and Generic Scenarios 4 Architecture of the SDK 5 Demo - SalesForceBinding
4. 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
5. 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
6. Example of a custom binding (WCF) <configuration> <system.serviceModel> <bindings> <customBinding> <binding name="myBinding"> <textMessageEncodingmessageVersion="Soap11" /> <httpTransport /> </binding> </customBinding> </bindings> <services> <service behaviorConfiguration="WcfServiceLibrary1.Service1Behavior" name="WcfServiceLibrary1.Service1"> <endpoint address="" binding="customBinding" bindingConfiguration="myBinding" contract="WcfServiceLibrary1.IService1"> </endpoint>…
7. Bindings, bindings everywhere basicHttp Web ServiceRelated wsHttp wsFed wsContext Not Web Service Related netMSMQ SqlBinding OracleBinding msmqInt More Common Use Less Common Use
8. WCF vs. WCF LOB SDK WCF WCF LOB SDK Service, client Default, standard bindings Custom bindings based on binding elements Add Service Reference .NET compatible config file elements Adapter, client, optional service Custom bindings based on binding elements Add Adapter Service Reference .NET compatible config file elements
9. WCF Channel Model WCF Binding/Adapter Landscape WCF Service Model SharePoint Server BizTalk Server SQL Server Custom .NET Application ASP.NET 2.0 ADO.NET Provider BizTalk WCF Adapter WCF Adapter SDK Runtime Adapter SDK Runtime Adapter SDK Runtime Adapter SDK Runtime WCF Transport (HTTP, TCP, …) SQLAdapter Oracle DB Adapter SAP Adapter Any LOB Adapter Web Service Siebel Oracle DB SAP Any LOB System
10. Questions? FAQ: What about VS 2010 support? The add adapter service reference not showing up after install. Why? Compatible w/ EF? Isn’t this just another way to call the database?
11. Agenda 1 Overview of the WCF LOB SDK 2 Demo – SqlBinding 3 Enterprise LOB and Generic Scenarios 4 Architecture of the SDK 5 Demo - SalesForceBinding
12. 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
13. Agenda 1 Overview of the WCF LOB SDK 2 Demo – SqlBinding 3 Enterprise LOB and Generic Scenarios 4 Architecture of the SDK 5 Demo - SalesForceBinding
14. 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
15. Generic Datasource Scenario LOB<T> where T : YourDataSource Foundation for exposing data or O/R layer Middle tier service layer CSLA service layer API obfuscation
16. 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 Extend existing features of BizTalk Adapter Pack
17. Questions? FAQ: What are the licensing terms of the BizTalk Adapter Pack? What do you mean by “protocol transition” or “protocol bridging”?
18. Agenda 1 Overview of the WCF LOB SDK 2 Demo – SqlBinding 3 Enterprise LOB and Generic Scenarios 4 Architecture of the SDK 5 Demo - SalesForceBinding
19. Component Architecture WCF Application Adapter MetadataUtility Tool Run Time Design Time Channel Implementation Tracing/Perf Counters MetadataExchanger Connection URI Builder Connection PoolManagement WSDLBuilder MetadataBrowse/Search MetadataManagement WCF Connection
20. WCF & LOB SDK Namespaces Channels Common System.ServiceModel Configuration Description Common Microsoft.ServiceModel Channels Tools.MetadataSearchBrowse
21. WCF LOB SDK Development Lifecycle Wizard based metadata code generation Setup projects based on samples Connection, URI, Property Grid Type Editors Connectivity Logic to Integrate with Target System(s) Binding Elements if required Metadata Browser and Search Proxy and XSD type generation customization
22. Agenda 1 Overview of the WCF LOB SDK 2 Demo – SqlBinding 3 Enterprise LOB and Generic Scenarios 4 Architecture of the SDK 5 Demo - SalesForceBinding
23. Demo – SalesForceCustomBinding Why create a SalesForce binding? 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 What does this demonstrate? Property grid customizations make for better UI Experience .NET invocation helpful for BizTalk Little code required to generate proxy, XSDs
24. Appendix
25. Comparing WCF LOB with BizTalk WCF LOB SDK BizTalk Custom Binding centric Custom Bindings shown in Add Adapter Service wizard .NET project: add adapter service Generates client proxy Adapter centric Custom Bindings shown in WCF-Custom adapter BizTalk project: Add generated items consume adapter service Generates BizTalk schema, binding file
26. Comparing Adapter Models Adapter Framework Adapter WCF LOB SDK Adapter No built-in code gen Limited VS integration Simpler development process Requires .NET wrapper for non BizTalk invocation Built-in code gen More extensive VS integration More complicated development process Callable directly from .NET assemblies
27. 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
Hinweis der Redaktion
Brackets show the “classic ERP” part of the datasource is optionalWhy have I not heard of this before? - Probably because it is so closely related to BizTalk or because it has not been merged into System.ServiceModel and the core .NET framework.
- If you have tried creating a custom binding on your own you know it requires quite a bit of custom code for implementing the channels, extension behaviors (if necessary), binding elements, etc., and any deployment related artifacts. Doing all of these steps involved quite a bit of work and was almost prohibitively costly for the relatively low gain of the custom binding. With the SDK it is much easier to create a custom binding in a few hours. - Some of the things provided here would be useful just for harvesting and incorporating in your own projects.
Notice the difference in terminology regarding the service. An adapter is another name for a custom binding. In the BizTalk sense a custom binding functions similar to a custom adapterBuilt on some of the familiar things from .NET and extended just a little.
This demo shows use of the sqlBinding which is in the BizTalk adapter pack but illustrates what can be done with a custom binding created through the WCF LOB SDK.
With .NET 4, protocol transitioning or bridging is provided out-of-the-box, and you do not need to expose one service to feed off some other one, effectively wrapping the logic twice. The WCF LOB SDK service wrapper provides a rudimentary similarity – you only expose one service.