Sie sind auf Seite 1von 6

Tunku Abdul Rahman College

Advanced Diploma in Science AACS5274 Web Services Tutorial 1 1.


What are Web services? Differentiate between conventional Web-based applications and Web services. Answer: A Web Service is a self-describing, self-contained software module available via a network, which completes tasks, solves problems, or conduct transactions on behalf of a user or application. Web services constitute a distributed computer infrastructure made up of many different interacting application modules through public/private networks to form a single logical system. Basically, Web Services are software program that use XML to exchange information with other software via IP. It communicates over the network to supply a specific set of operations / functions that other can invoke. This means, application (one computer) send requests from a computer and possible receives responses from, application on other computer. Web services are more visible and manageable than Web-based applications. The state of a Web service can be monitored and managed at any time regardless the fact that a Web service may not run on local machine or may be written in an unfamiliar programming language.
Note: Any acceptable differences will be awarded.

2.

Name and briefly describe each of the types of Web services. Mention THREE (3) typical examples that make use of Web services to solve complex business applications. Answer: Simple web services Complex web services Typical Examples: 1. Order management application. 2. Returning the current price for a given stock. 3. Checking a credit rating of a potential trading partner prior to the completion of a business transaction. 4. Requesting quotation of a given product. 5. Google Web service: Google Search Engine 6. Amazon Web service
Note: Any examples and clearly explain them, will be awarded.

3.

Describe service-oriented computing and discuss the essential roles played in the service-oriented model. You may use a diagram to elaborate your answer. Answer: Service-oriented computing is a emerging paradigm that utilizes services as components to support the development of rapid, low-cost composition of the distributed app. Services are self-contained modules that can be described, published , located, orchestrated and programmed using XML-based technologies over a network. Services can be defined as any piece of code and any application components can be transformed through network resources. Services perform functions that can range from answering simple requests to executing business processes requiring peer-to-peer relationships between service consumers and providers. This means they are loosely coupled. Service-based applications can be developed by discovering, invoking, and composing networkavailable services rather than building new applications. Service-oriented model is made between as follows: Service providers (organizations that provide the service implementations, supply their service description, and provide related technical support.) Service clients (end-user organizations that use some services) Services aggregators (organizations that consolidate multiple services into a new and single orchestrated service.) Services may be offered by different enterprises and communicate over the Internet.

4.

What are stateful and stateless services? Give examples. Answer: Stateless : services that can invoke repeatedly without having to maintain context or state. E.g. informational weather report service, does not keep any memory of what happens to it between requests (all information is either in requested message or in data repository ). Stateful : services that may require their context to be preserved fro one invocation to the next. (maintain some states btw different operations invocation issued) E.g. session-based or conversational-based service. E.g. order management app (PO acceptance -> ack -> ship -> invoice) How do synchronous services differ from asynchronous services? Answer: Synchronous services: Clients express their request as a method call with a set of arguments, which returns a response containing a return value. (this implies sends a request msg and expects for a response msg before continuing, otherwise fails the following op) Typical RPC-style Web service used are of: The client invoking the service requires an immediate response. The client and service work in a back-and-forth conversational way Typical synchronous service with RPC-style examples include: Returning the current price for a given stock. Providing the current weather conditions in a particular location. Checking a credit rating of a potential trading partner prior to the completion of a business transaction. Asynchronous services: Are document-style or message-driven services. Clients invoke a message-style service by sending an entire document such as purchase order (PO), rather than a set of parameters. Service accepts the document and processes it. (May or may not return result message) Clients need not expect / wait for a response before it continues the remaining operations. The response of the service may result in hours and days. Typical Document-style Web service used are of: The client does not require an immediate response. The service is document-oriented. Typical asynchronous service with Document-style examples include: Processing purchase order Responding to a request for quote order from a customer Responding to an order placement by a particular customer What is loose coupling and how does it compare to tight coupling? Answer: Loose coupling allows systems to connect and interact more freely across the Internet. Applications need not know how their app behave or are implemented. Loosely coupling environment is asynchronous or event-driven model interactions. Advantages: agility and the ability to survive evolutionary changes in the structure and internal service implementation. Flexibility and interoperability to build highly integrated, cross-platform, pro-to-pro comm environments. Tight coupling does not allow systems connect and interact dynamically. Applications need to know how their partner apps behave such as details how the partner to be communicated with, including methods parameters, return type, etc. Tightly coupling is synchronous interactions such as those traditional applications design. Disadvantages: Difficult and cumbersome as the no. of app and services increases, the no. of interfaces need to be created and maintain quickly becomes unwieldy. Time-consuming in defining the connections and relationships btw any two cooperating apps.

5.

6.

7.

Define and describe the significance of a service-oriented architecture. Answer: Service-oriented architecture (SOA) is a logical way of designing a software system to provide services to either end-user applications or to other services distributed in a network, via published and discoverable interfaces. To achieve this, SOA enable the infrastructure in an organization into interconnected collection services, each of which is discoverable and accessible through standard interfaces and messaging protocols. Goals: to enable general-purpose interoperability among existing technologies and extensibility to future purposes. (enabling extensible interoperability) The building block services might employ pre-existing components that are reused, and can also be updated or replaced without affecting the functionality of other independent services. As such, the services model offers numerous advantages over large monolithic applications, in which codes modification can have unintended and unpredictable effects on the rest of the codes. We always discuss the concept of SOA in conjunction with Web services (a message delivery model that makes it easier to deploy SOA).

8.

Briefly explain the Web services technologies: WSDL, SOAP, and UDDI. Answer: Several important modules are: Web Service Description Language (WSDL) A XML-based that describes what a Web service consists of. An XML-based format that describe a web services, listing its method, the data types used for all parameters and the return value, and the supported methods of communication (or binding). Simple Object Access Protocol (SOAP) Provides the communication mechanism to connect Web service. An XML-based format used to encode the information in web service request and response messages before sending them over the internet. For example, SOAP defines how values of different data types should be represented. Universal Description Discovery Integration (UDDI) Registers and publishes Web services definitions to service registry. (a directory of Web services). A directory that allows clients to find the web services exposed by a specific company. UDDI is the youngest of the web service standards. A Web services registry and discovery mechanism, is used for storing and categorizing business information and for retriving pointers to Web services interfaces.

9.

List three advantages and disadvantages of Web services. Answer: Advantages of using Web services: Web services operate using open, text-based standards, which enable component written in different languages and for different platforms to communicate. Web services promote a modular approach to programming, so multiple organizations can communicate with the same Web service. Web services are easy and inexpensive to implement, coz they employ an existing infrastructure to exchange information. Moreover, applications can be repackaged as Web services, so companies do not have to adopt entirely new software. Web services have the capability to provide direct application-to-application communication, opening the door for a wide range of potential communications uses. Web services could vastly improve collaboration software development. This is because Web services allow developers to create application by combining code written in any language on an platform. As a result, developers can write programming language which they are most comfortable, and then merge their work with other languages for different platform. This lessens the need for developers to learn multiple programming languages. Disadvantages of using Web services: Current standards do not address security. The Internet is not always available sometimes web traffic experiences congestion with lower bandwidth. Fee

10.

The Web Services architecture describes the principles behind the next generation of e-business architectures, presenting a logical evolution from object-oriented systems to service-oriented systems. With the aid of a diagram, describe the Web Services architecture that comprises component technologies for registering and discovering information Answer: Business would register Web service information with the UDDI Repository. It needs to create a WSDL file to describe the Web services supported by its SOAP processor. The UDDI API registers the information with the repository. Another business entity acts as a client SOAP processor queries UDDI registry to locate the service. The client SOAP can obtain the WSDL or other schema. The client can then generate the appropriate message to send to the specified operation over the identified protocol. Bind to the business provider entity to invoke the Web service.

To be simplified, A Web Services architecture then requires three fundamental operations: publish, find, and bind. Service providers publish services to a service broker. Service requesters find required services using a service broker and bind to them.

11.

Your company provides the Web services to a number of clients. One client is unable to transact services with your company and you state that interoperability is a problem. The client asks you for further details about interoperability concern. You are required to define the term of interoperability to the client and explain how the Web services can successfully be performed. Answer: Interoperability ability of two disparate systems (client and servers) to interact using standard protocols. Web Service Transaction will be successfully exchanged only if the following are true: They use the same version of the same transport TCP/IP running HTTP 1.1. They are created with same version of XML schema. They both use the same version of the WSDL specification. They are using the same version of SOAP. No additional headers were used in the SOAP message without prior agreement. No additional features like WS-signature, WS-transaction were used.

12.

The premise of the foundation of service-oriented computing is that an application can no longer be thought of as a single process running within a single organization. The value of an application is actually no longer measured by its functional capabilites but rather by its ability to integrate with its surrounding environment [Papazoglou 2003]. Discuss the statement above. Answer: For instance, services can help integrate application that were not written with the intent to be easily integrated with other applications and define architectures and techniques to build new functionality leveraging existing application functionality. A new type of applications can be based solely on sets of interacting services offering well-defined interacting to their potential users. These application are often referred as composite applications. Service orientation require and enables (e.g., through providing compose able Web Web Services standards) loosely coupled relationships between applications of transacting partners. At the middleware level, loose coupling requires that the service-oriented approach is independent of specific technologies or operating systems.

13.

Web services are enabling companies to extend their business models. Evaluate the above statement and justify your answer. Answer: Web services are enabling companies to extend their business models because the technology lowers the barrier to entry for new service creation and the potential for service outsourcing.

14.

Differentiate between connection-oriented and connectionless protocols. Answer:

Protocols can be either connection-oriented or connectionless in nature. In connection-oriented protocols, corresponding entities maintain state information about the dialogue they are engaged in. This connection state information supports error, sequence and flow control between the corresponding entities. The windowing scheme presented earlier is an example of a connection-oriented protocol. Error control refers to a combination of error detection (and correction) and acknowledgment sufficient to compensate for any unreliability inherent to the channel. Sequence control refers to the ability for each entity to reconstruct a received series of messages in the proper order in which they were intended to be received; this is essential to being able to transmit large files across dynamically-routed mesh networks. Flow control refers to the ability for both parties in a dialogue to avoid overrunning their peer with too many messages. Connection-oriented protocols operate in three phases. The first phase is the connection setup phase, during which the corresponding entities establish the connection and negotiate the parameters defining the connection. The second phase is the data transfer phase, during which the corresponding entities exchange messages under the auspices of the connection. Finally, the connection release phase is when the correspondents "tear down" the connection because it is no longer needed. An everyday example of a connection-oriented protocol is a telephone call. The call originator must first "dial" the destination phone number. The telephony infrastructure must setup the endto-end circuit, then "power ring" the call terminator. From this point on, the connection is in place until one of the parties hangs up. Once the called party answers the phone, another level of connection (between people) must be established before real messages can be exchanged. Connectionless protocols differ markedly from connection-oriented protocols in that they do not provide the capability for error, sequence and flow control. Nor do they have any connection state maintenance requirement. Each message is considered to be independent of all others in a connectionless protocol. Whether or not a given message is received correctly and when has no bearing on other messages; somehow the destination must sort things out and make sense of it all. Connectionless protocols are always in the data transfer phase, with no explicit setup or release phases as in connection-oriented protocols.

Das könnte Ihnen auch gefallen