Presentation is loading. Please wait.

Presentation is loading. Please wait.

6.2 XML Web Services Vinod Unny Enterprise InfoTech Microsoft Regional Director, North India.

Similar presentations


Presentation on theme: "6.2 XML Web Services Vinod Unny Enterprise InfoTech Microsoft Regional Director, North India."— Presentation transcript:

1

2 6.2 XML Web Services Vinod Unny Enterprise InfoTech Microsoft Regional Director, North India

3 6.3 Agenda What is an XML Web service? What is an XML Web service? What does an XML Web service do? What does an XML Web service do? XML Web Services in.NET XML Web Services in.NET WSDL, DISCO and UDDI WSDL, DISCO and UDDI Developing XML Web Services Developing XML Web Services Securing XML Web services Securing XML Web services Web Service Exception Web Service Exception Web Service and.NET Remoting Web Service and.NET Remoting Web Service and BizTalk Web Service and BizTalk

4 6.4 What is an XML Web Service? A programmable application component accessible via standard Web protocols Open Internet Protocols XML Web service SOAP SOAP - XML Web service consumers can send and receive messages using XML SOAP - XML Web service consumers can send and receive messages using XML WSDL XML Web services Description Language WSDL - XML Web services are defined in terms of the formats and ordering of messages WSDL - XML Web services are defined in terms of the formats and ordering of messages Built using open Internet protocols Built using open Internet protocols XML and HTTP UDDI Universal Description, Discovery and Integration UDDI - Provides a directory of services on the Internet UDDI - Provides a directory of services on the Internet

5 6.5 What Does an XML Web Service Do? Expose functionality as a service and allow applications to share data Expose functionality as a service and allow applications to share data Can be called across platforms and operating systems and regardless of programming language Can be called across platforms and operating systems and regardless of programming language

6 6.6 XML Web Services in.NET Data Schema Services InvocationWebXML XSD WSDL SOAP ApplicationConceptsFrameworkObjects Classes Methods Calls The.NET Framework provides a bi-directional mapping

7 6.7 Web Service Description Language (WSDL) and SOAP "TypeLib for SOAP" "TypeLib for SOAP" Uniform representation for services Uniform representation for services  Transport Protocol neutral  Access Protocol neutral (not only SOAP) Describes how to call an XML Web service Describes how to call an XML Web service

8 6.8 DISCO DISCO is a proprietary file format placed at the root of a Web directory DISCO is a proprietary file format placed at the root of a Web directory Visual Studio generates the DISCO for your XML Web service when you generate your service Visual Studio generates the DISCO for your XML Web service when you generate your service Easy discovery model for HTTP Easy discovery model for HTTP

9 6.9 Universal Description, Discovery and Integration (UDDI) Registry (Directory) for Web Services Registry (Directory) for Web Services UDDI itself is a Web service – can be programmatically accessed UDDI itself is a Web service – can be programmatically accessed Businesses can publish to registry and query registry Businesses can publish to registry and query registry May point to WSDL files May point to WSDL files Initiative driven by Microsoft, IBM, Compaq, Intel, Sun, Oracle and 250+ other companies Initiative driven by Microsoft, IBM, Compaq, Intel, Sun, Oracle and 250+ other companies

10 6.10 Web Services (In Practice) Discovery Let me talk to you (SOAP) Design-Time or Dynamic Runtime http://yourservice.com HTML or XML with link to WSDL How do we talk? (WSDL) http://yourservice.com/?WSDL XML with service descriptions http://yourservice.com/svc1 XML/SOAP BODY Find a Service http://www.uddi.org Link to DISCO or WSDL document XML Web service Client UDDI WebService

11 6.11 Visual Studio.NET and XML Web Services Visual Studio.NET creates XML Web Services for you Visual Studio.NET creates XML Web Services for you Generates the plumbing Generates the plumbing  i.e., SOAP, DISCO, WSDL, etc… Automates the creation of the project files Automates the creation of the project files

12 6.12 Creating an XML Web Service Create standard function Create standard function  Right click project  Select add  Add XML Web service  Name service file  Define function  Use template function in.asmx file [WebMethod] Public string HelloWorld() { return “Hello World”; }

13 6.13 Creating An XML Web Service Demo XML Web Services 101 XML Web Services 101 Create a simple XML Web service Create a simple XML Web service

14 6.14 Consuming Web Services Demo XML Web Services Clients XML Web Services Clients Create ASP.NET page to use XML Web service Create ASP.NET page to use XML Web service

15 6.15 Generating Web Service proxy using “wsdl.exe” Utility to generate code for xml web service clients and xml web services using ASP.NET from WSDL contract files, XSD schemas and.discomap discovery documents. Utility to generate code for xml web service clients and xml web services using ASP.NET from WSDL contract files, XSD schemas and.discomap discovery documents. Allow greater control in generating the proxy class. Allow greater control in generating the proxy class.  Specify the language (C#, VB.NET, or JS)  Specify the namespace for greater interoperability  Specify the web service url from a configuration file  Specify the protocol  Specify the proxy server if needed

16 6.16 Returning Data from an XML Web Service SQL Server Customers DataAdapter XML Web service DataSet IIS Access Orders XML DataSet Generic Client.NET Client DataAdapter

17 6.17 Consuming Data from an XML Web Service Demo Using ADO.NET DataSets Using ADO.NET DataSets

18 6.18 Web Service Exception try{ // do something... // do something...} catch(Exception e) { // clean up code... // clean up code... throw new SoapException(...); throw new SoapException(...);}

19 6.19 Designing an XML Web Service Group related operations and data into one method Group related operations and data into one method Decide on: Decide on:  Arguments and return data  Whether to use existing classes or create new ones  Security Use output caching to improve performance Use output caching to improve performance Define your input and output data structures using XSD schemas Define your input and output data structures using XSD schemas Separate XML Web service from underlying business logic Separate XML Web service from underlying business logic

20 6.20 Web Service Façade (Architectural Patterns) Re-architect an existing client/server or fat client architecture into a 3 tiered application environment Re-architect an existing client/server or fat client architecture into a 3 tiered application environment Web enable an existing client/server or fat client architecture Web enable an existing client/server or fat client architecture Provide integration with external business partners. Provide integration with external business partners. Provide integration with internal business systems. Provide integration with internal business systems.

21 6.21 Web Service Façade (Architectural Patterns) (cont’d) Insulate existing user applications from changes in APIs, servers, or vendors of data and services. Insulate existing user applications from changes in APIs, servers, or vendors of data and services. Integrating a “silo” application -- unlock an existing application so it can participate in a larger business process. Integrating a “silo” application -- unlock an existing application so it can participate in a larger business process. Aggregate back-end systems so they’re exposed as one business process. Aggregate back-end systems so they’re exposed as one business process. Integrating application running on in heterogeneous environments (Linux, Solaris, AS400, etc) with applications running on Windows. Integrating application running on in heterogeneous environments (Linux, Solaris, AS400, etc) with applications running on Windows.

22 6.22 Securing XML Web Services Authentication Authentication  Standard user account mechanisms Authorization Authorization  Custom code  Configuration settings in Web.config Encryption Encryption  SSL  Watch out for performance hit  IPSec WS-Security WS-Security  Integrated security for Web Services  Global XML Web Services Architecture (GXA)

23 6.23 Web Service and.NET Remoting Using Web Services Using Web Services  Leverage the Web application model and the power of the ASP.NET HTTP Runtime  Exact type fidelity between.NET computers is not a concern and only some types of arguments can be passed Using.NET Remoting, you can: Using.NET Remoting, you can:  Publish or consume services in any type of application domain (ex. console, Windows, IIS, Web Service, etc.)  Preserve full managed-code type-system fidelity in binary formatted communications.  Pass objects by reference and return to a particular object in a particular application domain

24 6.24 Web Service and.NET Remoting (cont’d) Using.NET Remoting (cont’d): Using.NET Remoting (cont’d):  Control activation characteristics and object lifetimes directly.  Implement and use third-party channels or protocols to extend communication to meet your specific needs  Participate directly in the communication process to create the functionality you need  Potential performance benefits by being able to select the most optimal form of communication.

25 6.25 Web Services and BizTalk BizTalk Orchestration addresses the following issues with Web Services BizTalk Orchestration addresses the following issues with Web Services  Interaction among XML Web Services  Transaction management and exception handling  Concurrency  Interaction with non-XML Application

26 6.26 XML Web Services Summary Enable cross-platform communication Enable cross-platform communication Provide flexible mechanism for sharing information Provide flexible mechanism for sharing information Easy to create in.NET and Visual Studio.NET Easy to create in.NET and Visual Studio.NET

27 6.27 Resources What is an XML Web service? A simple overview of XML Web services http://www.microsoft.com/net/basics/xmlservices.asp What is an XML Web service? A simple overview of XML Web services http://www.microsoft.com/net/basics/xmlservices.asp XML Web Service Basics http://msdn.microsoft.com/library/?url=/library/en- us/dnwebsrv/html/webservbasics.asp?frame=true XML Web Service Basics http://msdn.microsoft.com/library/?url=/library/en- us/dnwebsrv/html/webservbasics.asp?frame=true XML Web Services Specifications - A simple explanation of XML Web services with a few links http://www.gotdotnet.com/team/xml_wsspecs/default.as px XML Web Services Specifications - A simple explanation of XML Web services with a few links http://www.gotdotnet.com/team/xml_wsspecs/default.as px Programmable XML Web Services - The basic building blocks for the Microsoft.NET Framework http://msdn.microsoft.com/library/periodic/period00/We bplatform.htm Programmable XML Web Services - The basic building blocks for the Microsoft.NET Framework http://msdn.microsoft.com/library/periodic/period00/We bplatform.htm

28 6.28 Resources Web Server Platform - A more detailed definition of XML Web services and how they impact.NET Applications http://msdn.microsoft.com/library/techart/Websvcs_pla tform.htm Web Server Platform - A more detailed definition of XML Web services and how they impact.NET Applications http://msdn.microsoft.com/library/techart/Websvcs_pla tform.htm XML Web Services Development Center – Latest up-to- date information (SDKs, specs, whitepapers, etc.) http://msdn.microsoft.com/webservices/ XML Web Services Development Center – Latest up-to- date information (SDKs, specs, whitepapers, etc.) http://msdn.microsoft.com/webservices/ http://msdn.microsoft.com/webservices/ Web Services Development Kit (WSDK) – GXA Technology Preview Web Services Development Kit (WSDK) – GXA Technology Preview http://msdn.microsoft.com/webservices/building/wsdk/ default.asp http://msdn.microsoft.com/webservices/building/wsdk/ default.asp Microsoft UDDI Developer Information Microsoft UDDI Developer Informationhttp://uddi.microsoft.com/developer/default.aspx

29 6.29 In-Depth Training on XML Web Services Direct from Microsoft 2524A: Developing XML Web Services (Visual C#.NET Beta 2) 2524A: Developing XML Web Services (Visual C#.NET Beta 2) 2524B: Developing XML Web Services Using Microsoft Visual Studio.NET 2524B: Developing XML Web Services Using Microsoft Visual Studio.NET

30 6.30


Download ppt "6.2 XML Web Services Vinod Unny Enterprise InfoTech Microsoft Regional Director, North India."

Similar presentations


Ads by Google