Index: trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/SOAPUtils.java
===================================================================
--- trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/SOAPUtils.java	(revision 1987)
+++ trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/SOAPUtils.java	(revision 1988)
@@ -17,4 +17,5 @@
 import java.io.StringWriter;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -34,4 +35,5 @@
 
 import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.plugin.http.eventcore.EqualSOAPDataMap;
 import de.ugoe.cs.autoquest.plugin.http.eventcore.SOAPEventType;
 import de.ugoe.cs.autoquest.plugin.http.eventcore.SimpleSOAPEventType;
@@ -53,36 +55,42 @@
      * </p>
      * 
-     * @param sequence
-     *            sequence where the events are replaced
+     * @param sequences
+     *            sequences where the events are replaced
      * @param keepOnlySOAPEvents
      *            if true, all events that are not of SOAPEventType or SimpleSOAPEventType are
      *            removed
-     * @return sequence with {@link SimpleSOAPEventType}s instead of {@link SOAPEventType}s
-     */
-    public static List<Event> convertToSimpleSOAPEvent(List<Event> sequence,
+     * @return sequences with {@link SimpleSOAPEventType}s instead of {@link SOAPEventType}s
+     */
+    public static Collection<List<Event>> convertToSimpleSOAPEvent(Collection<List<Event>> sequences,
                                                        boolean keepOnlySOAPEvents)
     {
-        List<Event> newSequence = null;
-        if (sequence != null) {
-            newSequence = new LinkedList<>();
-            for (Event event : sequence) {
-                if (event.getType() instanceof SOAPEventType) {
-                    SOAPEventType eventType = (SOAPEventType) event.getType();
-                    newSequence.add(new Event(new SimpleSOAPEventType(eventType.getCalledMethod(),
-                                                                      eventType.getServiceName(),
-                                                                      eventType.getClientName(),
-                                                                      eventType
-                                                                          .getSoapRequestBody())));
-                }
-                else {
-                    if (!keepOnlySOAPEvents || event.getType() instanceof SimpleSOAPEventType) {
-                        newSequence.add(event);
+        Collection<List<Event>> newSequences = new LinkedList<>();
+        EqualSOAPDataMap equalSOAPDataMap = new EqualSOAPDataMap();
+        for( List<Event> sequence : sequences ) {
+            List<Event> newSequence = null;
+            if (sequence != null) {
+                newSequence = new LinkedList<>();
+                for (Event event : sequence) {
+                    if (event.getType() instanceof SOAPEventType) {
+                        SOAPEventType eventType = (SOAPEventType) event.getType();
+                        newSequence.add(new Event(new SimpleSOAPEventType(eventType.getCalledMethod(),
+                                                                          eventType.getServiceName(),
+                                                                          eventType.getClientName(),
+                                                                          eventType
+                                                                              .getSoapRequestBody(),
+                                                                          equalSOAPDataMap)));
+                    }
+                    else {
+                        if (!keepOnlySOAPEvents || event.getType() instanceof SimpleSOAPEventType) {
+                            newSequence.add(event);
+                        }
                     }
                 }
             }
-        }
-        return newSequence;
-    }
-
+            newSequences.add(newSequence);
+        }
+        return newSequences;
+    }
+    
     /**
      * <p>
@@ -182,4 +190,19 @@
      */
     public static Element getSoapRequestBodyFromEvent(Event event) {
+        return getSoapRequestBodyFromEvent(event, false);
+    }
+    
+    /**
+     * <p>
+     * Helper function to get the body of a SOAP request.
+     * </p>
+     * 
+     * @param event
+     *            event for which the SOAP request body is retrieved
+     * @param useRandomRequestBodies
+     *            defines is random request bodies are used or the body of the associated event
+     * @return body of the SOAP event
+     */
+    public static Element getSoapRequestBodyFromEvent(Event event, boolean useRandomRequestBodies) {
         Element requestBody = null;
         if (event.getType() instanceof SOAPEventType) {
@@ -187,5 +210,9 @@
         }
         else if (event.getType() instanceof SimpleSOAPEventType) {
-            requestBody = ((SimpleSOAPEventType) event.getType()).getSoapRequestBody();
+            if( useRandomRequestBodies ) {
+                requestBody = ((SimpleSOAPEventType) event.getType()).getRandomSoapRequestBody();
+            } else {
+                requestBody = ((SimpleSOAPEventType) event.getType()).getSoapRequestBody();
+            }
         }
         return requestBody;
@@ -295,25 +322,29 @@
      * </p>
      *
-     * @param sequence sequences where the operation names are normalized
-     */
-    public static List<Event> normalizeOperationNames(List<Event> sequence, String prefixToRemove, String suffixToRemove) {
-        List<Event> normalizedSequence = new LinkedList<>();
-        for (Iterator<Event> eventIter = sequence.iterator(); eventIter.hasNext();) {
-            Event event = eventIter.next();
-            if ((event.getType() instanceof SimpleSOAPEventType)) {
-                SimpleSOAPEventType eventType = (SimpleSOAPEventType) event.getType();
-                String methodName = eventType.getCalledMethod();
-                if( prefixToRemove!=null && methodName.startsWith(prefixToRemove) ) {
-                    methodName = methodName.substring(prefixToRemove.length(), methodName.length());
-                    // remove prefix
-                } 
-                if( suffixToRemove!=null && methodName.endsWith(suffixToRemove) ) {
-                    methodName = methodName.substring(0, methodName.length()-suffixToRemove.length());
+     * @param sequences sequences where the operation names are normalized
+     */
+    public static Collection<List<Event>> normalizeOperationNames(Collection<List<Event>> sequences, String prefixToRemove, String suffixToRemove) {
+        Collection<List<Event>> normalizedSequences = new LinkedList<>();
+        for(List<Event> sequence : sequences ) {
+            List<Event> normalizedSequence = new LinkedList<>();
+            for (Iterator<Event> eventIter = sequence.iterator(); eventIter.hasNext();) {
+                Event event = eventIter.next();
+                if ((event.getType() instanceof SimpleSOAPEventType)) {
+                    SimpleSOAPEventType eventType = (SimpleSOAPEventType) event.getType();
+                    String methodName = eventType.getCalledMethod();
+                    if( prefixToRemove!=null && methodName.startsWith(prefixToRemove) ) {
+                        methodName = methodName.substring(prefixToRemove.length(), methodName.length());
+                        // remove prefix
+                    } 
+                    if( suffixToRemove!=null && methodName.endsWith(suffixToRemove) ) {
+                        methodName = methodName.substring(0, methodName.length()-suffixToRemove.length());
+                    }
+                    event = new Event(new SimpleSOAPEventType(methodName, eventType.getServiceName(), eventType.getClientName(), eventType.getSoapRequestBody(), eventType.getEqualSOAPDataMap()), event.getTarget());
                 }
-                event = new Event(new SimpleSOAPEventType(methodName, eventType.getServiceName(), eventType.getClientName(), eventType.getSoapRequestBody()), event.getTarget());
-            }
-            normalizedSequence.add(event);
-        }
-        return normalizedSequence;
+                normalizedSequence.add(event);
+            }
+            normalizedSequences.add(normalizedSequence);
+        }
+        return normalizedSequences;
     }
 
Index: trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/EqualSOAPDataMap.java
===================================================================
--- trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/EqualSOAPDataMap.java	(revision 1987)
+++ trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/EqualSOAPDataMap.java	(revision 1988)
@@ -15,7 +15,4 @@
 package de.ugoe.cs.autoquest.plugin.http.eventcore;
 
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.util.Collections;
@@ -38,9 +35,4 @@
     /**  */
     private static final long serialVersionUID = 1L;
-
-    /**
-     * Singleton. Handle to only instance of this class
-     */
-    transient private static EqualSOAPDataMap INSTANCE = new EqualSOAPDataMap();
     
     /**
@@ -52,71 +44,15 @@
      * random number generator for picking a random request body
      */
-    transient private final Random random;
-    
-    /**
-     * <p>
-     * return the instance of the class
-     * </p>
-     *
-     * @return
-     */
-    public static EqualSOAPDataMap getInstance() {
-        return INSTANCE;
-    }
-    
-    private EqualSOAPDataMap() {
-        // private constructor to avoid initialization
-        random = new Random();
-    }
-    
-    /**
-     * <p>
-     * Manual serialization of the object. Necessary to guarantee the singleton
-     * property.
-     * </p>
-     * 
-     * @param s
-     *            output stream for the serialization
-     * @throws IOException
-     *             thrown if there is problem writing to the output stream
-     */
-    private void writeObject(ObjectOutputStream s) throws IOException {
-            s.defaultWriteObject();
-            s.writeObject(soapRequestBodies);
-    }
+    private final Random random = new Random();
 
     /**
      * <p>
-     * Manual de-serialization of the object. Necessary to guarantee the
-     * singleton property.
-     * 
-     * @param s
-     *            input stream for the de-serialization
-     * @throws IOException
-     *             thrown if there is problem reading from the input stream
-     * @throws ClassNotFoundException
-     *             thrown if there is a problem reading from the input stream
+     * Default constructor. 
+     * </p>
      */
-    @SuppressWarnings("unchecked")
-    private void readObject(ObjectInputStream s) throws IOException,
-                    ClassNotFoundException {
-            s.defaultReadObject();
-            if (INSTANCE == null) {
-                INSTANCE = new EqualSOAPDataMap();
-            }
-            INSTANCE.soapRequestBodies = (Map<SimpleSOAPEventType, ListOrderedSet<String>>) s.readObject();
+    public EqualSOAPDataMap() {
+        
     }
-
-    /**
-     * <p>
-     * Manual de-serialization to guarantee the singleton property.
-     * </p>
-     * 
-     * @return instance of the container
-     */
-    private Object readResolve() {
-            return INSTANCE;
-    }
-
+    
     /**
      * <p>
@@ -175,3 +111,14 @@
         soapRequestBodies = new HashMap<>();
     }
+    
+    /**
+     * <p>
+     * returns is the current data map is empty
+     * </p>
+     *
+     * @return true if empty; false otherwise
+     */
+    public boolean isEmpty() {
+        return soapRequestBodies.isEmpty();
+    }
 }
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 1987)
+++ trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SimpleSOAPEventType.java	(revision 1988)
@@ -42,9 +42,4 @@
 
     /**
-     * see {@link RequestBodyMode}
-     */
-    private static RequestBodyMode requestBodyMode = RequestBodyMode.LOCALEVENT;
-
-    /**
      * <p>
      * the SOAP method called in this request
@@ -74,4 +69,9 @@
      */
     private final String soapRequestBody;
+    
+    /**
+     * TODO
+     */
+    private final EqualSOAPDataMap equalRequestsMap;
 
     /**
@@ -86,4 +86,19 @@
                                Element soapRequestBody)
     {
+        this(calledMethod, serviceName, clientName, soapRequestBody, null);
+    }
+    
+    /**
+     * <p>
+     * Constructor. Creates a new SimpleSOAPEventType with a EqualSOAPDATAMap. 
+     * </p>
+     * 
+     */
+    public SimpleSOAPEventType(String calledMethod,
+                               String serviceName,
+                               String clientName,
+                               Element soapRequestBody,
+                               EqualSOAPDataMap equalRequestsMap)
+    {
         if (calledMethod == null) {
             throw new IllegalArgumentException("called method must not be null");
@@ -99,5 +114,8 @@
         this.clientName = clientName;
         this.soapRequestBody = SOAPUtils.getSerialization(soapRequestBody);
-        EqualSOAPDataMap.getInstance().add(this, this.soapRequestBody);
+        this.equalRequestsMap = equalRequestsMap;
+        if( equalRequestsMap!=null ) {
+            equalRequestsMap.add(this, this.soapRequestBody);
+        }
     }
 
@@ -144,27 +162,23 @@
      */
     public Element getSoapRequestBody() {
-        String requestBody;
-        switch (requestBodyMode)
-        {
-            case LOCALEVENT:
-                requestBody = soapRequestBody;
-                break;
-            case RANDOM:
-                requestBody = EqualSOAPDataMap.getInstance().getRandom(this);
-                break;
-            default:
-                throw new RuntimeException("undefined RequestBodyMode");
-        }
-        if (requestBody == null) {
-            System.err.println("foobar" + this);
-            System.err.println(EqualSOAPDataMap.getInstance().getAll(this));
-        }
-        try {
-            return DocumentBuilderFactory.newInstance().newDocumentBuilder()
-                .parse(new ByteArrayInputStream(requestBody.getBytes())).getDocumentElement();
-        }
-        catch (SAXException | IOException | ParserConfigurationException e) {
-            return null;
-        }
+        return createDOMElement(soapRequestBody);
+    }
+    
+    /**
+     * <p>
+     * returns a randomly draw request body for the called method using {@link EqualSOAPDataMap#getRandom(SimpleSOAPEventType)}
+     * </p>
+     *
+     * @return randomly drawn body of the SOAP request
+     */
+    public Element getRandomSoapRequestBody() {
+        if( equalRequestsMap==null ) {
+            throw new RuntimeException("cannot use random mode is no request map is available; different data missing");
+        }
+        return createDOMElement(equalRequestsMap.getRandom(this));
+    }
+    
+    public EqualSOAPDataMap getEqualSOAPDataMap() {
+        return equalRequestsMap;
     }
 
@@ -220,40 +234,28 @@
     }
 
-    /**
-     * <p>
-     * returns the current {@link RequestBodyMode}
-     * </p>
-     * 
-     * @return the requestBodyMode
-     */
-    public static RequestBodyMode getRequestBodyMode() {
-        return requestBodyMode;
-    }
-
-    /**
-     * <p>
-     * sets the {@link RequestBodyMode}
-     * </p>
-     * 
-     * @param new requestBodyMode
-     */
-    public static void setRequestBodyMode(RequestBodyMode requestBodyMode) {
-        SimpleSOAPEventType.requestBodyMode = requestBodyMode;
-    }
-
-    /**
-     * <p>
-     * Determines how getSoapRequestBody works.
-     * <ul>
-     * <li>LOCALEVENT: returns the request body of the event type itself</li>
-     * <li>RANDOM: returns a randomly draw request body for the called method using
-     * {@link EqualSOAPDataMap#getRandom(SimpleSOAPEventType)}.
-     * </ul>
-     * </p>
-     * 
-     * @author Steffen Herbold
-     */
-    public static enum RequestBodyMode {
-        LOCALEVENT, RANDOM
-    }
+    private Element createDOMElement(String requestBody) {
+        try {
+            return DocumentBuilderFactory.newInstance().newDocumentBuilder()
+                .parse(new ByteArrayInputStream(requestBody.getBytes())).getDocumentElement();
+        }
+        catch (SAXException | IOException | ParserConfigurationException e) {
+            return null;
+        }
+    }
+//
+//    /**
+//     * <p>
+//     * Determines how getSoapRequestBody works.
+//     * <ul>
+//     * <li>LOCALEVENT: returns the request body of the event type itself</li>
+//     * <li>RANDOM: returns a randomly draw request body for the called method using
+//     * {@link EqualSOAPDataMap#getRandom(SimpleSOAPEventType)}.
+//     * </ul>
+//     * </p>
+//     * 
+//     * @author Steffen Herbold
+//     */
+//    public static enum RequestBodyMode {
+//        LOCALEVENT, RANDOM
+//    }
 }
