1. A method for automatic service composition, searching services from registered service specifications to find a single service or compose a service flow according to a service request, the method comprising: a service request receiving step, for receiving a problem file established according to the service request; a service specification receiving step, for receiving a domain file established according to at least one service specification, the at least one service specification being used for executing an action which defines an action name, and at least one input parameter or at least one output parameter, wherein any two different service specifications can use an object with the same data type as the input parameter or the output parameter; a new object predicting step, for predicting a new object by extracting data types needed by the declared objects of the problem file or the domain file to select at least one service specification related to the data type and storing the selected service specifications in a chosen service set; a new object declaring step, for declaring the new object by counting a frequency N for each data type used as the input parameter and a frequency M for each data type used as the output parameter in the chosen service set; if M>0, the data type is also used as the output parameter, and C×(N+M) new objects are declared in the domain file for the data type, wherein C is an integer; a service composition generating step, for generating a service flow by generating a series of action execution sequences of the single service or composite service, from service specifications stored in the service repository according to the problem file and the domain file, for being executed to accomplish the service request; and a correlation establishing step, for establishing at least one level of data-type-service graph between all service specifications and data types, wherein the new object predicting step follows the interactive usage correlation structure to select at least one service specification related to the data type; wherein the service request is a file with an XML (extensible markup language) format and is translated into a problem file with a PDDL (planning domain definition language) format via a translation process.