In order to improve the utilization rate of optical network,an approach of selecting the top quality web services composition based on Petri nets was presented.A Petri net model,which represented the data dependent relationship between the service composition according to consumers' demands and the current available services,was obtained.By calculating the T-variables relationships of the Petri net,plans of the service composition were obtained.And,the generalized stochastic Petri net (GSPN) was employed to analyze the performance of the plan.Compared with other approaches available,the results show that the presented method takes full advantages of Petri nets,such as easy description,analysis and evaluation of the systems,and can obtain the best plan of Web service compositions.