Web services are not always able to fulfill customer requirements on their own, so in those cases it can choose to make a composition of web services. However, this is a complex problem since it must take into account the large number of available services, performance requirements, and other factors related to quality of service (QoS). Representing the problem of web service composition as a graph, some methods were used that do not ensure optimum solution. In this work the bidirectional Dijkstra algorithm is proposed to solve the problem of web services composition. Experimental results show that, as the number of web service classes increases, proposed algorithm performance improves.