Electronic devices provide all kinds of simple services: audio playback, photo and video capture, localization . . . etc. If able to interoperate with one another, they could provide new complex services unforeseen by their creators. In order to fully exploit the power of such a service-oriented approach in a pervasive computing environment, a technique of runtime ontology recomposition is proposed. Each service is described with concepts from a common ontology. At runtime, the descriptions present in an environment are merged into a runtime version of the ontology which is then used in resolving service queries. It is shown that by maintaining appropriate level of semantic richness, the recomposition does not impair the quality of service matchmaking and that the required richness level may be easily estimated from the original ontology. Also, a proof-of-concept implementation, running on Java-enabled mobile phones is presented.