The interconnection among heterogeneous sensors and data acquisition equipment in cyber-physical systems have profound significance in achieving adaptability, flexibility, and transparency. Various middlewares have been developed in cyber-physical systems to collect, aggregate, correlate, and translate system monitoring data. Existing middleware solutions are normally highly customized, which face several challenges due to the highly dynamic and harsh production environments. The data generated by sensors can only be shared by specific applications, which prevents the reusability of sensors. Moreover, the lack of uniform access to sensors causes high cost and low efficiency in application development. To address these issues, a resource-oriented middleware architecture called ROMiddleware was proposed, and three key enabling technologies including heterogeneous sensor modeling and grouping, open application programming interfaces development, and token-based access right control mechanism have been developed. Under the guidance of the key enabling technologies, a prototype of ROMiddleware was implemented and its performance was evaluated. Finally, two applications were developed to stress the significance of ROMiddleware. The results show that ROMiddleware can meet the requirements of data acquisition in cyber-physical systems.