The advancement in ubiquitous computing requires more effort to cope with contextual changes in the environment and to adapt to these changes in regular and efficient ways. A context model and context-awareness are proposed to provide a model of the contextual information and to describe its impact on individual behaviour of system's components and on rules and relationships which control their interactions. This paper extends the Web service migration framework which provides software support for services migrating between potential service providers in service-oriented architecture according to the contextual changes. The extension utilises ontology-based context modelling in OWL/RDF and reasoning by means Jena reasoners and rules to make necessary migration decisions. Applications of ubiquitous computing in diverse envi- ronments and needs for automatic adaptation to cope with changing contextual information in the environments lead to emerging context awareness in the ubiquitous systems. The context awareness enables a system to process contextual in- formation, to be aware of contextual changes and consequent interactions between system components during runtime. Context-aware computing was introduced at the first time by (1) as the ability of a mobile user's applications to dis- cover and react to changes in the environment. The mobile user uses these applications to monitor and derive informa- tion on the surrounding environment. This information has meaningful observations which will be used to adapt the system according to its current status. The context term was defined by (2) as any information that can be used to charac- terize the situation of an entity. An entity is a person, place, or object that is considered to be relevant to the interaction between a user and an application, including the user and applications themselves. The contextual information available to a system or its components is modelled by a context model. In the case of service-oriented architecture (SOA), context models de- scribe contextual information available to individual ser- vices, which may extend a functional description of the services provided by usual means (e.g., their description in Web Services Description Language (WSDL)), and the actual state of service providers' environment affecting their availability (e.g., available resources or quality of network connections). In this way, context modelling makes ser- vices more accessible and discoverable. Moreover, sharing context models between different environments allows to es- tablish a common contextual base for system or component