This paper presents an immune-inspired algorithm applied in the context of Web service composition to select the optimal composition solution. Our approach models Web service composition as a multi-layered process which creates a planning-graph structure along with a matrix of semantic links. We have enhanced the classical planning graph with the new concepts of service cluster and semantic similarity link. The semantic similarity links are defined between services on different graph layers and are stored in a matrix of semantic links. To calculate the degree of the semantic match between services, we have adapted the information retrieval measures of
. The immune-inspired algorithm uses the enhanced planning graph and the matrix of semantic links to select the optimal composition solution employing the
attributes and the semantic quality as the selection criteria.