Index: /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/HTTPUtils.java
===================================================================
--- /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/HTTPUtils.java	(revision 1912)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/HTTPUtils.java	(revision 1913)
@@ -143,5 +143,6 @@
                     SOAPEventType eventType = (SOAPEventType) event.getType();
                     newSequence.add(new Event(new SimpleSOAPEventType(eventType.getCalledMethod(),
-                                                                      eventType.getServiceName())));
+                                                                      eventType.getServiceName(),
+                                                                      eventType.getClientName())));
                 }
                 else {
Index: /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SimpleSOAPEventType.java
===================================================================
--- /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SimpleSOAPEventType.java	(revision 1912)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SimpleSOAPEventType.java	(revision 1913)
@@ -44,4 +44,12 @@
      */
     private final String serviceName;
+    
+    /**
+     * <p>
+     * the name of the client; this is either the host/ip and port of the sender or, if a path
+     * map is available, a human readable name that may be based also on the receiver
+     * </p>
+     */
+    private final String clientName;
 
     /**
@@ -51,5 +59,5 @@
      * 
      */
-    public SimpleSOAPEventType(String calledMethod, String serviceName) {
+    public SimpleSOAPEventType(String calledMethod, String serviceName, String clientName) {
         if (calledMethod == null) {
             throw new IllegalArgumentException("called method must not be null");
@@ -58,6 +66,10 @@
             throw new IllegalArgumentException("serviceName must not be null");
         }
+        if (clientName == null) {
+            throw new IllegalArgumentException("clientName must not be null");
+        }
         this.calledMethod = calledMethod;
         this.serviceName = serviceName;
+        this.clientName = clientName;
     }
 
@@ -82,4 +94,15 @@
     public String getServiceName() {
         return serviceName;
+    }
+    
+    /**
+     * <p>
+     * the name of the client calling in this request
+     * </p>
+     *
+     * @return the name of the client calling in this request
+     */
+    public String getClientName() {
+        return clientName;
     }
 
Index: /trunk/autoquest-plugin-uml-test/src/test/resources/ita_v2_servicenamemap.txt
===================================================================
--- /trunk/autoquest-plugin-uml-test/src/test/resources/ita_v2_servicenamemap.txt	(revision 1912)
+++ /trunk/autoquest-plugin-uml-test/src/test/resources/ita_v2_servicenamemap.txt	(revision 1913)
@@ -1,4 +1,18 @@
-/ws/BusinessUnitReferenceImplementationService = materialSupplierService
-/ws/WarehouseReferenceImplementationService = warehouseService
-/ws/PointOfSaleReferenceImplementationService = pointOfSaleService
-/ws/TransportReferenceImplementationService = TransportService
+serviceName.path./ws/BusinessUnitReferenceImplementationService = materialSupplierService
+serviceName.path./ws/WarehouseReferenceImplementationService = warehouseService
+serviceName.path./ws/PointOfSaleReferenceImplementationService = pointOfSaleService
+serviceName.path./ws/TransportReferenceImplementationService = TransportService
+clientName.receiver.port.8086 = warehouseService
+clientName.receiver.port.8087 = TransportService
+clientName.receiver.port.8088 = pointOfSaleService
+clientName.receiver.port.8089 = materialSupplierService
+clientName.receiver.port.8090 = TransportService
+clientName.receiver.port.8091 = pointOfSaleService
+clientName.receiver.port.8092 = materialSupplierService
+clientName.receiver.port.8093 = warehouseService
+clientName.receiver.port.8094 = pointOfSaleService
+clientName.receiver.port.8095 = materialSupplierService
+clientName.receiver.port.8096 = warehouseService
+clientName.receiver.port.8097 = TransportService
+clientName.default = Logistics_Environment
+
Index: /trunk/autoquest-plugin-uml-test/src/test/resources/testCalculateUsageScore_1_properties.txt
===================================================================
--- /trunk/autoquest-plugin-uml-test/src/test/resources/testCalculateUsageScore_1_properties.txt	(revision 1912)
+++ /trunk/autoquest-plugin-uml-test/src/test/resources/testCalculateUsageScore_1_properties.txt	(revision 1913)
@@ -1,5 +1,6 @@
-/midas/rlus/query/xdw = rlus_property
-/midas/rlus/update/xdw = rlus_property
-/midas/rlus/update/cda2report = rlus_property
-/midas/ixsmq/update/pocdpatient = ixsmq_property
-/midas/ixsmq/query/pocdpatient = ixsmq_property
+serviceName.path./midas/rlus/query/xdw = rlus_property
+serviceName.path./midas/rlus/update/xdw = rlus_property
+serviceName.path./midas/rlus/update/cda2report = rlus_property
+serviceName.path./midas/ixsmq/update/pocdpatient = ixsmq_property
+serviceName.path./midas/ixsmq/query/pocdpatient = ixsmq_property
+clientName.receiver.port.6000 = user
Index: /trunk/autoquest-plugin-uml-test/src/test/resources/testCreateInteractionFromEventSequence_1_properties.txt
===================================================================
--- /trunk/autoquest-plugin-uml-test/src/test/resources/testCreateInteractionFromEventSequence_1_properties.txt	(revision 1912)
+++ /trunk/autoquest-plugin-uml-test/src/test/resources/testCreateInteractionFromEventSequence_1_properties.txt	(revision 1913)
@@ -1,5 +1,6 @@
-/midas/rlus/query/xdw = rlus_property
-/midas/rlus/update/xdw = rlus_property
-/midas/rlus/update/cda2report = rlus_property
-/midas/ixsmq/update/pocdpatient = ixsmq_property
-/midas/ixsmq/query/pocdpatient = ixsmq_property
+serviceName.path./midas/rlus/query/xdw = rlus_property
+serviceName.path./midas/rlus/update/xdw = rlus_property
+serviceName.path./midas/rlus/update/cda2report = rlus_property
+serviceName.path./midas/ixsmq/update/pocdpatient = ixsmq_property
+serviceName.path./midas/ixsmq/query/pocdpatient = ixsmq_property
+clientName.receiver.port.6000 = user
Index: /trunk/autoquest-plugin-uml-test/src/test/resources/testCreateInteractionFromEventSequence_2_properties.txt
===================================================================
--- /trunk/autoquest-plugin-uml-test/src/test/resources/testCreateInteractionFromEventSequence_2_properties.txt	(revision 1912)
+++ /trunk/autoquest-plugin-uml-test/src/test/resources/testCreateInteractionFromEventSequence_2_properties.txt	(revision 1913)
@@ -1,10 +1,14 @@
-/ws/BusinessUnitBusinessService = materialSupplier
-/ws/BusinessUnitWarehouseService = warehouse
-/ws/BusinessUnitTransportService = transport
-/ws/WarehouseWarehouseService = warehouse
-/ws/WarehouseBusinessService = materialSupplier
-/ws/WarehouseTransportService = transport
-/ws/TransportTransportService = transport
-/ws/PointOfSaleBusinessService = pointOfSale
-/ws/PointOfSaleWarehouseService = pointOfSale
-/ws/PointOfSaleTransportService = pointOfSale
+serviceName.path./ws/BusinessUnitBusinessService = materialSupplier
+serviceName.path./ws/BusinessUnitWarehouseService = warehouse
+serviceName.path./ws/BusinessUnitTransportService = transport
+serviceName.path./ws/WarehouseWarehouseService = warehouse
+serviceName.path./ws/WarehouseBusinessService = materialSupplier
+serviceName.path./ws/WarehouseTransportService = transport
+serviceName.path./ws/TransportTransportService = transport
+serviceName.path./ws/PointOfSaleBusinessService = pointOfSale
+serviceName.path./ws/PointOfSaleWarehouseService = pointOfSale
+serviceName.path./ws/PointOfSaleTransportService = pointOfSale
+clientName.receiver.port.9081 = warehouse
+clientName.receiver.port.9082 = transport
+clientName.receiver.port.9083 = warehouse
+clientName.receiver.port.9084 = warehouse
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 1912)
+++ /trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtils.java	(revision 1913)
@@ -486,33 +486,19 @@
                 String serviceName = getServiceNameFromEvent(event);
                 String methodName = getCalledMethodFromEvent(event);
+                String clientName = getClientNameFromEvent(event);
                 // determine lifelines
                 Lifeline msgTargetLifeline;
                 Lifeline msgSourceLifeline;
-
-                if (serviceName.equals(userLifeline.getName())) {
-                    // message being send to user
-                    // currently we just select the first lifeline that is not the user
-                    // this, obviously, has to be replaced with the real service.
-                    // however, identification of the source of a message is still an open issue
-                    msgSourceLifeline = null;
-                    for (Lifeline lifeline : interaction.getLifelines()) {
-                        if (!lifeline.equals(userLifeline)) {
-                            msgSourceLifeline = lifeline;
-                            break;
-                        }
-                    }
-                    msgTargetLifeline = userLifeline;
-                }
-                else {
-                    msgSourceLifeline = userLifeline;
-                    msgTargetLifeline = interaction.getLifeline(serviceName);
-                }
+                
+                msgSourceLifeline = interaction.getLifeline(clientName);
+                msgTargetLifeline = interaction.getLifeline(serviceName);
+                
                 if (msgSourceLifeline == null) {
                     throw new RuntimeException(
-                                               "Error creating message: could not determine source lifeline.");
+                                               "Error creating message: could not determine source lifeline for component: " + clientName);
                 }
                 if (msgTargetLifeline == null) {
                     throw new RuntimeException(
-                                               "Error creating message: could not determine target lifeline.");
+                                               "Error creating message: could not determine target lifeline for component: " + serviceName);
                 }
                 // determine correct target interface
@@ -666,5 +652,5 @@
                             .getName();
                 }
-                eventSequence.add(new Event(new SimpleSOAPEventType(methodName, serviceName)));
+                eventSequence.add(new Event(new SimpleSOAPEventType(methodName, serviceName,""))); // TODO add client name
             }
         }
@@ -809,4 +795,27 @@
         else if (event.getType() instanceof SimpleSOAPEventType) {
             return ((SimpleSOAPEventType) event.getType()).getCalledMethod();
+        }
+        else {
+            throw new RuntimeException(
+                                       "Wrong event type. Only SOAPEventType and SimpleSOAPEventType supported but was: " +
+                                           event.getType().getClass().getName());
+        }
+    }
+    
+    /**
+     * <p>
+     * Helper function to get the name of a client from a SOAP event.
+     * </p>
+     * 
+     * @param event
+     *            event for which the client name is retrieved
+     * @return service name
+     */
+    protected static String getClientNameFromEvent(Event event) {
+        if (event.getType() instanceof SOAPEventType) {
+            return ((SOAPEventType) event.getType()).getClientName();
+        }
+        else if (event.getType() instanceof SimpleSOAPEventType) {
+            return ((SimpleSOAPEventType) event.getType()).getClientName();
         }
         else {
@@ -1013,5 +1022,4 @@
         InstanceSpecification instSpec = (InstanceSpecification) serviceInstSpecPkg.createPackagedElement("instspec_"+type.getName(), UMLPackage.Literals.INSTANCE_SPECIFICATION);
         instSpec.getClassifiers().add(type);
-        System.out.println(type.getName());
         for( Property prop : type.getAllAttributes() ) {
             // TODO handle multiplicity
