As ubiquitous computing environment evolves intelligently and autonomously, more heterogeneous services and devices are integrated together to cause intricate issues in designing a ubiquitous middleware system. They are context-awareness, mobility, and heterogeneity. Our profile-based middleware addresses these issues by using an active profile that supports integration of services. In the architecture, a profiler is designed to manage user profiles and service profiles are stored. All the profiles are described in XML to utilize XML's hierarchical data structure and to support standard representation of users and services. The profiler parses user profile and service profiles to extract requirements and generates an active profile. And the active profile is dynamically reconfigured to provide services seamlessly. From the evaluation, there is approximately 20% of enhancement in search time of the XML tree. Also the latency time in referring requirements from the active profile to the service profiles can be decreased by around 35%.