Dynamic composition of web services is a crucial aspect of web service technology, which gives us the opportunity of selecting new services and best suits we need. In this paper we discuss a technique based on linear temporal logic that solves the problem of automatic service discovery and composition. In particular, we characterize the behavior of a service in terms of a finite state machine and specify user's requirement by a Linear Temporal Logic formula, which contributes to realizing automatic service discover and dynamic services composition.