Service-oriented computing allows new applications to be developed by using and/or combining services offered by different organizations. Service composition can be applied when a client request cannot be satisfied by any individual service. In this case, the creation of a composite service from a number of available services could be pursued. This composite service should comply with the client's request in terms of functionality and expected results. This paper presents a goal-based framework for dynamic service discovery and composition. Our framework consists of a set of design principles and guidelines for service platforms to realize dynamic service discovery and composition.