With the popularity of Internet technology, Web services are becoming the most promising paradigm for distributed computing. However, when a single Web service fails to meet service requestor's multiple function needs, web services need to be dynamically configured together to form a web service composition. Since there may be many configurations providing identical functionality with different quality-of-service (QoS), a choice needs to be made according to users' functional and nonfunctional requirements. In this paper, we formulate a Web service functional configuration problem by using Petri nets. The graph structure and algebraic properties of the model are analyzed in detail to show that a basis solution of a state-shift equation of the Petri net model corresponds to a realizable configuration process. This result is later used to formulate the multiple attribute QoS optimization problem to a linear programming problem. Finally, a case study is performed to show that the proposed analysis result can be effectively applied in practice.