One of the most promising ideas underlying Web services is service composition, that is, to provide new value added services by combining some pre-existing Web services. Although though service composition has received a great deal of attention tention and there are many solutions to the problem of composition, finding potential service compositions efficiently is still challenging because of the fact that the number of candidate services can be very large. In this paper, a tree-based method of Web service composition is proposed, by which all potential candidate composite services that meet the user's request can be created. Moreover, these composite services are ordered according to the QoS attribute concerned by the user, so the user can find the best and arbitrary top-n composite services.