Complete and reusable description of message structural constraints in web service interfaces

https://doi.org/10.1016/j.csi.2012.09.001Get rights and content

Abstract

Existing specifications for describing message structure as a part of web service description do not support use case-specific definition of structural constraints. We propose a solution to describe a complete set of structural constraints for a particular business object in all its use cases. To implement our solution we use XML Schema (XSD), de facto standard for description of web service message structure. We propose XSD extensions that realize two distinct and complementary approaches. Measurements have shown that by using our extensions the average complexity of real world schemas (XSD documents) comparing to expressional equivalent alternatives is smaller by ~ 29%.

Highlights

► Description of web service messages, as used today limits reuse or hinders flexibility. ► Use case-specific message constraint definition that we propose, solves this problem. ► Our XML Schema extensions enable complete and reusable description of structural constraints. ► We provide the use case centric approach and the element centric approach. ► With our extensions, average complexity of sampled XML Schemas decreased by ~ 29%.

Introduction

Web service description (i.e. interface) should include constraints on message structure [1] using XSD (XML Schema [2]) [3]. XSD is used for description and validation of structure of XML (Extensible Markup Language [4]) messages being exchanged between web services, WS-BPEL (Web Services Business Process Execution Language [5]) business processes and other service consumers. It is widely observed [6], [7], [8], [9] that XSD fails to achieve the objective to provide useful level of structural constraint definition. Useful level is described as the ability to describe all structural constraints while maximizing reuse of the description parts. This is due to a lack of capabilities for use case-specific definition of elements and types that need to be used in different use cases [10], [11], especially regarding the definition of obligatory elements. Solution proposed by the problem observers is (A) to specify elements with specific constraints regarding optionality in different use cases as optional. Such best practice is recommended by standardization organizations, such as NIST [6] and TM Forum [8], advisory organizations, such as Fiatech [7], and industry content providers, such as IBM [9]. In this best practice approach (A), presence of obligatory elements in messages is not validated by the XSD, as these constraints vary for different use cases [6]. This approach has several negative consequences on development and maintenance of final software solution (described in detail in Section 3). However, it is argued by [6], [7], [8], [9] that all these drawbacks weigh out the ones of the obvious alternative solution that proposes (B) usage of a different XSD element/type for each specific use case containing exact structural constraints for that use case. This is mainly due to a significantly poorer reuse [7] (discussed in detail in Section 3).

We believe that all the described disadvantages of the approach (A) by comparison with the approach (B) can be eliminated by enabling use case-specific definitions of structural constraints on XSD types and elements for different use cases. This way all described disadvantages of the approach (B) can be avoided and all described disadvantages of the approach (A) eliminated.

The main objective of this article is therefore to propose a solution to enable use case-specific definitions in XSD. Using our solution obligatory elements are defined in a single element/type for all its use cases, thus number of XSD types in a domain is reduced to a minimum. Consequentially service reuse is the same as in the approach (A). As argued by proponents of the approach (A) it is better than in the approach (B). XSD definitions are used for complete structure validation in all use cases, including checking obligatory elements. There is no additional effort needed for development and maintenance of business logic for this kind of checking. Service descriptions using our solution are self-documented because all structural constraints are defined in XSD. Service consumers can determine the set of obligatory data for each particular use case from the service description alone. Thus, service discovery process is neither aggravated nor prolonged.

We achieve our main objective by proposing XSD extensions for use case-specific definition of XSD types and elements that are used in different use cases, in each with its own set of specific constraints. Proposed extensions provide capabilities for use case-specific definitions of structural constraints, most notably to specify specific elements of a complex type to be used only in some use cases. Proposed extensions realize two distinct approaches. Element centric approach enables definition of specific constraints directly on the relevant elements. Use case centric approach enables definition of constraints overrides from the default use case in separate sections.

This article is organized in eight sections. We present related work in Section 2. In Section 3, we present problems our solution solves from a broad perspective and explain why existing solutions are not satisfactory. We describe the problems in detail in Section 4 and the proposed solution in Section 5. In Section 6, we present proof of concept. We discuss the results in Section 7 and give conclusions in Section 8.

Section snippets

Related work

Review of the related work has shown that a solution similar to ours does not exist. Coen, Marinelli and Vitali [12] have proposed SchemaPath, a solution to support of co-occurrence constraints in XSD. These constraints describe that if a specific attribute or element is present, another attribute or element must also be (or must not be) present inside the same type. This is a different kind of conditional definition of types as our use case-specific definition. Our solution enables definition

Motivation

SOA (service oriented architecture) encourages reuse and sets increased reuse as one of its goals for a quality integration of systems through web services [17]. Organizations are developing standards to define relevant information units that will be shared (especially guidelines to use XSD capabilities in different contexts) [18]. Web services often supplement input to produce value added output modeled by BOs. A BO describes and models something that belongs to an organization and hence, has

Problem description

Proponents of the approach (A) [6], [7] argue that there may be multiple business transactions that reuse a common piece of schema. Industry proponents of the approach (A) [8], [9] provide service descriptions that actually reuse a large part of schemas as a part of their solutions. During our work designing schemas for service description on real world scenarios we encountered several similar design challenges where decision whether to use the approach (A) or the approach (B) was necessary.

Proposed extensions to XSD

XSD does not support definition of use case-specific structural constraints. Our objective is to enable this support. To achieve this objective, we propose specific XSD extensions. Our extensions are designed to support two complementary approaches. The first approach is the element centric (EC) approach. It is used to describe use case specific constraints directly on elements, e.g. whether a particular element should be obligatory in a specific use case. The second approach is the use case

Proof of concept

To demonstrate problems that our extensions address more clearly, we describe a simplified billing service (an example of use case described in Section 4.2). We use this example to demonstrate how our extensions can be leveraged to address the described problems, how they are properly used according to described syntax, and to make their semantics more tangible. Example billing service receives prepared invoice message containing (among others) items to be billed and ID of the price list to be

Discussion

Schemas using our extensions specify exactly which elements are obligatory in which use cases while the approach (A) does not. This way we have eliminated all disadvantages of the approach (A). XSD enhanced with our extensions can provide full data validation. Therefore there is no more need for a separate validation of obligatory elements outside the XSD. This eliminates additional effort for development and maintenance of separate validation rules and the possibility to introduce errors in

Conclusion

We have proposed a solution for complete self-documented description of web service message structure that enables reuse of parts of the description. We implemented our solution by proposing extensions to XSD. Proposed extensions enable definition of XSD types and elements to be used in different use cases, each with its own set of specific structural constraints. We have introduced support for use case-specific definition of XSD types and elements that did not exist before. We have shown that

Ales Frece, B.Sc., is a researcher preparing his doctoral dissertation. His research is focused on business process management and service oriented architecture. He participates in several research and applicative projects, such as business process consolidation and optimization, development of proof-of-concepts, pilots and blueprints. He co-authored WS-BPEL 2.0 for SOA Composite Applications with IBM WebSphere 7 book. He is an IBM SOA Solution Designer and SOA Associate.

References (28)

  • TM Forum

    Information Framework (SID) release 9.5

  • IBM

    WebSphere Industry Content Packs

  • D. Lee et al.

    Comparative analysis of six XML schema languages

  • M.S. Ansari et al.

    A comparative analysis of XML schema languages

    Database Theory and Application

    (2009)
  • Cited by (1)

    • A domain independent readability metric for web service descriptions

      2017, Computer Standards and Interfaces
      Citation Excerpt :

      While these approaches adopt a catalog of anti-patterns different from ours, the approach presented in this paper complements and increases the existing tools (e.g., those focused in discoverability) to improve the quality of Web Services from the readability perspective. Similar to our goal, in [51] the authors present an approach to improve the quality of service descriptions. They propose a solution to describe a complete set of structural constraints for a particular business object in all its use cases.

    Ales Frece, B.Sc., is a researcher preparing his doctoral dissertation. His research is focused on business process management and service oriented architecture. He participates in several research and applicative projects, such as business process consolidation and optimization, development of proof-of-concepts, pilots and blueprints. He co-authored WS-BPEL 2.0 for SOA Composite Applications with IBM WebSphere 7 book. He is an IBM SOA Solution Designer and SOA Associate.

    Matjaz B. Juric, Ph.D., is Full Professor at the University of Ljubljana and the head of SOA and Cloud Computing Competence Centre. He has authored 15 SOA and Java books, such as Business Process Driven SOA using BPMN and BPEL, SOA Approach to Integration, Business Process Execution Language, BPEL Cookbook (award for best SOA book in 2007), etc. Matjaz has been SOA consultant for several large companies. He has contributed to SOA Maturity Model and performance optimization of RMI-IIOP, etc. He is also a member of the BPEL Advisory Board, an Oracle ACE Director, IBM Champion and a Java Champion.

    View full text