Ubiquitous computing environments are highly dynamic by nature. Services provided by different devices can appear and disappear as, for example, devices join and leave these environments. This article contributes to the handling of this dynamicity by discussing service integration in the context of service-oriented architectures. We propose CANIS: a Contextual, Automatic and dyNamic Integration framework of Services. C-ANIS distinguishes two different approaches to service integration. Automatic integration automatically extends the capabilities of an existing service, leaving the interface unchanged. On-demand integration builds a new service on request from a list of given services. We have implemented C-ANIS based on the OSGi/Felix framework and thereby demonstrated the feasibility of these two service integration concepts. We have also implemented a toolkit providing two different techniques to realize the automatic and on-demand service integration concepts: Redirection, i.e. c...