Two components are compatible if any sequence of operations requested by one of these components can be provided by the other component. If the set of all requested sequences is denoted by L_R and the set of all provided sequences of operations by L_P, then the two components are compatible if L_R subseteq L_P. This paper uses Petri nets to model the interface behaviours of interacting components (i.e. the languages L_R and L_P) and formally defines the composition of components. Compatibility of composition is verified by checking if the composed models contain deadlocks. Simple examples illustrate the proposed approach.