IE Paper Template

0 downloads 0 Views 502KB Size Report
is to creatively design the subtasks or web methods to create complex ... The service class conveys the web methods or operations that are requested; the ...
International Journal of Science, Innovation and New Technology

vol. 1, no. 3/ Feb 2012

Towards the UML design of Web Services Festim HALILI1, Florim IDRIZI1, Uran LENA2, Merita KASA3 1,2,3 Department of Informatics, State University of Tetovo, Macedonia {festim.halili, florim.idrizi}@unite.edu.mk1, [email protected], [email protected] Abstract Web services are becoming increasingly complex and mission critical. To assist manage this complexity they need to be modeled. This paper introduces a new way of modeling Web services through the UML Diagrams dedicated for a specific use case. Web services can be seen as a new paradigm for the interconnection of classes and the communication among them. They determine three main functions, the service, the repository (directory) and the consumer. The service provider publishes the created Web service to the directory, with intention that consumers can find them and bind a required service. We strive to indicate the UML modeling of the activities occurred in Web services, which would be useful for their coders or their providers to implement them. The paper deals with the UML diagrams and their implementation in a specific case study for a Traveller Management System (TMS). Keywords: UML, TMS, Class Diagram, Activity Diagram, Use Case Diagram, Web Services, HTTP, WSDL, SOAP, XML, UDDI

Introduction We can define Web services as functional components, conducted over the internet which may comply with core standards such as HTTP (Hypertext Transfer Protocol), WSDL (Web Services Description Language), XML (eXtended Markup Language), SOAP (Simple Object Acces Protocol), UDDI (Universal Description and Discovery Integration), WS-Security (Web Services Security Language) etc. It is a service accessible over the internet which takes XML as input and provides an XML result. The idea behind UML modeling of Web services is to creatively design the subtasks or web methods to create complex driven-tasks applications. In the field of Web services there are two main standards that can be modeled [1]: 1. The service modeling – identifies services to be exposed with their interfaces and web methods or operations. 2. The workflow modeling – indicates the control and the flow of data through SOAP (Simple Object Access protocol) from one service to another. Here we will try to model a mix of these two standards, and explain the interaction of services through three UML Diagrams. There exists many vendors that offer softwares for creating Web services. Before starting to build Web Services, we have to define the requirements on which this application will be built and the best way to absorb the needs is by modelling them. Firstly, we have to provide the resources for a specific solution, and in case there are intended many data and records to be stored, it is important to create a database which will be connected via string with web services and store our records [2]. The service class conveys the web methods or operations that are requested; the directory or in some cases the UDDI or Biztalk Server publishes the Web service and its methods so that they can be looked up by an outside consumer. The consumer binds with the Web service so that it can call the services web methods or operations as seen in the below figure 1. The Unified Modelling Language (UML) is a very dominant modelling graphical language for specifying, constructing and documenting the artefacts of software system, taking into account that Web services are software components they can be also modelled through UML diagrams. It takes into account the increased demands on today’s systems, covers a board 1

International Journal of Science, Innovation and New Technology

vol. 1, no. 2/2011

spectrum of application domains, and is suitable for concurrent, distributed, time-critical, socially embedded systems, and many more. UML is a collection of best engineering practices that have successful in the modelling for a design of a huge and complex systems language and notation for modelling, but it is intentionally not a method [3].

Fig. 1. UML Class Diagram showing three components of a Web service UML includes a multitude of model elements and details. The main task of the UML is to create a simple, well documented and easy to understand software model for the people. TMS has received awareness in both the public and private sectors. Nowadays knowledge based system is most popular and needed in every sector like medical sector, banking sector, engineering sector and travelling sector etc. In the travelling sector, knowledge means simply having the knowledge from expert. Knowledge modelling is the major activity used to understand the problem and sending the solution rapidly [4]. We are planning to design web services that deal with the problem of the management process in companies, especially with ticket purchasing and transportation of passengers from one city to another is becoming more complex and not foreseen, due to the influx of people who choose to commute every day. Manner of booking of tickets is one of the problems plaguing travellers as well as personnel of the company. Due to the variable number of number of passengers travelling within the week you may find that certain day a number of passengers to stand during the whole journey, or leave the bus with a small number of passengers, as a result of not having a preliminary list of passengers who will travel before departure. 2. UML Object Modeling for TMS Web services The UML class diagram for TMS designed & shown below in Fig.2. The class diagram is composed by travellers, travelling company, travel, relation, bus. Traveller class has single association with Traveller Agency class and the Traveller Agency class has multiple associations with the Traveller class. Relation class has a composition 1..* with Travel class. And travel has just one relation. Travel Company has more travel. The travel belongs only one company. One Travel has one bus.

2

International Journal of Science, Innovation and New Technology

vol. 1, no. 3/ Feb 2012

Fig. 2. UML Class Model for TMS Web Services

In the above diagram, we can percept the applicable web methods that make a specific Web service and the operations that are included. It is important to mention that operations of UML diagrams are equal to web methods in a certain Web service. In other words, the TMS Web services represent a specific business function, exposed by a company usually through internet connection, provided to another company or software application to consume [5]. 3. UML Use Case Modeling for TMS Web services In this section, we will define a dynamic modelling for the TMS system Web services, by providing a scenario for the unnamed traveller. The traveller sends a message to the number of the company, than it determines the travel time and number of seats. Mobile system saves the message in the text file. The user reads the message and sends to the system. Furthermore, the system asks if the data are part of the tour. Save Return: It reserves seats; Mobile system sends feedback to the user through a confirmation message for the reservation. From the beginning, use-case diagrams are used for providing an overview of usage requirements for a system that needs to be built. Our aim is to address a novel development process that does not aim at the construction of a ‘system’ but, rather, of two kinds of software applications – services and activities – that can be bound to other software components either statically (in a component based way) or dynamically (in a service-oriented way - SOA) [6]. An advantage of using the (formal) specification language of business roles over state charts is that it supports under specification (logical formulas are used for specifying effects and publication of events) and a refinement process that allows designers to start with loose requirements over states and transitions and add detail as more knowledge is gathered about the required behaviour [7]. Actors are entities located outside the system and are involved in interaction with the system described in use case. Actors are the users of the system. In our case the actors are: user (Travel company), traveller and the mobile system . And the system is described from the viewpoint of the actors. Each use case describes a process which is performed by actors. 3

International Journal of Science, Innovation and New Technology

vol. 1, no. 2/2011

Fig. 3. UML Use Case Model for TMS Web Services The proposed specialisations of use-case diagrams allow us to derive a number of aspects of the structure of TMS modules. Each use case, representing either a service or an activity, is naturally modelled as either a TMS service module or activity module, respectively. The actors associated with a use case identify the interfaces used in the module. It is straightforward to model each actor type with a specific type of interface of the SRML module. Each useractor, which represents the interface to the user that triggers the instantiation of an activity, is modelled as a TMS interface. In Web services there are implemented some technologies for enabling this interaction of the three actors: HTTP for transport, XML for data description, SOAP for invocation, WSDL for service description and UDDI and WSIL for service discovery [9]. Since that XML is the main protocol that deals with the problem of interoperability, it can be described as a document which consists of elements or markup, which are used to describe the structure, and the actual data which is contained by the elements. The document is text based, application-independent and readable by humans, but the core issue here is that the rules of the language make it easy for the computer to generate and read the data. This simplicity and interoperability have helped XML [10] achieve widespread acceptance and adoption as the standard for exchanging information between heterogeneous systems in a wide variety of applications, including Web services.

4

International Journal of Science, Innovation and New Technology

vol. 1, no. 3/ Feb 2012

4. UML Activity Diagram and Sequence Modeling for TMS Web services This part focuses on how to model and compose workflow Web Service for a TMS application. The data represented in the Activity and Sequence diagram are useful for the execution of the resulting workflow [8]. Activity diagram determines the flow of control. It indicates the dynamic activity and the event that causes object to be able to separate. In our case, the activity diagram describes how actions performed to carry on the web service of booking the ticket. It can be explained by this example: Travellers send SMS messages. The mobile system receives message and save it in test file. Secretary reads and sends it to the system; afterwards the system sends to controlling process. Once, the trip is in the travel list, than the system responses to the traveller through mobile.

Fig. 4. UML Activity Model for TMS Web Services

5

International Journal of Science, Innovation and New Technology

vol. 1, no. 2/2011

Fig. 5. UML Sequence Model for TMS Web Services The above figure represents the UML Sequence model for the TMS Web services. It describes the sequence of actions that occur in the Web service. The calling method in each object (user, reservation and travel) and the order in which the call or invocation is captured in the diagram is presented sequentially. Sequence diagram is built from objects and messages. Sequence diagrams demonstrate the behaviour of objects in a use case by describing the objects and the messages they convey. Here traveller sends the request to the Traveller Management System to reserve a seat then TMS checks the Travel record and if it has a seat available then it makes a reservation. We have to be very careful when we deal with the modelling of the Web service, since that there are nine main diagrams, we have to chose the most appropriate for our needs, or for the best way of describing the activities or the role of the Web service in a specific system or application. 5. Conclusions The technology is evolving each day, and new ways of representing systems arise. From the above explanations and diagrams of TMS Web services it is concluded that the UML modelling is a powerful language used to design for the software research problems. In this paper complete modelling is done for TMS system which is efficient & useful for the software developer to convert the above mode through Object Oriented language. The model is also test by designing a query represented in form of scenario. The present work can also be further extended for company having large database of traveller which can be further streamlined by the use of designing of data cubes model so that search can be faster, therefore work can be extended in the field of data mining. References [1] R. Grønmo and I. Solheim, ”Towards Modeling Web Service Composition in UML,” in INSTICC Press. The Second International Workshop on Web Services: Modeling, Architecture and Infrastructure, Porto, Prtugal, April 2004, pp. 1-2. 6

International Journal of Science, Innovation and New Technology

vol. 1, no. 3/ Feb 2012

[2] Festim Halili, Merita Kasa, Analysis and comparison of web service architectural styles, and business benefits of their use. In Information Systems and Technologies and their importance in the Economic Development. University of Tirana, Republic of Albania, 6 / 2011. ISBN: 978-99956-59-13-4, pp. 701-707. [3] Sh. Hekmat, UML Process. Bucharest: PragSoft Corporation, 2005, pp. 6-10. [4] J. Rumbaugh, I. Jacobson and G. Booch, The Unified Modeling Language Reference Manual. Addison Wesley Longman, Inc, England 1999, pp.23-28. [5] Ch. Armstrong, Modeling Web Services with UML, OMG Web Services Workshop, Roseville, 2002, pp.3. [6] L. Bocchi, J.L. Fiadeiro and A. Lopes, ”A Use-Case Driven Approach to Formal ServiceOriented Modelling,” in IST-2005-16004 Integrated project on SENSORIA: Software Engineering for Service-Oriented Overlay Computers, Lisboa, Prtugal, April 2005, pp. 8-9. [7] J. L. Fiadeiro, A. Lopes, L. Bocchi, A formal approach to service-oriented architecture. In: M. Bravetti, M. Nunez, G. Zavattaro (eds) Web Services and Formal Methods. LNCS, vol 4184. Springer, Berlin Heidelberg New York, 2006, pp 193–213. [8] Y. B. Hlaoui, L.J BenAyed, Extended UML activity diagram for composing Grid services workflows. In: Third International Conference of Risks and Security of Internet Systems, Tunis, 2008, pp 207–212. [9] White Paper, Web Services. Sonera Plaza Ltd MediaLab, June 12, 2002. [10] J.Pehcevski, XML Family of Technologies, SEEU-presentation, Macedonia 2009. Festim HALILI has graduated the Faculty of Contemporary Sciences and Technology in 2007. He holds an MSc diploma in Computer Sciences from 2011 and till now he has been involved in many projects and scientific papers. Currently he is Assistant of Informatics within the Faculty of Natural and Math Sciences in the State University of Tetovo. His work focuses on the field of Web services, Artificial Intelligence and Data Modelling. Florim IDRIZI has graduated the Faculty of Informatics in the State University of Tetovo. He holds an MSc diploma in Informatics and he is a PhD candidate at the University of Tirana. Till now he has been involved in many projects and scientific papers. Currently he is Assistant of Informatics within the Faculty of Natural and Math Sciences in the State University of Tetovo. His work focuses on the field of Cryptography, Computer Logic Design and Data Modelling. Uran LENA is an excellent student of the department of Informatics in the State University of Tetovo, he holds a scholarship from the Ministry of Education in Rep. Of Macedonia. His work focuses on the field of Databases, Software Engineering and Programming. Merita KASA is an excellent student of the department of Informatics in the State University of Tetovo, she holds a scholarship from the Ministry of Education in Rep. Of Macedonia. Her work focuses on the field of Web services, Software Engineering and Programming.

7