Automating Web Service Discovery, Customization, and Semantic Translation with a Semantic Discovery Service

Daniel J. Mandell
Stanford University
Knowledge Systems Laboratory
Dept. Computer Science, Stanford University
Stanford, CA 94305-9020, USA
Sheila A. McIlraith
Stanford University
Knowledge Systems Laboratory
Dept. Computer Science, Stanford University
Stanford, CA 94305-9020, USA


The ultimate goal for the Web services effort is seamless interoperation among networked devices and programs through the development of distributed computing infrastructure and Web standards. Once achieved, many see Web services as providing the infrastructure for universal plug-and-play and ubiquitous computing. Recent industry efforts to this end, however, leave us a long way from seamless interoperation. Researchers in the Semantic Web community have taken up this challenge proposing top-down approaches to achieve aspects of Web Service interoperation based on techniques from artificial intelligence. Unfortunately, many of these efforts have been disconnected from emerging industry standards, particularly in process modeling. In our work, we take a bottom-up approach to integrating Semantic web technology into Web services. Building on BPEL4WS, a leading recent addition to the Web services process modeling effort, we have developed integrated Semantic Web technology for automating customized, dynamic discovery of Web services together with interoperation through semantic translation.


Semantic Web, Web Services, BPEL4WS, DAML+OIL, DAML-S, Process Modeling, Automated Service Discovery, Automated Semantic Translation.


The leading industry framework for Web service integration is BPEL4WS [2], and its associated computing machinery, BPWS4J. The BPEL4WS specification provides a notation for describing interactions of Web services as business processes that orchestrate a workflow between service partners. Workflow is directed by traditional control structures like if, then, else, and while-loop. Through the execution of a pre-scripted workflow over pre-selected service partners, BPWS4J provides a mechanism for automated service execution. Because services are discovered prior to the execution of a request, BPWS4J cannot tailor service partners to meet user-defined constraints. Furthermore, because the description of service inputs and outputs is restricted to the expressivity of XML, the choice of service partners is commensurately limited.

In an effort to bring higher levels of automation to the existing industry effort, we have developed the Semantic Discovery Service (SDS) to extend BPWS4J with customized, automated service discovery [8], along with semantic translation [7]. By embracing Semantic Web [1] technology the SDS alleviates the above shortcomings in BPWS4J.


We adopt several key technologies to enable the description of services in a computer interpretable format and the discovery of services with desirable properties. Among them are:

  1. DAML-S [3]: We describe our Web services in DAML-S, an ontology based on DAML+OIL [5]. As a DAML+OIL ontology, DAML-S has a well-defined semantics, making it computer-interpretable and unambiguous.
  2. DAML Query Language (DQL) [4]: We adopt DQL as our formal language and protocol for querying repositories of DAML-S service profiles. DQL queries are handled by a DQL server, which interfaces with an automated reasoner operating over a knowledge base (KB) of DAML-S profiles. The reasoner determines which profiles meet the query restrictions
  3. Java Theorem Prover (JTP) [6]: We use JTP as the DQL server's automated reasoner. JTP is a hybrid reasoning system based on first-order logic model elimination. JTP is a particularly compelling candidate for our work because of its special purpose DAML+OIL reasoner.


With the above technologies in hand, we construct an SDS to bring the discovery of user-specific service partners and wider integration through semantic translation within BPWS4J's perspective as an aggregator of existing services.

3.1 Form and Function of the SDS

The SDS sits between a BPWS4J process and its potential service partners. Instead of routing requests to previously selected partners, BPWS4J directs them to the SDS through a locally bound Web service interface. In order for the SDS to dynamically discover customized service partners, SDS messages contain (1) the parameters to be sent to a discovered service partner, and (2) the required service partner attributes, including functional and user constraints, expressed in DAML-S sentences. The SDS then locates appropriate service partners and serves as a dynamic proxy between the BPWS4J engine and the discovered partners. With this interface come two important properties of the interactions between the SDS and BPWS4J:

  1. The SDS is agnostic as to the content of the service descriptions and invocation messages it receives.
  2. The SDS is stateless, with no knowledge of prior interactions, and no service-specific properties.

These properties grant the SDS portability between any BPWS4J actions and processes.

3.2 Automated Service Customization

Upon receiving an invocation request, the SDS sets to work at discovering a service partner that meets the user and functional constraints encoded in the request. The DAML-S restrictions are wrapped into a DQL query and sent to the DQL server. The DQL server invokes the JTP DAML+OIL reasoner to compute the set of DAML-S profiles meeting the query criteria. Matching DAML-S profiles are returned to the SDS as answer bundles. The SDS selects a partner from the answer bundles and invokes the partner's endpoint with the message parameters supplied by BPWS4J. The partner does its work and responds to the SDS, which in turn forwards the response to BPWS4J. BPWS4J recovers flow control, and continues executing the process workflow, invoking the SDS whenever a customized Web service invocation is needed (see Figure 1).

Figure 1. Interaction flow between BPWS4J, SDS, DQL server, and discovered service partners

3.3 Automated Semantic Translation

In the context of Web services, semantic translation refers to redefining well-defined data types in terms of their relationships to one another via translational axioms. Semantic translation increases Web service interoperability in a number of ways, including the ability to automatically translate the inputs and outputs of service partners so they may interact seamlessly.

The SDS provides automated semantic translation for Web service discovery. Our approach uses a recursive back-chaining algorithm to determine a sequence of service invocations, or service chain, which takes the input supplied by BPWS4J and produces the output desired by BPWS4J. Our translation axioms are encoded into translation programs exposed as Web services. The algorithm invokes the DQL server to discover services that produce the desired outputs. If the SDS does not have a required input, the algorithm searches for a translator service that outputs the required input and adds it to the service chain. The process is recursive and terminates when it successfully constructs a service chain, or the profiles in the KB (or some bounded subset) are exhausted.


To illustrate the operation of our work on a real-world task, we now consider automated service customization and semantic translation within the context of procuring a loan. One possible decomposition of the task involves a BPWS4J loan-finding process that retrieves a credit report from an assessor, and passes it to a lender service for approval, returning a LoanResult to the user. Assume that the user has recently moved to California, USA from the United Kingdom, so that the only potential credit-reporting agency is based in the UK. This credit assessor produces credit reports of class UKCreditReport. BPWS4J must then invoke a service that inputs a UKCreditReport and outputs a LoanResult. Assume further that the user must get a loan from a US lender and, moreover, wishes to borrow from a California-based lender (to take advantage of in-state tax incentives). The SDS may locate a CA-based lender using automated customization, but if the only such lender available requires a USCreditReport as an input the SDS would fail to discover an appropriate lender. The BPWS4J process would report that the request could not be completed.

With semantic translation, the user's request becomes satisfiable. We introduce into the DAML-S KB the profile for a DateTranslator service that translates between USCreditReport and UKCreditReport classes. Assume that this service implements a semantic translation axiom that, for simplicity, properly declares that the credit reports are identical except that the US version represents dates as MM/DD/YYYY, while the UK version uses DD/MM/YYYY. Since the DateTranslator service requires a UKCreditReport as an input, and the SDS has one available, the algorithm adds the DateTranslator to the chain. The service chain (assessor->DateTranslator->lender) now consumes a UKCreditReport and produces a LoanResult as desired by the BPWS4J process. The SDS executes the service chain and returns the LoanResult to BPWS4J.


Seamless interoperability among networked programs and devices is critical for Web services to provide an infrastructure for the vision of ubiquitous computing. Towards this end, we developed software that extends industrial machinery with Semantic Web technology to enable automated service discovery, customization, and semantic translation.


  1. Berners-Lee, T., Hendler, J., Lassila, O. The Semantic Web, Scientific American, May, 2001.
  2. Curbera, F., Goland, Y., Klein, J., Leymann, F., Roller, D., Thatte, S., Weerawarana, S. Business Process Execution Language for Web Services.
  3. DAML Services Coalition. DAML-S versions 0.5, 0.6 and 0.7.
  4. Fikes, R., Hayes, P., Horrocks, I. DAML Query Language, Abstract Specification, 2002.
  5. Fikes, R. and McGuinness, D. An Axiomatic Semantics for RDF, RDF-S, and DAML+OIL, Manuscript. March, 2001.
  6. Java Theorem Prover. http://www.ksl.Stanford.EDU/software/jtp/.
  7. McDermott, D., Burstein, M., and Smith, D. Overcoming ontology mismatches in transactions with self-describing agents. In Proc. Semantic Web Working Symposium, pages 285-302, 2001.
  8. Paolucci, M., Kawamura, T., Payne, T., and Sycara, K. Semantic Matching of Web Services Capabilities. To appear in Proceedings of the 1st International Semantic Web Conference (ISWC), 2002.