220 likes | 302 Views
Web Services. Kanda Runapongsa ( krunapon@kku.ac.th ) Dept. of Computer Engineering Khon Kaen University. What are Web Services?. Web services are loosely coupled software components delivered over Internet standard technologies
E N D
Web Services Kanda Runapongsa (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University
What are Web Services? • Web services are loosely coupled software components delivered over Internet standard technologies • Facilitate delivering business applications as a service accessible to anyone, anytime, at any location, and using any platform 168493: XML and Web Services (II/2546)
Web Services Characteristics • Based on XML messaging • Data exchanged between the Web service provider and the user are defined in XML • Web services provide a cross-platform integration of business applications over the Internet 168493: XML and Web Services (II/2546)
Web Services Characteristics • To build Web services, developers can use any common programming language, such as Java, C, C++, Perl, Python, C#, and /or Visual Basic • Web services can be used by many types of clients on various types of devices, such as Wireless device, PDA, Desktop, Automobile 168493: XML and Web Services (II/2546)
Web Services Characteristics • Web services vary in functionality from a simple request to a complex business transaction involving multiple resources • All platforms including J2EE, CORBA, and Microsoft .NET provide extensive support for creating and deploying Web services 168493: XML and Web Services (II/2546)
Web Services Characteristics • Web services use industry-standard protocols like HTTP, and they can be easily accessible through corporate firewalls • Web services are dynamically located and invoked from public and private registries based on industry standards such as UDDI and ebXML 168493: XML and Web Services (II/2546)
Web Applications vs. Web Services • Traditionally, Web applications enable interaction between an end user and a Web site • Web Services are service-oriented and enable application-to-application communication over the Internet and easy accessibility to heterogeneous applications and devices 168493: XML and Web Services (II/2546)
Why Use Web Services? • Can be invoked through XML-based RPC mechanisms across firewalls • Provide a cross-platform, cross-language solution based on XML messaging • Facilitate ease of application integration using a light-weight infrastructure without affecting scalability • Enable interoperability among heterogeneous applications 168493: XML and Web Services (II/2546)
Operational Model of Web Services Service Broker Discover Service Register Service Service Requestor Service Provider Invoke Service 168493: XML and Web Services (II/2546)
Operational Model of Web Services • Service provider • Developing and deploying the Web services • Define the services and publishes them with the service broker • Service broker (service registry) • List various service types, descriptions, and locations of the services that help the service requesters find and subscribe to the required services 168493: XML and Web Services (II/2546)
Operational Model of Web Services • Service requestor • Locate the Web service using the service broker • Invoke the required services • Execute the services from the service provider 168493: XML and Web Services (II/2546)
Web Services Communication Models • In Web services architecture, the communication models can be • RPC-based synchronous • Messaging-based synchronous/asynchronous 168493: XML and Web Services (II/2546)
REQUEST Service Requester Service Provider RESPONSE RPC-Based Communication Model • Define a request/response-based synchronous communication • When the client sends a request, the client waits until a response is sent back from the server before continuing any operation 168493: XML and Web Services (II/2546)
RPC-Based Communication Model • Clients invoke the Web services by sending parameter values to the Web service provider • The Web service provider executes the required method and sends back the return values 168493: XML and Web Services (II/2546)
Messaging-based Communication Model • Define a loosely coupled and document-driven communication • The service requestor does not wait for a response MESSAGE Service Requester Service Provider 168493: XML and Web Services (II/2546)
Messaging-based Communication Model • The client sends an entire document rather than sending a set of parameters • The service provider receives the document, processes it, and then may or may not return a message • With a synchronous model, the client can request a service, then wait, and receive the document from the service provider 168493: XML and Web Services (II/2546)
Implementing Web Services • 1. The service provider • Creates the Web service typically as SOAP-based service interfaces • Deploys the service and make them available for invocation over a network • Describes the Web service as a WSDL-based service description 168493: XML and Web Services (II/2546)
Implementing Web Services • 2. The service provider • Registers the WSDL-based service description with a service broker, which is typically a UDDI registry • 3. The UDDI registry • Stores the service description as binding templates and URLs to WSDLs located in the service provider environment 168493: XML and Web Services (II/2546)
Implementing Web Services • 4. The service requestor • Locates the required services by querying the UDDI registry • Obtains the binding information and the URLs to identify the service provider • 5. The service requestor • Invokes the service provider • Retrieves the WSDL Service description for those registered services 168493: XML and Web Services (II/2546)
Implementing Web Services • 6. The service requestor • Communicate with the service provider • Exchange data or messages by invoking the available services in the service container 168493: XML and Web Services (II/2546)
Implementing Web Services 3. Store service description Service Broker 4. Locate services and its binding info 2. Register/Publish Services 5. Invoke & obtain WSDL Service Requestor Service Provider 6. Exchange data using SOAP RPC/Messaging 1. Create Web Service and WSDL 168493: XML and Web Services (II/2546)
Sun released its Java API for Web Services for the developer community as the Java Web Services Developer Pack (JWSDP) It provides a full-fledged solution package for developing and testing Web services using the Java APIs, such as JAXM, JAXP, JAXR, JAXB, JAX-RPC, Java WSDP Register Server, and JSTL Apache released Apache Axis as a tool for creating and testing Web services Building Web Services in the J2EE Environment 168493: XML and Web Services (II/2546)