Data-Providing (DP) services allow query-like access to organizations' data via web services. The invocation of a DP service results in the execution of a query over data sources. In most cases, users' queries require the composition of several services. In this paper, we propose a novel approach for querying and automatically composing DP services. The proposed approach largely draws from the experiences and lessons learned in the areas of service composition, ontology, and answering queries over views. First, we introduce a model for the description of DP services and specification of service-oriented queries. We model DP services as RDF views over a mediated (domain) ontology. Each RDF view contains concepts and relations from the mediated ontology to capture the semantic relationships between input and output parameters. Second, we propose query rewriting algorithms for processing queries over DP services. The query mediator automatically transforms a user's query (d...