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

Lập trình hệ thống mạng (Nguyễn Hữu Thể) - Web service

28 5 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

Là một tập các phương thức được gọi thực hiện từ xa thông qua một địa chỉ URL.Sử dụng để tạo các ứng dụng phân tán,để hiểu thêm các bạn nên tham khảo tài liệu này.

LẬP TRÌNH HỆ THỐNG MẠNG Web service Nguyễn Hữu Thể Nội dung Các ứng dụng phân tán Kiến trúc hướng dịch vụ Web service Java Web service Tài liệu tham khảo: giảng tailieu.vn, Internet Các ứng dụng phân tán (Distributed) Dữ liệu Ứng dụng phân tán Máy tính Dữ liệu Máy tính Kiến trúc hướng dịch vụ (SOA) Service Broker Publish Find Bind Service Consumer Service Provider Web service Web Service Web Service Firewall Là tập phương thức gọi thực từ xa thông qua địa URL Sử dụng để tạo ứng dụng phân tán Firewall Internet Firewall Client Web Service Đặc điểm Khơng phụ thuộc vào ngơn ngữ lập trình Truy cập ứng dụng Hỗ trợ thao tác thành phần không đồng Chi phí phát triển thấp Dễ bảo trì Kiến trúc Web Service UDDI (Web Service Broker) Find Publish Internet Bind Web Service Consumer Web Service Provider Kiến trúc Web Service UDDI SOAP SOAP Apache SOAP Client Web Service Kiến trúc phân tầng Web Service Web service provider Web Server Cung cấp Web service Apache, Glassfish Yêu cầu Hỗ trợ protocol listenner Có chế bảo mật Cung cấp service mà consumer yêu cầu 10 Nền tảng Web Service Web Service HTTP SOAP XML 14 HTTP HTTP Request POST /TheStockExchange/Trading/GetStockPrice.asp HTTP/1.1 Host: localhost Content-Type: application/x-www-form-urlencoded Content-Length: 11 Symbol=MSFT HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 HTTP Response Content-Length: 75 15 XML – Extend Markup Language Sử dụng để mô tả Web service interface SOAP Message tài liệu XML Sử dụng để serialize đối tượng thành tài liệu XML (System.Xml.Serialization) 16 SOAP(1) SOAP – Simple Object Access Protocol Protocol for message-based communication XML-Based protocol An envelope for handling extensibility and modularity An encoding mechanism for representing types within an envelope SOAP ≈ HTTP + XML Submitted to W3C 17 SOAP (2) SOAP Request : HTTP POST Request POST /WebCalculator/Calculator.asmx HTTP/1.1 Content-Type: text/xml SOAPAction: “http://tempuri.org/Add” Content-Length: 386 18 SOAP(3) - Message Structure 19 SOAP(4) - Example of a SOAP Request Request 12 20 SOAP(5) - Example of a SOAP Response 24 Message response mang thông tin kết trả phần body Kết phép nhân đôi số nguyên 12 24 21 Web Service Consumer WSDL Documents Proxy class Consuming Web service in Java 22 WSDL Documents Web Service Description Language XML schema : Mô tả giao diện web service Sử dụng đề phát sinh proxy class Xem WSDL Document web service http://localhost:8080/TestService/service/Hello?wsdl 23 WSDL Documents 24 WSDL Documents Hình: WSDL cho phép kết nối lỏng lẻo dịch vụ 25 Proxy class Proxy : Ủy nhiệm Được phát sinh từ WSDL Document Được sử đụng để giao tiếp với Web service 26 Ứng dụng Web Services WS tập hợp chức thực thi qua môi trường mạng, ứng dụng khác sử dụng Một WS kết hợp với WS khác để đưa tính cao Mơ hình ứng dụng tương lai kết hợp service … 27 ... Bind Web Service Consumer Web Service Provider Kiến trúc Web Service UDDI SOAP SOAP Apache SOAP Client Web Service Kiến trúc phân tầng Web Service Web service provider Web Server Cung cấp Web service. .. Pricing Web Service UDDI Services Net, Java Web service developer builds and deploys a pricing Web service Web service developer registers and categorizes the Web service Web service consumer queries... “pricing” services Web service consumer determines the most appropriate “pricing” service Web service developer builds a solution that directly consumes the Web service data 13 Nền tảng Web Service Web

Ngày đăng: 09/05/2021, 19:18

Xem thêm:

w