Given today's highly dynamic and extremely heterogeneous software systems, automatically achieving interoperability between their software components -without modifying them- is more than simply desirable, it is fast becoming a necessity. Although much work has been carried out on interoperability, existing solutions have not fully succeeded in keeping pace with the increasing complexity and heterogeneity of modern software, and meeting the demands of runtime support. These solutions either require developers to implement mediators, which are software entities that reconcile the differences between the implementations of software components so as to enable them to work together, or generate mediators based on declarative specifications of the composition of components or correspondences between the components' interfaces. Due to their dependency on such specifications, existing solutions are insufficient for ubiquitous environments where software components meet dynamically and interactions take place spontaneously. The main contribution of this thesis is to define an approach and provide a supporting tool for the automated synthesis and deployment of mediators.