Index: trunk/autoquest-httpmonitor-test/src/test/java/de/ugoe/cs/autoquest/httpmonitor/HttpMonitoringProxyTest.java
===================================================================
--- trunk/autoquest-httpmonitor-test/src/test/java/de/ugoe/cs/autoquest/httpmonitor/HttpMonitoringProxyTest.java	(revision 1376)
+++ trunk/autoquest-httpmonitor-test/src/test/java/de/ugoe/cs/autoquest/httpmonitor/HttpMonitoringProxyTest.java	(revision 1390)
@@ -20,4 +20,5 @@
 import java.io.IOException;
 import java.io.StringReader;
+import java.net.URL;
 import java.util.Collection;
 import java.util.Iterator;
@@ -32,4 +33,5 @@
 import javax.xml.bind.JAXBElement;
 import javax.xml.bind.Unmarshaller;
+import javax.xml.namespace.QName;
 
 import org.eclipse.jetty.server.Server;
@@ -37,4 +39,8 @@
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.junit.Test;
+
+import dummyservice.ObjectFactory;
+import dummyservice.VerifyUserInMsgType;
+import dummyservice.VerifyUserOutMsgType;
 
 import de.ugoe.cs.autoquest.eventcore.Event;
@@ -45,4 +51,6 @@
 import de.ugoe.cs.autoquest.plugin.http.eventcore.HTTPEventType;
 import de.ugoe.cs.autoquest.plugin.http.eventcore.HTTPTarget;
+import dummyservice.DummyService;
+import dummyservice.DummyServicePortType;
 
 /**
@@ -73,5 +81,5 @@
         messages = new LinkedList<String>();
         
-        dummyMonitor = new Server(PORT + 2);
+        dummyMonitor = new Server(MONITOR_PORT);
         ServletContextHandler root =
             new ServletContextHandler(dummyMonitor, "/", ServletContextHandler.SESSIONS);
@@ -113,5 +121,6 @@
     public void test_SimpleText_Local() throws Exception {
         proxy = new HttpMonitoringProxy
-            (new String[] { LOG_FILE_DIR, PORT +"", "localhost:" + (PORT + 1), "local" });
+            (new String[] { LOG_FILE_DIR, PROXY_PORT + "", "localhost:" + DUMMY_SERVER_PORT,
+                            "local" });
 
         proxy.init();
@@ -155,6 +164,6 @@
     public void test_SimpleText_Remote() throws Exception {
         proxy = new HttpMonitoringProxy
-            (new String[] { LOG_FILE_DIR, PORT +"",
-                            "localhost:" + (PORT + 1), "localhost:" + (PORT + 2) });
+            (new String[] { LOG_FILE_DIR, PROXY_PORT + "",
+                            "localhost:" + DUMMY_SERVER_PORT, "localhost:" + MONITOR_PORT });
 
         proxy.init();
@@ -190,5 +199,6 @@
     public void test_XMLMessage_Local() throws Exception {
         proxy = new HttpMonitoringProxy
-            (new String[] { LOG_FILE_DIR, PORT +"", "localhost:" + (PORT + 1), "local" });
+            (new String[] { LOG_FILE_DIR, PROXY_PORT + "", "localhost:" + DUMMY_SERVER_PORT,
+                            "local" });
 
         proxy.init();
@@ -265,6 +275,6 @@
     public void test_XMLMessage_Remote() throws Exception {
         proxy = new HttpMonitoringProxy
-            (new String[] { LOG_FILE_DIR, PORT +"",
-                            "localhost:" + (PORT + 1), "localhost:" + (PORT + 2) });
+            (new String[] { LOG_FILE_DIR, PROXY_PORT + "",
+                            "localhost:" + DUMMY_SERVER_PORT, "localhost:" + MONITOR_PORT });
 
         proxy.init();
@@ -330,4 +340,110 @@
     }
     
+    @Test
+    public void test_SOAP_Local() throws Exception {
+        proxy = new HttpMonitoringProxy
+            (new String[] { LOG_FILE_DIR, PROXY_PORT + "", "localhost:" + DUMMY_SERVER_PORT,
+                            "local" });
+
+        proxy.init();
+        proxy.start();
+
+        DummyService service = new DummyService
+            (new URL("http://localhost:" + PROXY_PORT + "/dummyWebapp/DummyServiceSOAPPort?wsdl"),
+             new QName("DummyService", "DummyService"));
+
+        DummyServicePortType dummyService = service.getDummyServiceSOAPPort();
+        
+        ObjectFactory factory = new ObjectFactory();
+        VerifyUserInMsgType request = factory.createVerifyUserInMsgType();
+        VerifyUserOutMsgType response = dummyService.verifyUser(request);
+
+        assertNotNull(response);
+        
+        proxy.stop();
+        proxy = null;
+
+        File logFile = new File(LOG_FILE_DIR + File.separator + "httpmonitor_000.log");
+        
+        assertTrue(logFile.exists());
+        
+        HTTPLogParser parser = new HTTPLogParser();
+
+        parser.parseFile(logFile);
+
+        // check the sequences
+        Collection<List<Event>> sequences = parser.getSequences();
+
+        assertNotNull(sequences);
+
+        Iterator<List<Event>> iterator = sequences.iterator();
+        assertTrue(iterator.hasNext());
+
+        List<Event> sequence = iterator.next();
+        assertFalse(iterator.hasNext());
+
+        assertNotNull(sequence);
+        assertEquals(2, sequence.size());
+
+        assertEvent(sequence.get(0), "GET", null, null); // get WSDL
+        assertEvent(sequence.get(1), "POST", null, null); // send request
+    }
+    
+    @SuppressWarnings("unchecked")
+    @Test
+    public void test_SOAP_Remote() throws Exception {
+        proxy = new HttpMonitoringProxy
+            (new String[] { LOG_FILE_DIR, PROXY_PORT + "", "localhost:" + DUMMY_SERVER_PORT,
+                            "localhost:" + MONITOR_PORT  });
+
+        proxy.init();
+        proxy.start();
+
+        DummyService service = new DummyService
+            (new URL("http://localhost:" + PROXY_PORT + "/dummyWebapp/DummyServiceSOAPPort?wsdl"),
+             new QName("DummyService", "DummyService"));
+
+        DummyServicePortType dummyService = service.getDummyServiceSOAPPort();
+        
+        ObjectFactory factory = new ObjectFactory();
+        VerifyUserInMsgType request = factory.createVerifyUserInMsgType();
+        VerifyUserOutMsgType response = dummyService.verifyUser(request);
+
+        assertNotNull(response);
+        
+        proxy.stop();
+        proxy = null;
+
+        // give the proxy some time to send the copy of the message
+        while(messages.size() < 1) {
+            Thread.sleep(1000);
+        }
+        
+        assertEquals(2, messages.size());
+        
+        JAXBContext jaxbContext = JAXBContext.newInstance(HttpExchange.class.getPackage().getName());
+        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+        
+        JAXBElement<HttpExchange> jaxObject =
+            (JAXBElement<HttpExchange>) unmarshaller.unmarshal(new StringReader(messages.get(0)));
+        
+        HttpExchange exchange = jaxObject.getValue();
+        
+        assertEquals(Method.GET, exchange.getRequest().getMethod());
+
+        assertNull(exchange.getRequest().getContent());
+        assertNotNull(exchange.getResponse().getContent().getData());
+
+        jaxObject =
+            (JAXBElement<HttpExchange>) unmarshaller.unmarshal(new StringReader(messages.get(1)));
+            
+        exchange = jaxObject.getValue();
+            
+        assertEquals(Method.POST, exchange.getRequest().getMethod());
+
+        assertNotNull(exchange.getRequest().getContent().getData());
+        assertNotNull(exchange.getResponse().getContent().getData());
+    }
+    
     /**
      *
@@ -344,6 +460,18 @@
         
         assertEquals(Method.fromValue(method), exchange.getRequest().getMethod());
-        assertEquals(message, exchange.getRequest().getContent().getData());
-        assertEquals(response, exchange.getResponse().getContent().getData());
+        
+        if (message != null) {
+            assertEquals(message, exchange.getRequest().getContent().getData());
+        }
+        else if (exchange.getRequest().getContent() != null) {
+            System.err.println(exchange.getRequest().getContent().getData());
+        }
+        
+        if (response != null) {
+            assertEquals(response, exchange.getResponse().getContent().getData());
+        }
+        else if (exchange.getResponse().getContent() != null) {
+            System.err.println(exchange.getResponse().getContent().getData());
+        }
     }
 
