Many applications and services have emerged in the frame of new Internet of Things paradigm. This novel view has opened the Web services to a variety of devices especially to tiny and resource-constrained devices. Wireless Sensor and Actuator Networks belong to that kind of devices. Those networks have become one of the more promising technologies to take part in the Future Internet. However, the integration of Sensor and Actuator Networks into the Service Cloud is a hard challenge requiring specific new architectures and protocols. This paper presents a middleware approach addressing this important issue. A Knowledge-Aware and Service-Oriented Middleware (KASOM) for pervasive embedded networks is proposed. The major aim of KASOM is to offer advanced and enriched pervasive services to everyone connected to Internet. In this sense, KASOM implements mechanisms and protocols which allow managing the knowledge generated in pervasive embedded networks in order to expose it to Internet users in a readable way. General functional requirements of embedded sensor and actuator platforms have been taken into account when designing KASOM, with special attention in energy consumption, memory and bandwidth. The KASOM evaluation and validation will be demonstrated through a real Wireless Sensor and Actuator Network deployment based on integral healthcare services in a sanatorium.