The forthcoming mass introduction of cooperating robots in everyday environments calls for major advances in the development of flexible, cost-effective, modular, dependable, and robust distributed robotic systems. In this paper, we introduce a conceptual framework and a middleware implementation to support service-oriented distributed robotic applications. Our goal is to provide networked robots with autonomic features, to improve their independence from human operators and survivability, without the need for a centralized IT infrastructure. We propose a novel fusion of Web Service, peer-to-peer, and robot control technologies, with reference to real scenarios involving mobile robots. One major feature of our approach is related to service mobility among peer robots, that is on-the-fly acquisition of knowledge and skills, yielding to improved system performance and robustness.