Danh mục tài liệu

Professional VB 2005 - 2006 phần 9

Số trang: 110      Loại file: pdf      Dung lượng: 6.33 MB      Lượt xem: 25      Lượt tải: 0    
Xem trước 10 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Đó là khá nhiều tất cả là các dịch vụ Web từ một quan điểm thực hiện. NET. NET giao dịch với tất cả các hệ thống ống nước đã được thảo luận trong phần đầu của chương này (SOAP, WSDL, và như vậy), có nghĩa rằng tất cả là để làm là thêm một phương thức trang trí đúng với dịch vụ.
Nội dung trích xuất từ tài liệu:
Professional VB 2005 - 2006 phần 9 Chapter 23 That’s pretty much all there is to Web Services from an implementation perspective in .NET. .NET deals with all of the plumbing that was discussed in the first part of this chapter (SOAP, WSDL, and so on), which means that all there is to do is add properly decorated methods to the service.impo PDF Merge and Split Unregistered Version - http://www.simpopdf.com A Realistic Example Although the previous example was very easy to implement, it doesn’t demonstrate a real-world applica- tion of Web Services. Let’s take a look at a more realistic example by building a Web Service that sends out a richer set of data from a database instead. For the sake of example, imagine that a third-party provider hosts the site. The SQL server is behind a firewall, and the IIS server is in a demilitarized zone — a safe, though exposed, network position. This is illustrated in Figure 23-6. To get the data from your site to the remote site, call a Web Service on the remote Web server from your intranet. Since the SOAP envelope is sent via HTTP, the firewall will allow it through, and ADO.NET on the IIS server will handle the actual database manipulation. The remote firewall will allow database calls only from the IIS server, and the data will be updated safely because of the security. In real life, the class file GetCustomers would be local to your intranet server, and the database file would be an SQL server on a second PC. Across the Internet, as shown in the diagram, the Web Service would be on an IIS server sitting outside the network firewall. The DLL that actually provides the data functions would be on an application server inside the firewall, and the database would again be on a separate machine. For this application, though, you will create a Web Service that will expose the Customers table from the sample Northwind database, across the intranet, that will then later be consumed by a Web application. Just remember that Web Services are not only about exposing simple values, but also about exposing a richer dataset of values such as entire tables from a data store (for example, SQL Server). Start this example by first creating a new Web Service project in Visual Studio called MyWebService. Using Visual Studio 2005 to Build Web Services The Visual Studio 2005 IDE shows a marked improvement from the add-ins provided for Visual Studio 6 in the SOAP Toolkit. For instance, Web Services are shown as references on a project, rather than in a separate dialog box. The discovery process, discussed later, is used to its fullest, providing much more information to the developer. In short, it is nearly as easy to consume a Web Service with Visual Basic as it is to use DLLs. 848 XML Web Services SQL DBimpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com 2. SP Returns 0. Get operation Recordset for retrieving data from Enterprise database 3. DLL provides Web ser vice with data Local Enterprise Ser ver Firewall 4. Web Ser vice makes call to ISP for update The Internet 5. Call routed to ISP via HTTP The DMZ 6. Web Ser vice Calls Update DLL Remote Internet Ser ver ...

Tài liệu được xem nhiều:

Tài liệu có liên quan: