1. Trang chủ
  2. » Công Nghệ Thông Tin

Web Service in .NET ppt

19 290 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 19
Dung lượng 244,67 KB

Nội dung

Web Service in .NET P R E S E N T E R : M R . D O A N Q U A N G M I N H Agenda  Definition  Opportunities  Architecture  ASP.NET Web Services  ASP.NET Web Services  Data Types  Work in VS 2005  ASP.NET Web Services Tips  Demo Definition  Is a software system designed to support interoperable Machine to Machine interaction over a network  Consist of a Web APIs that can be accessed over a network, such as the Internet, and executed on a network, such as the Internet, and executed on a remote system hosting the requested services  Go http://en.wikipedia.org/wiki/Web_service for detail. Opportunities  Easy to create standards-compliant services  Does not favor any particular computer language or operating system  Output can be transformed for a wide variety of uses It makes a lot of sense for libraries to exploit the 4  It makes a lot of sense for libraries to exploit the Web Service technique Architecture  The basic standards for web services are:  XML (Extensible Markup Language)  SOAP (simple object access protocol)  WSDL (web services description language)  UDDI (universal description, discovery and integration) 5  UDDI (universal description, discovery and integration) XML  XML stands for extensible markup language  It is a hierarchical data description language  It is a sub set of SGML (Standard Generalized Markup Language) a general document markup language designed for the American military. 6 language designed for the American military.  It is defined by w3c. XML (continue…)  A correct XML document must be both valid and well formed.  Well formed means that the syntax must be correct and all tags must close correctly.  Valid means that the document must conform to 7  Valid means that the document must conform to some XML definition ( a DTD or Schema).  A schema is the definition of the meaning of each of the tags within a XML document. SOAP  Currently the most common implementation of Web Services  Work in a very simple “request – response” paradigm  For Example: 8  For Example:  A Weather Service– simple request for weather in an area, simple response with the weather report.  An Airline special offers service – travel agents would simply make requests for latest offers and would receive the offers as a response. SOAP message  SOAP provides a standard “envelope” within which a message can be delivered.  SOAP is mechanism (protocol) for transferring information (messages) between applications which may be widely distributed. 9 may be widely distributed.  SOAP says nothing about the content of the message – the sender and the receiver must understand the message for themselves.  SOAP is part of a communication stack. WSDL  Describes the Web Service and defines the functions that are exposed in the Web Service  Defines the XML grammar to be used in the messages  Uses the W3C Schema language 10  Uses the W3C Schema language [...]... look up services with a central registry Service Providers can publish information about their business and the services that they offer Service consumers can look up services that are available by Business Service category Specific service 11 ASP.NET Web Services ASP.NET provides support for Web Services with the asmx file This is similar to an aspx file It must import the namespace System .Web. Services... Use Chunky Instead of Chatty Design It mean that use minimum number of calls to the server Store Application-Specific Settings in Web. Config Avoid ASP.NET Session State if You Can 15 Work in VS 2005 To make a Web Service Start a new web site (from Visual Studio 2005); Select ASP.NET Web Service; Change source code of Service. cs file or add new web service file from templates To consume a Web Service Start... runat="server“ ID="scriptManager"> Web Service with AJAX Create Service Create a web service Add direction to web service: [ScriptService] for class and [WebMethod] for method Consume Service Using JavaScript to call service function TestService(a, b, userContext) { full_class_name.method(a, b, OnSucceededWithContext,... Start a new web site (from Visual Studio 2005); Select ASP.NET Web Site; Use WSDL.exe to create proxy class; Add to App_Code folder; Use proxy class Web Service with AJAX Microsoft ASP.NET AJAX Allow to call ASP.NET Web services (.asmx files) from the browser by using client script Setup ScriptManager Add Script reference . Web Service in .NET P R E S E N T E R : M R . D O A N Q U A N G M I N H Agenda  Definition  Opportunities  Architecture  ASP .NET Web Services  ASP .NET Web Services  Data Types  Work in. Create a web service  Add direction to web service: [ScriptService] for class and [WebMethod] for method  Consume Service Consume Service  Using JavaScript to call service function TestService(a,. over a network, such as the Internet, and executed on a network, such as the Internet, and executed on a remote system hosting the requested services  Go http://en.wikipedia.org/wiki /Web_ service

Ngày đăng: 12/07/2014, 13:20

TỪ KHÓA LIÊN QUAN