340 likes | 581 Views
WEB 312 Integrating Applications With UDDI Services. Andy Milligan Program Manager UDDI Services, Windows Server Microsoft Corporation. Agenda. UDDI update Publishing Web services Registration modeling Programmatic registration Consuming Web services Design/configuration time discovery
E N D
WEB 312Integrating Applications With UDDI Services Andy Milligan Program Manager UDDI Services, Windows Server Microsoft Corporation
Agenda • UDDI update • Publishing Web services • Registration modeling • Programmatic registration • Consuming Web services • Design/configuration time discovery • Runtime discovery • Discovery for reliability • Customizing the UDDI experience • Next steps and discussion
UDDI update • Universal Description Discovery and Integration • Web services standard • Data model for storing providers and their services • SOAP API for searching and publishing • Integrated into many tools such as Visual Studio .NET, Microsoft Office • Enterprise UDDI Services • Integrated component of Windows Server 2003 • Built in C# on .NET Framework 1.1, Internet Information Server 6.0, and SQL Server 2000 • Active Directory for roles, authentication and server registration
Publishing Web Services • Variety of applications are / will be exposing Web services • ISV server application • In-house deployed applications • In-house wrapped LOB application • Motivations for publishing to UDDI • Predictable, centralized rendezvous point for services and their metadata • Enough to identify, differentiate, and integrate • Publish (advertise) to encourage reuse, limit development duplication, and out-of-band communication • Communicate changes in application deployment
Publishing Mechanism • Register during application lifecycle events • Installation, deployment, configuration, upgrade, uninstall, etc. • UDDI Services supports Web UI and SOAP API • Manual Web UI registration • Suitable for small number of services or simple profiles • Potentially error prone • Programmatic SOAP API registration • Applicable to widely deployed applications • Improved consistency and accuracy of registration details
Registration Profile • Model your service • Establish provider, service, bindings, and interfaces (tModels) • Develop standard approaches • Decide on appropriate categorizations • MapPoint Geographic • Visual Studio .NET • Business Capabilities • Create custom schemes
tModel: Definitions of specifications for services 0…n Service: Descriptive information about a particular family of technical offerings 0…n 0…n Binding: Technical information about a service entry point UDDI Data Model Provider: Information about the entity who offers a service
tModel: Definitions of specifications for services 0…n Service: Descriptive information about a particular family of technical offerings 0…n 0…n Binding: Technical information about a service entry point UDDI Data ModelDescribing WSDL Services Provider: Information about the entity who offers a service Name, description, and categorization of the deployment group Pointer to a WSDL spec Categorization: uddi-org:typesKey Value: wsdlSpec Name, description, and categorization of the service Access point(s) for the service
tModel: Definitions of specifications for services 0…n Service: Descriptive information about a particular family of technical offerings 0…n 0…n Binding: Technical information about a service entry point UDDI Data ModelCOM similarities Provider: Information about the entity who offers a service Name, description, and categorization of the deployment group Pointer to a WSDL spec Interface [ odl, uuid(34194D3F-2B85-41F0-8211-368904FD89B8)] interface _StockQuoteClass : IDispatch { HRESULT GetLastTradePrice( [in, out] BSTR* symbol, [out, retval] double* ); }; Name, description, and categorization of the service Implementation [uuid(C92A5941-D42D-4DA2-B83F-C3299D893A23), version(1.0) ] coclass StockQuoteClass { [default] interface _StockQuoteClass;}; Access point(s) for the service
Programmatic RegistrationUDDI SOAP API Message Set • Synchronous request/response protocol • For each UDDI entity (provider, service, binding, and tModel) • Finds – find_service, find_business • Gets – get_serviceDetail, get_businessDetail • Saves – save_service, save_business • Deletes – delete_service, delete_business • Broad cross-platform developer reach • Cumbersome to create using XML APIs
Programmatic RegistrationMicrosoft UDDI SDK 2.0 • .NET assembly providing rich object model
Programmatic RegistrationMicrosoft UDDI SDK 2.0 • Objects serialize to underlying UDDI XML • Applicable to any UDDI server • Superior to WSDL generated proxy classes • Properties, collections, overridden Add methods etc. • Usable from COM / Visual Studio 6.0 • Available in the Microsoft Platform SDK
Programmatic RegistrationBuilding The Registration • Discover the UDDI server • Active Directory registration and UddiSiteDiscovery • Establish a secured connection • Windows Integrated or UDDI Authentication • Create and Send a SaveTModel for the interface definition • Identifying GUID returned • Create • A named and categorized provider and service • A binding specifying the access point and referencing the tModel GUID • Place in a SaveBusiness and Send
Programmatic RegistrationNotes • Overridden ToString() method provides XML message Console.WriteLine(myServiceDetail.ToString()); • UddiConnection exposes HttpClient for advanced config myUddiConnection.HttpClient.AllowAutoRedirect = true; myUddiConnection.HttpClient.Proxy = new WebProxy(...); • UDDI API errors thrown as UddiException try { ... } catch (UddiException e) {Console.Write("UDDI exception: " + e.Message);} catch (Exception gen) {Console.Write("General exception: " + gen.Message);} • Enumerations for common tModels UUIDs CommonExtended.MicrosoftComMapPointGeographic CommonCanonical.UddiOrgHomepage
Consuming Web services • Variety of applications are / will be consuming Web services • Desktop application at configuration time • Developer applications at design time • Distributed server/desktop applications at runtime • Motivations • Predictable, centralized rendezvous point for services and their metadata • Enough to dynamically identify, differentiate, and integrate with most “appropriate” services • Discover to enable reuse, limit development duplication and out of band communication • Discover changes in application deployment
Configuration Time Discovery • “Find all services that implement interface X and are categorized with Y” • Use combination of Find APIs to retrieve list and Get APIs to retrieve full details • GetRelatedCategories extended API for category enumeration and drill down
Design Time Discovery • “Find all WSDL described services” • Used in Office XP, Visual Studio .NET, InfoPath • Use combination of Find APIs to retrieve list and Get APIs to retrieve full details • Reusable DHTML UI: http://<servername>/uddi/AddWebReference
Runtime Discovery • Dynamically bind to “most appropriate” service instance • Categorizations provide a mechanism for adding metadata criteria • Geographic locale • Quality of service • Service status (test/production/deprecated) • Not dynamically discover a new kind of service • Given redundant service instances, can help manage the fragility of distributed applications • Cache to not require UDDI on every invocation • ManagedUrl class encapsulates this reliability
Web Service Instance 1 UDDI Services Managed URL Reliability 1. At application startup retrieve compatible services from UDDI Web service instance N Web service instance 2 2. Application uses ManagedUrl.Value in invocations 3. Simple FailOver to next available service without additional lookup or application interruption • ManagedUrl: • Instance 1 • Instance 2 • … • Instance N • ManagedUrl: • Instance 1 • Instance 2 • … • Instance N ManagedUrl: Consuming application
Customizing The UDDI ExperienceUDDI Services User Interface • UDDI Services user interface • Rich Web application – ASP.NET / DHTML / CSS • Full fidelity of UDDI object model • Scenario specific • Considerations • Requires understanding of UDDI Servicesconcepts and modeling decisions • Usage pattern not tied down • Corporate customization not a design goal • Specific look and feel
Custom User InterfaceSupporting Specific Scenarios • There is scope for user interface focused on more specific usage patterns • WinForms • UDDI Publish Wizard: • Focused on Visual Studio .NET developer • Available in UDDI SDK and integrates intoVisual Studio .NET • ASP.NET • Corporate look and feel • Scenario specific
ASP.NET Integration • UDDI Services API for integration is the UDDI XML API • No direct managed or COM integration • No direct database access supported • Post XML messages over HTTP to SOAP access point Windows Server 2003 UDDI Services SQL Server / MSDE ASP.NET .NET business logic Web UI Stored procs SOAP API Web client Custom UI
ASP.NET Alternate UI Simple search client Simple publish client demo
ASP.NET Alternate UINotes • UDDI SDK provides object model over theXML API • Send method to invoke XML API call • To leverage UDDI Services roles • Configure Internet Information Server vdir for “Integrated Windows authentication” • Enable identity impersonation in Web.config ...</authorization> <identity impersonate="true"/> <trace...
Summary • Publishing Web services • Registration modeling • Programmatic registration with the UDDI SDK • Consuming Web services • Design, configuration and runtime discovery • Discovery for reliability with the ManagedUrl • Customizing the UDDI experience • ASP.NET UI for SOAP API
Next steps • Install Windows Server 2003 UDDI Services • Model your application registrations • Discover and integrate with services from UDDI at design, configuration, and runtime
UDDI Resources • Websites • MSDN UDDI Development:msdn.microsoft.com/uddi • UDDI Services:www.microsoft.com/windowsserver2003 • From within UDDI Services: “Additional UDDI resources on the web” • Newsgroups • microsoft.public.uddi.general • microsoft.public.uddi.programming
Community Resources • Community Resources http://www.microsoft.com/communities/default.mspx • Most Valuable Professional (MVP) http://www.mvp.support.microsoft.com/ • Newsgroups Converse online with Microsoft Newsgroups, including Worldwide http://www.microsoft.com/communities/newsgroups/default.mspx • User Groups Meet and learn with your peers http://www.microsoft.com/communities/usergroups/default.mspx
© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.