Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed System using Web Services

Similar presentations


Presentation on theme: "Distributed System using Web Services"— Presentation transcript:

1 Distributed System using Web Services
B. Ramamurthy 6/1/2019

2 Web Services Web Services is a technology that allows for applications to communicate with each other in a standard format. A Web Service exposes an interface that can be accessed through messaging. Web services enable program integration across application and organizational boundaries. Deployable unit. A Web service uses a protocol to describe an operation and the data exchange with another web service. Ex: SOAP Platform independent, say, through WSDL. Publishable, discoverable, searchable, queryable Scalability issues: A group of web services collaborating accomplish the tasks of a large-scale application. The architecture of such an application is called Service-Oriented Architecture (SOA). 6/1/2019

3 Web services (contd.) Is platform, language and operating system independent It works on a two-way Secure socket layer (SSL) It operates on the well-established HTTP protocol Open Grid Services Infrastructure (OGSI) is also web services based Is the basis for Software as a Service (Saas), Infrastructure as a Service (IaaS), and Platform as a Service (PaaS)– simply put the “Cloud computing” 6/1/2019

4 Web Services (WS): Technically Characteristics (Ch.19)
A WS interface consists of a collection of operations that can be used by the client over the internet. A web service has a URI (Uniform Resource Identifier) Web services are accessed by URIs by clients using messages formatted in XML. SOAP is used to express Request and Reply messages in XML and to transport them over HTTP. ( We will discuss REST later) A web service consists of a single remote object – it is not possible to instantiate additional remote objects during the running of a web service and remote object references are not used. -- DGC and remote references are irrelevant. XML security mechanisms can be used. How the task is accomplished is up to the server once the message arrives from the client: total transparency WSDL provides additional details than for standard operation: for encoding, security, communication and location. 6/1/2019

5 Services, ports and bindings
Service endpoint interface (SEI) or service endpoint that defines one or more operations that the web service offers. Access to an endpoint is provided by binding it to a protocol stack through a port. A port has an address that the client can use to communicate with the service and invoke its operations. An endpoint can be bound to different ports each offering a different suite of protocols for interaction. 6/1/2019

6 Endpoint, Port and binding
Web service endpoint Port port port3 Web services Client REST over http SOAP1.1 Over http SOAP 1.1 over https Other. Ex: ebXML over SMTP https 1.1 transport messages 6/1/2019

7 WS Lifecycle Build: Deploy: Definition of service interface
Definition of service implementation New services Existing application into WS Composing a WS out of other WS and applications Source compiled and Stubs and Ties are generated. Deploy: Publication of the service interface and service implementation to service registry or service requestor. Deployment of executables in an execution environment. 6/1/2019

8 WS Lifecycle (contd.) Run: A WS is available for invocation. Requestor can perform find and bind operation. Manage: on going management and administration for security, availability, performance, QoS, and business processes. 6/1/2019

9 Creation and consumption of WS
Based on Sun’s WS discussion. The starting point for developing a JAX-WS web service is a Java class annotated with the javax.jws.WebService annotation. The WebService annotation defines the class as a web service endpoint. A WS method can also be created using annotation. 6/1/2019

10 Coding WS Hello Server package helloservice.endpoint;
import javax.jws.WebService; @WebService() public class Hello {    private String message = new String("Hello, ");    public void Hello() {}    @WebMethod()    public String sayHello(String name) {      return message + name + ".";   } } 6/1/2019

11 Coding the Hello WS client
Uses the javax.xml.ws.WebServiceRef annotation to declare a reference to a web service. WebServiceRef uses the wsdlLocation element to specify the URI of the deployed service's WSDL file. @WebServiceRef(wsdlLocation=" static HelloService service; Retrieves a proxy to the service, also known as a port, by invoking getHelloPort on the service. Hello port = service.getHelloPort(); The port implements the SEI defined by the service. Invokes the port's sayHello method, passing to the service a name. String response = port.sayHello(name); 6/1/2019

12 Development using an IDE
An IDE supports tools for compilation, deployment, automatic generation of proxies, auto completion, auto import of packages, build tool etc. 6/1/2019

13 Application Architecture
Weather Client JAX-WS Stub JAX-WS Runtime (APIs) Transport Weather Service Endpoint impl JAX-WS Ties JAX-WS Runtime (APIs) Transport SOAP/HTTP 6/1/2019

14 WS Interoperability Infrastructure
Service Description WSDL XML Messaging SOAP Network HTTP 6/1/2019

15 WS Stack Service Flow WSFL Service Discovery UDDI Quality of Service
Security Management Quality of Service Service Discovery UDDI Service Publication UDDI Service Description WSDL XML-based Messaging SOAP HTTP, FTP, MQ , IIOP Network 6/1/2019

16 WSDL Web Services Definition Language for definition of WS in a standard format and for publication to allow discovery by computational agents. Lets understand WSDL Lets look at the components of WSDL and look at Amazon.com ECS as example 6/1/2019

17 Anatomy of a WSDL document
6/1/2019

18 Sample WSDL http://www.w3.org/2001/04/wsws-proceedings/uche/wsdl.html
6/1/2019

19 Demo: Develop, deploy and consume a sample WS
We will use Netbeans IDE to understand WS ecosystem and designing, building, deploying and consuming a WS. 6/1/2019


Download ppt "Distributed System using Web Services"

Similar presentations


Ads by Google