Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Introduction to Web Application Introduction to Web Services.

Similar presentations


Presentation on theme: "1 Introduction to Web Application Introduction to Web Services."— Presentation transcript:

1 1 Introduction to Web Application Introduction to Web Services

2 2 Topics Service Oriented Architecture Web Services Architectures and Service- Oriented Architecture Roles in a Web Services Architecture Publish Services SOAP Demo a simple Web Service

3 3 Service-Oriented Architecture Service Registry Service Provider Service Requester Publish WSDL UDDI Find WSDL UDDI Bind SOAP WSDL

4 4 Web Services As an Implementation of a Service- Oriented Architecture UDDI Any Client SOAP IIS Web Service

5 5 CASE: An Electronic Funds Transfer Web Service Internet Firewall Contoso Micropayment Web Service Woodgrove Bank Web Service Northwind Electronic Funds Transfer Web Service Web Service Consumer

6 6 Roles in a Web Services Architecture The Web Service Provider The Web Service Requester The Web Service Registry

7 7 The Web Service Provider Web servers The.NET Common Language Runtime Examples of Web service providers

8 8 The Web Service Requester Minimum functionality Service location Proxies Asynchronous calls Examples of Web service consumers

9 9 The Web Service Registry Interactions between brokers and providers Interactions between brokers and requesters UDDI registries

10 10 Overview of Using UDDI 2 2 1 1 5 5 Web service developer builds and deploys a pricing Web service 1 1 Web service developer registers and categorizes the Web service 2 2 Web service consumer queries UDDI for “pricing” services 3 3 Web service consumer determines the most appropriate “pricing” service 4 4 Web service developer builds a solution that directly consumes the Web service data 5 5 Pricing Web Service UDDI Services 3 3 4 4

11 11 SOAP Fundamentals Overview of SOAP Structure of SOAP Messages

12 12 Overview of SOAP SOAP messages Parts of a SOAP message –SOAP envelope –SOAP encoding rules –SOAP RPC representation –Protocol bindings for HTTP and HTTP-EF

13 13 Structure of SOAP Messages SOAP Envelope SOAP Header SOAP Body SOAP Fault 123XYZ Server Error … 123XYZ Server Error … string double string double

14 14 Create A simple Web Service TemperatureService [WebMethod] public double ToCelsius(double TF) { Count++; return (5.0/9)*(TF-32); }

15 15 Test Web Service

16 16 Using Proxy to invoke Web Services Proxies and WSDL Generating Proxies Using Wsdl.exe Configuring Proxies Web Service Consumer Web Service

17 17 Generating Proxies Using Wsdl.exe Syntax for invoking Wsdl.exe Proxy class details wsdl [options] {URL | Path} Example wsdl  http://localhost/class15/TemperatureService.asmx?wsdl wsdl /l:cs /protocol:HttpPost /out:Bank.cs  http://localhost/class15/TemperatureService.asmx?wsdl wsdl /l:cs /protocol:HttpPost /out:Bank.cs  http://localhost/class15/TemperatureService.asmx?wsdl

18 18 Configuring Proxies Url property Credentials property Timeout property Proxy property AllowAutoRedirect property Bank theBank = new Bank(); theBank.Url = "http://eastcoast.woodgrovebank.com/Bank.asmx"; ICredentials credentials = new NetworkCredential ("Adam", "ABarr-user", "woodgrovebank.com"); theBank.Credentials = credentials; theBank.Timeout = 20000; IWebProxy proxyObject = new WebProxy("http://proxyserver:80", true); theBank.Proxy = proxyObject; theBank.AllowAutoRedirect = true; Bank theBank = new Bank(); theBank.Url = "http://eastcoast.woodgrovebank.com/Bank.asmx"; ICredentials credentials = new NetworkCredential ("Adam", "ABarr-user", "woodgrovebank.com"); theBank.Credentials = credentials; theBank.Timeout = 20000; IWebProxy proxyObject = new WebProxy("http://proxyserver:80", true); theBank.Proxy = proxyObject; theBank.AllowAutoRedirect = true;

19 19 Demonstration: Implementing a Web Forms Client Create an ASP.NET Web application Add a Web reference Invoke the Web service by using the proxy Web Service Consumer Web Forms Client

20 20 Review Service Oriented Architecture Web Services Architectures and Service- Oriented Architecture Roles in a Web Services Architecture Publish Services SOAP Demo a simple Web Service


Download ppt "1 Introduction to Web Application Introduction to Web Services."

Similar presentations


Ads by Google