Service-Oriented Architecture (SOA) is characterized by dynamic service discovery and composition. For user-centric SOA, not only services, but workflows and application templates also can be published and discovered for composition. This paper proposes a two-steps composition process, ontology-based dependency-guided service composition (OBDG). In the first step, users compose their templates based on domain ontology or using existing templates. In the second step, users submit the templates to the OBDG system and let the system complete the dependencies by choosing and finalizing the selection of services and workflows from a set of candidate services or workflows based on user preferences. In this paper, services are described as interface service and implementation service. Interface service is like a service specification that describes service interface and its description, which is used to build domain ontology. Implementation services implement interface services. OBDG maintains a one-to-many relationship between them plus test scripts and cases. Templates are composed by interface services or test script so they can be instantiated by implementation services or test scripts and cases. In this way, application templates and testing templates can be same, which means OBDG can instantiate same template as application or testing by choosing implementation service or test script.