1 / 34

DISCO UDDI

DISCO UDDI. -Sandeep Gadde. Contents:. Web Services What is DISCO? Disco Client Utilities Disco Redirects Dynamic Discovery UDDI UDDI as a better DISCO UDDI Repository UDDI Binding Information UDDI Programmer’s API UDDI - Lite. Web Services.

Download Presentation

DISCO UDDI

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DISCO UDDI -Sandeep Gadde

  2. Contents: • Web Services • What is DISCO? • Disco Client Utilities • Disco Redirects • Dynamic Discovery • UDDI • UDDI as a better DISCO • UDDI Repository • UDDI Binding Information • UDDI Programmer’s API • UDDI - Lite

  3. Web Services • Web services are automated information services that are conducted over the Internet, using standardized technologies and formats/protocols that simplify the exchange and integration of large amounts of data over the Internet. • Web services platform elements are SOAP, UDDI, WSDL. • Web services use XML to code and decode data, SOAP to transport data.

  4. Cont.. • Web Services basically uses HTTP and SOAP to make business data available on the web and executes remote function calls.

  5. Sample WebService • namespace WebService1 { [WebService(Namespace = "http://tempuri.org/")] public class Service1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld() { return "Hello World"; } [WebMethod] public int add(int a, int b) { return a+b; } } }

  6. DISCO • Web Services discovery is the process of locating and interrogating web service descriptions, which is a preliminary step for accessing a web service. • Discovery file is an XML document with a .disco extension and holds the Web Services information.

  7. Sample disco file • Service1.disco <disco:discovery xmlns:disco="http://schemas.xmlsoap.org/disco/" xmlns:scl="http://schemas.xmlsoap.org/disco/scl/"> <!-- reference to other DISCO document --> <disco: discoveryRef ref="related-services/default.disco"/> <!-- reference to WSDL and documentation --> <scl:contractRef ref=“Service1.asmx?wsdl“ docRef=“Service1.asmx"/> </disco:discovery> \MyService (root dir) Service1.asmx web.config Service1.disco \bin simpleMath.dll complexMath.dll

  8. Disco client utilities • There are 2 types of client utilities to discover a WebService. - disco.exe tool - Add web ref feature in visual studio.net • disco.exe tool is a command line utility provided by microsoftsdk and it is used as follows. c:\>disco.exe http://localhost:85635/MyService/service1.disco

  9. Cont.. • An output file with name results.discomap is created that contains information about web services discovered at specified URL. • It also downloads all the .disco and .wsdl documents that were discovered. • Wsdl.exe is the utility to generated web service proxies from WSDL documents or the .discomap files generated by disco.exe .

  10. Cont.. • results.discomap <?xml version="1.0" encoding="utf-8"?> <DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Results> <DiscoveryClientResult referenceType= "System.Web.Services.Discovery.ContractReference" url="http://localhost/MyService/Service1.asmx?wsdl" filename=“Service1.wsdl"/> <DiscoveryClientResult referenceType= "System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost/MyService/related-services/default.disco" filename="default.disco" /> </Results> </DiscoveryClientResultsFile>

  11. Cont.. • Add web reference feature in visual studio.net

  12. Cont..

  13. Cont..

  14. Disco redirects • Disco Redirects help to redirect to disco file, if the user doesn’t know the exact address of the disco file. • Disco provide hints in the default page of root directory • If the root's default page is an HTML document, you can use the LINK tag to redirect the client to the .disco file:<HTML> <HEAD> <link type='text/xml' rel='alternate' href=‘Sample1.disco'/> </HEAD> ••• </HTML>

  15. Cont.. • If the root's default page is an XML document, you can use the xml-stylesheet processing instruction to accomplish the same thing:<?xml-stylesheet type="text/xml" alternate="yes" href=“Service1.disco"?>

  16. Dynamic discovery • Dynamic discovery is discovering web services dynamically • To enable dynamic discovery, a .vsdisco file like the one shown here must be placed in the desired root.<dynamicDiscovery xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-17“ /> • Requests for .vsdisco files are handled by System.WebServices.Discovery.DiscoveryRequestHandlernamespace, which dynamically generates a DISCO document based on the resources found in the target root directory.

  17. UDDI • Universal Description, Discovery and Integration (UDDI) is a specification for building distributed databases that enable interested parties to “discover” each other’s Web services. • Provides easy discovery, sharing, and reuse of Web services and other programmable resources.

  18. UDDI as a better DISCO • UDDI goes beyond DISCO by defining how to interact with a full-fledged Web Service information repository. • UDDI specification consists of a programmer’s API along with an XML schema definition of supporting data structures and messages.

  19. UDDI Repository • UDDI repositories contain information about businesses, services, and service bindings as well as additional metadata for categorization purposes. • UDDI uses white pages, yellow pages, and green pages to organize information

  20. Cont.. • White pages include business name, contact info. • Yellow pages include categories based on standard taxonomies. • Green pages include the technical specifications and references.

  21. UDDI Binding Information • UDDI registry contains 4 main types of information: Business, Services, Binding Templates and tModels. • Business-Name, Contact Info, Technical Info of the service. • Service-Technical/Business descriptions & categorizations. • Each service also exposes binding template info that describes how to connect to and communicate with the given service.

  22. UDDI Programmer’s api • UDDI Programmer’s API is divided as Inquiry API and Publishing API. • Inquiry API: Provides operations for retrieving information from the registry. • Publishing API: Provides operations for publishing information to the registry.

  23. Inquiry API

  24. <find_business> example • The following code illustrates how to perform a business lookup by the company's name. <?xml version='1.0' encoding='utf-8'?> <s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <find_business generic="1.0" xmlns="urn:uddi-org:api"> <name>XXX</name> </find_business> </s:Body> </s:Envelope>

  25. Cont.. • The result of the find_business operation is the info about its services <s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <businessList generic="1.0" truncated="false" operator=“XXX" xmlns="urn:uddi-org:api"> <businessInfos> <businessInfobusinessKey="0076B468-EB27-42E5-AC09-9955CFF462A3"> <name>XXX</name> <description xml:lang="en">Empowering people through great software...</description> <serviceInfos> <serviceInfobusinessKey="0076B468-EB27-42E5-AC09-9955CFF462A3" serviceKey="D2BC296A-723B-4C45-9ED4-494F9E53F1D1"> <name>UDDI Web Services</name> </serviceInfo> </serviceInfos> </businessInfo> ………… </businessInfos> </businessList> </s:Body> </s:Envelope> .

  26. Publishing api

  27. <save_business> example • <?xml version='1.0' encoding='utf-8'?> <s:Envelope xmlns:s= 'http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <save_business generic="1.0" xmlns="urn:uddi-org:api"> <!-- retrieved from get_authToken API --> <authinfo>fd3c7a44-118f-413a-a2e3-473a35379993 </authinfo> <businessEntity businessKey="ee3be846-d828-4a38-a5e4-3c33f931d122"> <name>Developmentor</name> <description>Services the developer by... </description> <businessServices> <!-- service descriptions go here --> </businessServices> </businessEntity> </save_business> </s:Body> </s:Envelope>

  28. UDDI-Lite • Microsoft has come up with UDDI-Lite recently, a compromise between DISCO and UDDI. • The idea behind this sample was to provide a centralized web service repository that would be easy to maintain, and would integrate with all of the existing .NET DISCO-based tools.

  29. Cont.. • To implement UDDI-Lite -Web Services are stored in SQL Server DB. -ASP.NET front end to register and unregister Web Services. • When client requests .vsdisco file, it automatically generates information stored in SQL Server by mapping requests using System.Web.UI.PageHandlerFactory class.

  30. Cont..

  31. Sample code to implement UDDI-Lite • <%@ page language="C#" contenttype="text/xml" enablesessionstate="false" %> <%@ import namespace="System.Data" %> <%@ import namespace="System.Data.SqlClient" %> <% Response.ContentType = "text/xml"; %> <disco:discoveryxmlns:disco="http://schemas.xmlsoap.org/disco/" xmlns:scl="http://schemas.xmlsoap.org/disco/scl/"> <% SqlConnectionconn = new SqlConnection("data source=localhost;initial catalog=uddilite;user id=sa;pwd="); conn.Open(); try { SqlCommandcmd = new SqlCommand("select contract, documentation from contracts"); cmd.Connection = conn; IDataReader reader = null; reader = cmd.ExecuteReader(); while (reader.Read()) { %> <scl:contractRef ref="<%= reader[0].ToString() %> " docRef="<%= reader[1].ToString() %>" /> <% } } finally { conn.Close(); } %> </disco:discovery>

  32. Conclusion • DISCO is ultimately limited by the type and depth of the information that it provides. • Microsoft has been heavily involved in the development of UDDI, which is receiving a lot of attention. • The bottom line is that DISCO works today and it can help us to get more out of .NET Web Services with little effort. For the future, look for UDDI developments.

  33. References • http://msdn.microsoft.com/en-us/magazine/cc302073.aspx • http://www.cs.odu.edu/~mukka/cs795sum10.net/Lecturenotes/day4/wsuddi.ppt • http://uddi.xml.org/uddi-org

  34. Thank you

More Related