Index: trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtils.java
===================================================================
--- trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtils.java	(revision 2000)
+++ trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtils.java	(revision 2001)
@@ -60,4 +60,5 @@
 import org.eclipse.uml2.uml.MessageSort;
 import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
 import org.eclipse.uml2.uml.Operation;
 import org.eclipse.uml2.uml.Package;
@@ -77,5 +78,4 @@
 
 import de.ugoe.cs.autoquest.eventcore.Event;
-import de.ugoe.cs.autoquest.eventcore.EventUtils;
 import de.ugoe.cs.autoquest.plugin.http.SOAPUtils;
 import de.ugoe.cs.autoquest.plugin.http.eventcore.SOAPEventType;
@@ -536,5 +536,9 @@
                     getOperationFromName(targetInterface.getOperations(), methodName);
                 // get connector
-                Connector connector = inferConnector(msgSourceLifeline, msgTargetLifeline);
+                System.out.println(event.getType());
+                Connector connector = inferConnector(msgSourceLifeline, msgTargetLifeline, targetInterface);
+                if( connector==null ) {
+                    throw new RuntimeException("Error creating message: could not find connector between the two life lines that supports the target interface at the target lifeline");
+                }
 
                 boolean asynch = false;
@@ -979,8 +983,4 @@
      * Infers connector between two lifelines.
      * </p>
-     * <p>
-     * TODO: Currently assumes only one connector between two lifelines possible. This assumption is
-     * invalid as soon as there are two ports that connect the same two properties.
-     * </p>
      * 
      * @param msgSourceLifeline
@@ -989,10 +989,10 @@
      *            target lifeline of the message
      */
-    private static Connector inferConnector(Lifeline msgSourceLifeline, Lifeline msgTargetLifeline)
+    private static Connector inferConnector(Lifeline msgSourceLifeline, Lifeline msgTargetLifeline, Interface targetInterface)
     {
         EList<Property> userAttributes =
-            ((Component) msgSourceLifeline.getRepresents().getType()).getAttributes();
+            ((Component) msgSourceLifeline.getRepresents().getType()).getAllAttributes();
         EList<Property> targetAttributes =
-            ((Component) msgTargetLifeline.getRepresents().getType()).getAttributes();
+            ((Component) msgTargetLifeline.getRepresents().getType()).getAllAttributes();
         for (Property userAttribute : userAttributes) {
             if (userAttribute instanceof Port) {
@@ -1002,9 +1002,11 @@
                     for (Property targetAttribute : targetAttributes) {
                         if (targetAttribute instanceof Port) {
-                            EList<ConnectorEnd> targetEnds = ((Port) targetAttribute).getEnds();
-                            for (ConnectorEnd targetEnd : targetEnds) {
-                                Connector targetConnector = (Connector) targetEnd.eContainer();
-                                if (targetConnector == userConnector) {
-                                    return targetConnector;
+                            if( ((Port) targetAttribute).getProvideds().contains(targetInterface) ) {
+                                EList<ConnectorEnd> targetEnds = ((Port) targetAttribute).getEnds();
+                                for (ConnectorEnd targetEnd : targetEnds) {
+                                    Connector targetConnector = (Connector) targetEnd.eContainer();
+                                    if (targetConnector == userConnector) {
+                                        return targetConnector;
+                                    }
                                 }
                             }
