Index: /trunk/autoquest-plugin-http/pom.xml
===================================================================
--- /trunk/autoquest-plugin-http/pom.xml	(revision 1983)
+++ /trunk/autoquest-plugin-http/pom.xml	(revision 1984)
@@ -35,4 +35,9 @@
             <version>${project.parent.version}</version>
         </dependency>
+        <dependency>
+	        <groupId>org.apache.commons</groupId>
+	        <artifactId>commons-collections4</artifactId>
+	        <version>4.0</version>
+        </dependency>
     </dependencies>
     <build>
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 1983)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SimpleSOAPEventType.java	(revision 1984)
@@ -17,8 +17,14 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
 
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.apache.commons.collections4.set.ListOrderedSet;
 import org.w3c.dom.Element;
 import org.xml.sax.SAXException;
@@ -40,4 +46,9 @@
     /**  */
     private static final long serialVersionUID = 1L;
+    
+    /**
+     * see {@link RequestBodyMode}
+     */
+    private static RequestBodyMode requestBodyMode = RequestBodyMode.LOCALEVENT;
 
     /**
@@ -94,4 +105,5 @@
         this.clientName = clientName;
         this.soapRequestBody = SOAPUtils.getSerialization(soapRequestBody);
+        EqualSOAPDataMap.INSTANCE.add(this, this.soapRequestBody);
     }
 
@@ -129,8 +141,31 @@
     }
 
+    /**
+     * <p>
+     * returns the body of the SOAP request; how the body is determined is defined by the {@link RequestBodyMode}. 
+     * </p>
+     *
+     * @return body of the SOAP request
+     */
     public Element getSoapRequestBody() {
+        String requestBody;
+        switch (requestBodyMode)
+        {
+            case LOCALEVENT:
+                requestBody = soapRequestBody;
+                break;
+            case RANDOM:
+                requestBody = EqualSOAPDataMap.INSTANCE.getRandom(this);
+                break;
+            default:
+                throw new RuntimeException("undefined RequestBodyMode");
+        }
+        if( requestBody==null ) {
+            System.err.println("foobar" + this);
+            System.err.println(EqualSOAPDataMap.INSTANCE.getAll(this));
+        }
         try {
             return DocumentBuilderFactory.newInstance().newDocumentBuilder()
-                .parse(new ByteArrayInputStream(soapRequestBody.getBytes())).getDocumentElement();
+                .parse(new ByteArrayInputStream(requestBody.getBytes())).getDocumentElement();
         }
         catch (SAXException | IOException | ParserConfigurationException e) {
@@ -138,4 +173,6 @@
         }
     }
+    
+    
 
     /*
@@ -189,3 +226,114 @@
         return "SimpleSOAPEventType(" + serviceName + ", " + calledMethod + ")";
     }
+    
+    /**
+     * <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};
+    
+    /**
+     * <p>
+     * Handles all request bodies of equal SOAP events. Can be used to view either all request bodies sent to an operation or to randomly draw one of the bodies.
+     * </p>
+     * 
+     * @author Steffen Herbold
+     */
+    public static class EqualSOAPDataMap {
+        
+        /**
+         * Singleton. Handle to only instance of this class
+         */
+        public final static EqualSOAPDataMap INSTANCE = new EqualSOAPDataMap();
+        
+        /**
+         * Map with all soapRequestBodies for all equal {@link SimpleSOAPEventType}s
+         */
+        private final Map<SimpleSOAPEventType, ListOrderedSet<String>> soapRequestBodies = new HashMap<>();
+        
+        /**
+         * random number generator for picking a random request body
+         */
+        private final Random random = new Random(1); // TODO static seed for testing
+        
+        private EqualSOAPDataMap() {
+            // private constructor to avoid initialization
+        }
+
+        /**
+         * <p>
+         * Adds a new body to the map.
+         * </p>
+         *
+         * @param simpleSOAPEventType
+         */
+        public void add(SimpleSOAPEventType simpleSOAPEventType, String soapRequestBody) {
+            if( soapRequestBody!=null ) {
+                ListOrderedSet<String> requestBodySet = soapRequestBodies.get(simpleSOAPEventType);
+                if( requestBodySet==null ) {
+                    requestBodySet = new ListOrderedSet<>();
+                    soapRequestBodies.put(simpleSOAPEventType, requestBodySet);
+                }
+                requestBodySet.add(soapRequestBody);
+            }
+        }
+        
+        /**
+         * <p>
+         * Retrieves all bodies associated with the simpleSoapEventType; null if not found
+         * </p>
+         *
+         * @param simpleSoapEventType
+         * @return
+         */
+        public Set<String> getAll(SimpleSOAPEventType simpleSoapEventType) {
+            return Collections.unmodifiableSet(soapRequestBodies.get(simpleSoapEventType));
+        }
+        
+        /**
+         * <p>
+         * Randomly draws one of the SOAP event type bodies associated with the event
+         * </p>
+         *
+         * @param simpleSOAPEventType
+         * @return
+         */
+        public String getRandom(SimpleSOAPEventType simpleSOAPEventType) {
+            ListOrderedSet<String> requestBodySet = soapRequestBodies.get(simpleSOAPEventType);
+            if( requestBodySet==null || requestBodySet.isEmpty() ) {
+                throw new RuntimeException("no request body known for SimpleSOAPEventType: " + simpleSOAPEventType);
+            }
+            
+            return requestBodySet.get(random.nextInt(requestBodySet.size()));
+        }
+    }
 }
