Web services are becoming de facto a standard for data exchanging, since they provide a clear way to express and access information throughout the Internet. Sometimes, one service alone is not able to perform a certain task, and it might be necessary to compose two or more services in order to accomplish that task. In this context, semantic web services play an essential role, since they provide a framework to formally describe services in a way that it is possible to machines to automatically discovery, compose, invoke, and monitor them. On the other hand, only functionality is not enough to fulfill users' satisfaction, in the sense that service providers should guarantee the quality delivered by their services. In this paper, we present a heuristic-based approach for automatic semantic web services composition. Besides considering the functional correctness, the proposed heuristics also takes into account the overall quality of the composite service during the composition process.