Context-awareness has become a desired key feature of today's mobile systems, yet, its realization still remains a challenge. On the one hand, mobile computing provides great potential for adaptations based on sensed contextual information. On the other hand, the lack of dependability in mobile networks hampers an efficient provision of this information to requesting clients. In this paper we present COSINE, a context management framework for mobile environments. COSINE has been developed on the principles of peer-to-peer computing and establishes context sharing infrastructures consisting of loosely coupled Web services. The services represent modular entities of the applied context model and manage the retrieval, aggregation, query, and provision of context data. Clients access the distributed information transparently via proxies and a self-adaptive routing of queries provides increased fault-tolerance, which is essential in mobile environments.