{'fraction_non_alphanumeric': 0.026379908162309063, 'fraction_numerical': 0.00791865804516915, 'mean_word_length': 5.068524310491896, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Web services synchronization health care application

With the advance of Web Services technologies and the emergence of Web Services into the information space, tremendous opportunities for empowering users and organizations appear in various application domains including electronic commerce, travel, intelligence information gathering and analysis, health care, digital government, etc. In fact, Web services appear to be s solution for integrating distributed, autonomous and heterogeneous information sources. However, as Web services evolve in a dynamic environment which is the Internet many changes can occur and affect them. A Web service is affected when one or more of its associated information sources is affected by schema changes. Changes can alter the information sources contents but also their schemas which may render Web services partially or totally undefined. In this paper, we propose a solution for integrating information sources into Web services. Then we tackle the Web service synchronization problem by substituting the affected information sources. Our work is illustrated with a healthcare case study.


INTRODUCTION
The incredible growth of the information space and the increasing number of available information sources are factors which arise a growing interest for integrating information sources into Web services in order to enhance collaboration and knowledge sharing between enterprises . The emergence of Web services as a model for integrating heterogeneous web information has opened up new possibilities of interaction and offered more potential for interoperability. However, the organization into Web services raises problem of becoming obsolete when changes occur on information sources. To avoid becoming obsolete, when information sources change their contents and/or their schema, Web services have to be substituted in order to ensure the integrity, the accessibility, the availability and the consistency of the afforded information. We consider that a Web Service is affected when one or more of its associated information sources are affected by schema changes. A critical challenge therefore is to design a system able to substitute affected Web services. In our solution we aim to propose a mediator able to integrate information sources into Web services while addressing the synchronization issue for affected Web services based on EVE framework [1]. Since EVE system proposes a prototype solution to automate view definitions rewriting thanks to Meta knowledge about information space formed by information sources, to Meta knowledge about user space constituted by evolving view definitions, and view synchronization algorithms [2] [3].
We propose to take advantages of this approach and to adapt it in our context which is Web services. Our system revolves around three main components which are: A Web services Meta Knowledge Base WSMKB containing Web services, information sources and substitution constraints.
A Web services View Knowledge Base WSVKB containing Web services and related views definition.
Web services synchronization algorithm AS²W substituting affected Web services after schema changes using WSMKB and WSVKB constraints.
As illustration, we adopted a case study related to a domain characterized by a prominent need for information integrity and availability: Healthcare services. This paper is organized as follows: Section 2 describes the related .Section 3 introduces the Web service model for gathering information sources. In section 4, we present the Web services synchronization solution by presenting the middleware main components which are the WSMKB, the WSVKB and the Web services synchronization algorithm and our illustration by the healthcare application. In section 5, we introduce our Web services synchronization algorithm AS2W. And section 6 concludes our work and presents some insights for future work.

RELATED WORKS
In the information space, data providers are autonomous. However , they usually have control over the schemas of their information sources which raises the question of the influence of schema changes, that can render affected view definition undefined [4][5] [6]. Different approaches for addressing this problem have been presented in the literature. Service synchronization or substitution based on the functional properties of components has been addressed by many authors [7,8,9,10,11]. What sets us apart from the proposed approaches is that we aim at addressing the service synchronization problem taking into account the detection of changes which can occur on information sources from which Web services are constructed. In this context, EVE project [12] [13], offers a generic framework within which a view adaptation is solved when underlying information sources change their capabilities. It neither relies on a globally fixed domain nor on ontology of permitted classes of data, both strong assumptions that are often not realistic. Instead, views are built in the traditional way over a number of base schemas and those views are adapted to base schema changes by rewriting them using information space redundancy and relaxable view queries [14]. The benefit of this approach is that no predefined domain is necessary, and a view can adapt to changes in the underlying data by automatically rewriting user queries, thanks to synchronization algorithms. This framework has opened up a new direction of research by identifying view synchronization as unexplored problem of current view technology in the WWW. Our approach distinguishes itself from EVE [12] by the fact that we rely on specific advanced applications on the WWW which are Web services. Another novelty of our approach is to apply our work is the health care domain.

WEB SERVICES MODEL
In today's collaborative environment, Web services appear to be a privileged mean to interconnect applications across organizations. Web Services are software systems designed to support interoperable machine-to-machine interaction over a network [15]. They are modular applications with interface descriptions that can be published, located, and invoked across the Web [16].
Different formalisms are proposed in the literature for modelling Web services. In [17, 18, and 19], state machine formalism is used for the description of Web services. This choice is justified by the fact that the state machine is simple especially to describe Web services conversation. The states represent phases through it passes the service while interacting. The states are labelled with logic names and the transitions are labeled with operations. In [20,21], Web services are modelled using state chart diagram which is a graphic representation of a state machine. The service chart diagram is based on the UML state chart diagram to specify Web services components. None of the studied formalisms can be suitable for modelling the changes that can occur on Web services. In this section we introduce a novel approach for modeling and specifying Web services.
This approach sheds the light on two types of behaviours which are presentation and dynamic parts where: The dynamic Web service includes information sources access using views The static Web service part contains the presentation components Web service presentation and dynamic parts are executed iteratively as given in Figure 1 While   Let WS be a Web service and Vi the set of views defined accessed by Web service dynamic part. We suppose that the view V is undefined after schema changes. The Web service WS is synchronized to the Web service WS' with V rewritten on V'∈ Vi as shown in figure 3. The substitute Web service can be equivalent (≡), superset (⊇), subset (⊆) or indifferent (≈) to the initial Web service.
The substitute Web service is equivalent (≡) to the initial Web service, if all dynamic part views of the substitute Web service are equivalent to all dynamic part views of the initial Web service. The substitute Web service is a superset (⊇) of the initial Web service, if at least one of the dynamic part views of the substitute Web service is a superset of one of the dynamic part views of the initial Web service. The substitute Web service is a subset (⊆) of the initial Web service, if at least one of the dynamic part views of the substitute Web service is a subset of one of the dynamic part views of the initial Web service. The substitute Web service is indifferent (≈) of the initial Web service, if all dynamic part views of the substitute Web service are indifferent to all dynamic part views of the initial Web service.

WEB SERVICES SYNCHRONIZATION FRAMEWORK
Web services are built from distributed, heterogeneous, autonomous information sources which change continuously not only contents but also their schema which may render Web services undefined. We propose therefore a synchronization process which consists on detecting schema changes and substituting affected Web services. Only the two operations attribute deletion and relation deletion affect Web services. The Web service synchronization algorithm searches possible substitution of the affected component (attribute or relation) using WSMKB constraints and WSVKB constraints.
Our solution takes the form of a middleware connecting Web services to information sources as shown in figure 3 and is composed by: A Web services Meta Knowledge Base WSMKB containing Web services, information sources and substitution constraints A Web services View Knowledge Base WSVKB containing Web services and related views definition. Web services synchronization algorithm AS²W substituting affected Web services after schema changes using WSMKB and WSVKB constraints.

Web services Meta Knowledge Base (WSMKB)
Web services Meta Knowledge Base WSMKB contains information sources description as given in Figure 5; information sources joining the system must provide its structures and its contents to be stored in the WSMKB. Relationships between information sources have to be added to WSMKB as substitution rules as given in Figure 6, Figure 7 and Figure 8. The WSMKB constraints are represented respecting a model called MISD [22,23]. WSMKB can be organized as follow: WS (WSid, WSISidList): Web services with information sources from which they are built as given in Figure 9. IS (ISid, ISRidList): information sources and their included relations. Relations (Rid, AttList): relations and their included attributes. The relationships between information sources or substitution constraints such as type integrity constraints, join constraints and partial/complete constraints. Replacement (WSid, WSreplacementList): Web services and their substitution Web services list as given in Figure 10.
In the following, we give an example of healthcare application. Each information sources have their own schemas and contents. A type integrity constraint of a relation R(A1,…,An) states that an attribute Ai is of domain type Typei. It allows verifying substitution possibility of an attribute by another while synchronizing Web services. A type integrity constraint is defined as follow: The type integrity constraints are expressed in the following  Join constraint between two relations R1 and R2 states that attributes in R1 and R2 can be joined. It allows verifying substitution possibility of a relation by another while synchronizing Web services. Join constraint between two relations R1 and R2 is defined as follow: JC R1,R2 = (C 1 AND …AND C n ) In figure 7 we state the list of the join constraints related to our example TC Join constraints JC1 S1.Patient.Name = S2.Patient.Name JC2 S1.Patient.Name = S3.Patient.Name JC3 S1.Doctor.Name = S2.Doctor.Name JC4 S1.Doctor.Name = S3.Doctor.Name JC5 S1.Doctor.Speciality = S2.Doctor.Speciality JC6 S1.Doctor.Speciality = S3.Doctor.Speciality JC7 S1.Hospital.Name = S2.Hospital.Name JC8 S1.Hospital.Name = S3.Hospital.Name JC9 S1.Hospital.Localization = S2.Hospital.Localization JC10 S1.Hospital.Localization = S3.Hospital.Localization JC11 S2.Service.Speciality = S3.Service. Speciality

Web services View Knowledge Base WSVKB
The Web Services View Knowledge Base WSVKB contains views definition using E-SQL and relations between Web services and its accessed views as given in Figure 12. E-SQL [22]  language allows user preferences inclusion in views definition to indicate how views can evolve after schema changes. E-SQL is an extension of SELECT-FROM-WHERE and respect the following syntax: Figure 11. Structure of E-SQL query.
In an E-SQL query, each attribute, relation or condition has two evolution parameters.

Example 1
We need to have doctors list from S1 having « Cardiologist » specialty, and accepting substitution of the relation S1.Doctor by the relation S2.Doctor, and accepting substitution of the attribute Name from the relation S1.Doctor by the attribute Name from the relation S2.Doctor. CREATE VIEW V1 VE='⊇' AS SELECT D.IdD, D.Name (AD=false, AR=true) FROM S1.Doctor D (RD=false, RR=true) WHERE (D.Speciality= "Cardiologist") (CD=false, CR=true);

Example 2
We need to have hospitals list from S1 localized in « Tunis » and accepting substitution of the relation S1.Hospital by the relation S2.Hospital, and accepting substitution of the attribute Name from the relation S1.Hospital by the attribute Name from the relation S2.

Case Study
Web services synchronization consists on automatically rewriting or substituting Web services affected after schema changes referring to WSMKB constraints and to WSVKB constraints.
The synchronization process consists on detecting schema changes (relations or attributes deletion), detecting affected Web services and applying synchronization algorithm to determine possible substitution of the affected Web services.

Case 1
Suppose that Name attribute from the relation S1.Doctor is deleted, then it's substituted by Name attribute from the relation S2.

WEB SERVICES SYNCHRONIZATION ALGORITHMS
Web services are composed by presentation and dynamic parts including information sources access using views call. As previously said dynamic part includes services gathered from information sources, the latter change continuously which may render views undefined then may render Web services undefined and inaccessible. So these Web services must be substituted by other ones. Web services synchronization consists on substituting affected Web services referring to constraints embodied into the WSMKB and into the WSVKB. So synchronization process consists on detecting change and according to this change Delete_Attribute procedure or Delete_Relation procedure will be executed as given in Algorithm 1. Only the two operators delete attribute and delete relation are treated by our algorithm.

Relation deletion
The deletion of a relation R affects Web services if it appears in at least one of the views that Web services dynamic part references. To synchronize Web services affected after a relation deletion, we must verify if this relation is replaceable or not and if it's dispensable or not. So we must verify the evolution parameters; dispensable and replaceable parameters.
If the relation is dispensable (RD = True) and not replaceable (RR = False) then this relation can be omitted from the substitute view, then from the substitute Web service. If the relation is dispensable (RD = True) and replaceable (RR = True) then it's substituted if there is a substitution relation, else it can be omitted from the substitute view, then from the substitute Web service. If the relation is indispensable (RD = False) and not replaceable (RR = False) then failure will be returned and the Web service can't be synchronized. If the relation R is indispensable (RD = False) and replaceable (RR = True) then if a substitution relation S exists, then R will be substituted by the relation S, else failure will be returned and the Web service can't be synchronized. A relation S can substitute a relation R if all attributes of the relation R which are indispensable and replaceable (AD = False and AR = True) and appear in SELECT and WHERE clause have substitute attributes in the relation S, and have the same type. Relation deletion affects a set of Web services, so executing Delete_Relation procedure, we have the affected one and Web services substitution will be done if it's possible. Search_Substitution (SA, R); /* search Web services substitution */ 04. END FOR 05. END As given in Algorithm 3, affected Web services are those who are referenced by the deleted relation. So SearchSA procedure will search affected Web services referring to constraints embodied into the WSMKB. IF (Find _Relation (R, S)) THEN 07.
Delete R from V; 10.
ELSE IF (RD = FALSE AND RR = FALSE) THEN 12.
Return failure with msg "Web service can't be synchronized"; 13.
ELSE IF (RD = FALSE AND RR = TRUE) THEN 14.
Return failure with msg "Web service can't be synchronized"; 18.
END IF 20. END FOR 21. END As given in Algorithm 5, Find_Relation procedure will find in WSMKB a substitute relation to the deleted one. It will be substitution if it exists in the WSMKB a relation that substitute the deleted relation. So Replace procedure verifies if two relations are replaceable or not as shown in algorithm 6. As given in Algorithm 7, executing Substitute procedure, will substitute the attributes of the deleted relation R that appears in the SELECT clause and the WHERE clause with the attributes of S and will substitute the deleted relation R with the relation S. Replace the attributes of R with the attributes of S in the SELECT clause and the WHERE clause; 02.
Replace the relation R with S; 03. END

Attribute deletion
A deleted attribute A can affects Web services if it appears in at least one of the views that Web service dynamic part references. To synchronize Web service affected after an attribute deletion, we must verify if this attribute is replaceable or not and if it's dispensable or not. So we must verify the evolution parameters; dispensable and replaceable parameters. If the attribute is dispensable (AD = True) and not replaceable (AR = False) then this attribute can be omitted from the substitute view, then from the substitute Web service. If the attribute is dispensable (AD = True) and replaceable (AR = True) then it's substituted if there is a substitute attribute, else it can be omitted from the substitute view, then from the substitute Web service.
If the attribute is indispensable (AD = False) and not replaceable (AR = False) then failure will be returned and Web service can't be synchronized. If the attribute is indispensable (AD = False) and replaceable (AR = True) then this attribute will be substituted if a substitute attribute exists, else failure will be returned and Web service can't be synchronized. Search_Substitution (SA, A); /* search Web services substitution */ 04. END FOR 05. END As given in Algorithm 9, affected Web services are those who are referenced by the deleted attribute. So SearchSA procedure will search affected Web services referring to constraints embodied into the WSMKB. /* search in WSMKB Web services referenced by the deleted attribute A*/ 02. END Web services synchronization reach on views synchronization, this synchronization is done referring to preferences embodied into the WSVKB. So executing Serach_Substitution procedure as given in Algorithm 10 and according to attribute evolution parameters a set of treatments will be executed. As given in Algorithm 13, executing Substitute procedure, will substitute the deleted attribute A in the SELECT clause and/or the WHERE with B, will add the relation containing B to the FROM clause and will add the join constraint between the relation containing the deleted attribute A and the relation containing the attribute B.

IMPLEMENTATION
A prototype of the proposed system has been implemented. We used AXIS 1.1 which is Java platform for creating and deploying web services applications for creating Web services The graphical user interface, the WSMKB, the WSVKB, and the view synchronizer are implemented using Java, and the participating ISs are built on Microsoft Access. The communication between the system and the information space is via JDBC. The view synchronization algorithms for the different basic schema changes presented in Section 7 have been implemented.

CONCLUSION
In this paper we proposed a solution to the problem of Web services synchronization caused by changes which can occur to information sources from which Web services are built and which may render Web services partially or totally inaccessible . We have presented as solution a middleware connecting Web services to information sources. The middleware is composed by a Web service Meta Knowledge Base WSMKB, a Web Service View Knowledge WSVKB and Web services synchronization algorithms. Our model proved the feasibility of marrying Web services concepts, and the EVE approach [12] which offers a solid foundation for addressing the general problem of how to maintain views in dynamic environments. Future work focus on a total synchronization of Web Services and will not be limited to the two operations attribute deletion and relation deletion which affect Web service. We also intend to develop algorithms for view maintenance of the view extent under both schema and data changes of the information sources.