You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by se...@apache.org on 2009/01/03 07:33:41 UTC

svn commit: r730924 [5/9] - in /webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules: base/src/main/java/org/apache/axis2/format/ base/src/main/java/org/apache/axis2/transport/base/ base/src/main/java/org/apache/axis2/transport/base/data...

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/client/AxisRequestResponseTestClient.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/client/AxisRequestResponseTestClient.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/client/AxisRequestResponseTestClient.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/client/AxisRequestResponseTestClient.java Fri Jan  2 22:33:39 2009
@@ -1,54 +1,54 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.axis2.client;
-
-import javax.mail.internet.ContentType;
-
-import junit.framework.Assert;
-
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.transport.testkit.axis2.MessageContextValidator;
-import org.apache.axis2.transport.testkit.client.ClientOptions;
-import org.apache.axis2.transport.testkit.client.RequestResponseTestClient;
-import org.apache.axis2.transport.testkit.message.AxisMessage;
-import org.apache.axis2.transport.testkit.message.IncomingMessage;
-import org.apache.axis2.transport.testkit.tests.Setup;
-import org.apache.axis2.transport.testkit.tests.Transient;
-import org.apache.axis2.wsdl.WSDLConstants;
-
-public class AxisRequestResponseTestClient extends AxisTestClient implements RequestResponseTestClient<AxisMessage,AxisMessage> {
-    private @Transient MessageContextValidator[] validators;
-    
-    @Setup @SuppressWarnings("unused")
-    private void setUp(MessageContextValidator[] validators) {
-        this.validators = validators;
-    }
-    
-    public IncomingMessage<AxisMessage> sendMessage(ClientOptions options, ContentType contentType, AxisMessage message) throws Exception {
-        MessageContext responseMsgContext = send(options, message, ServiceClient.ANON_OUT_IN_OP,
-                true, WSDLConstants.MESSAGE_LABEL_IN_VALUE);
-        Assert.assertFalse(responseMsgContext.isServerSide());
-        for (MessageContextValidator validator : validators) {
-            validator.validate(responseMsgContext, true);
-        }
-        return new IncomingMessage<AxisMessage>(null, new AxisMessage(responseMsgContext));
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.axis2.client;
+
+import javax.mail.internet.ContentType;
+
+import junit.framework.Assert;
+
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.transport.testkit.axis2.MessageContextValidator;
+import org.apache.axis2.transport.testkit.client.ClientOptions;
+import org.apache.axis2.transport.testkit.client.RequestResponseTestClient;
+import org.apache.axis2.transport.testkit.message.AxisMessage;
+import org.apache.axis2.transport.testkit.message.IncomingMessage;
+import org.apache.axis2.transport.testkit.tests.Setup;
+import org.apache.axis2.transport.testkit.tests.Transient;
+import org.apache.axis2.wsdl.WSDLConstants;
+
+public class AxisRequestResponseTestClient extends AxisTestClient implements RequestResponseTestClient<AxisMessage,AxisMessage> {
+    private @Transient MessageContextValidator[] validators;
+    
+    @Setup @SuppressWarnings("unused")
+    private void setUp(MessageContextValidator[] validators) {
+        this.validators = validators;
+    }
+    
+    public IncomingMessage<AxisMessage> sendMessage(ClientOptions options, ContentType contentType, AxisMessage message) throws Exception {
+        MessageContext responseMsgContext = send(options, message, ServiceClient.ANON_OUT_IN_OP,
+                true, WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+        Assert.assertFalse(responseMsgContext.isServerSide());
+        for (MessageContextValidator validator : validators) {
+            validator.validate(responseMsgContext, true);
+        }
+        return new IncomingMessage<AxisMessage>(null, new AxisMessage(responseMsgContext));
+    }
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/client/AxisTestClient.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/client/AxisTestClient.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/client/AxisTestClient.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/client/AxisTestClient.java Fri Jan  2 22:33:39 2009
@@ -23,6 +23,7 @@
 import javax.xml.namespace.QName;
 
 import junit.framework.Assert;
+import junit.framework.AssertionFailedError;
 
 import org.apache.axiom.attachments.Attachments;
 import org.apache.axis2.Constants;
@@ -31,8 +32,10 @@
 import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.transport.TransportSender;
+import org.apache.axis2.transport.base.BaseConstants;
 import org.apache.axis2.transport.base.ManagementSupport;
 import org.apache.axis2.transport.testkit.MessageExchangeValidator;
+import org.apache.axis2.transport.testkit.axis2.util.MessageLevelMetricsCollectorImpl;
 import org.apache.axis2.transport.testkit.channel.Channel;
 import org.apache.axis2.transport.testkit.client.ClientOptions;
 import org.apache.axis2.transport.testkit.client.TestClient;
@@ -42,15 +45,20 @@
 import org.apache.axis2.transport.testkit.tests.TearDown;
 import org.apache.axis2.transport.testkit.tests.Transient;
 import org.apache.axis2.transport.testkit.util.ContentTypeUtil;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 @Name("axis")
 public class AxisTestClient implements TestClient, MessageExchangeValidator {
+    private static final Log log = LogFactory.getLog(AxisTestClient.class);
+    
     private @Transient AxisTestClientConfigurator[] configurators;
     private @Transient TransportSender sender;
     protected @Transient ServiceClient serviceClient;
     protected @Transient Options axisOptions;
     private long messagesSent;
     private long bytesSent;
+    private MessageLevelMetricsCollectorImpl metrics;
     
     @Setup @SuppressWarnings("unused")
     private void setUp(AxisTestClientContext context, Channel channel, AxisTestClientConfigurator[] configurators) throws Exception {
@@ -82,6 +90,9 @@
             ManagementSupport sender = (ManagementSupport)this.sender;
             messagesSent = sender.getMessagesSent();
             bytesSent = sender.getBytesSent();
+            metrics = new MessageLevelMetricsCollectorImpl();
+        } else {
+            metrics = null;
         }
     }
 
@@ -103,6 +114,9 @@
         }
         mc.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, options.getCharset());
         mc.setServiceContext(serviceClient.getServiceContext());
+        if (metrics != null) {
+            mc.setProperty(BaseConstants.METRICS_COLLECTOR, metrics);
+        }
         mepClient.addMessageContext(mc);
         mepClient.execute(block);
         return resultMessageLabel == null ? null : mepClient.getMessageContext(resultMessageLabel);
@@ -111,8 +125,32 @@
     public void afterReceive() throws Exception {
         if (sender instanceof ManagementSupport) {
             ManagementSupport sender = (ManagementSupport)this.sender;
-            Assert.assertEquals(messagesSent+1, sender.getMessagesSent());
-            Assert.assertTrue("No increase in bytes sent", sender.getBytesSent() > bytesSent);
+            synchronized (metrics) {
+                long start = System.currentTimeMillis();
+                while (true) {
+                    try {
+                        Assert.assertEquals(1, metrics.getMessagesSent());
+                        Assert.assertEquals(messagesSent+1, sender.getMessagesSent());
+                        long thisBytesSent = metrics.getBytesSent();
+                        Assert.assertTrue("No increase in bytes sent in message level metrics", thisBytesSent != 0);
+                        long newBytesSent = sender.getBytesSent();
+                        Assert.assertTrue("No increase in bytes sent in transport level metrics", newBytesSent > bytesSent);
+                        Assert.assertEquals("Mismatch between message and transport level metrics", thisBytesSent, newBytesSent - bytesSent);
+                        break;
+                    } catch (AssertionFailedError ex) {
+                        // SYNAPSE-491: Maybe the transport sender didn't finish updating the
+                        // metrics yet. We give it up to one seconds to do so.
+                        long remaining = start + 1000 - System.currentTimeMillis();
+                        if (remaining < 0) {
+                            throw ex;
+                        } else {
+                            log.debug("The transport sender didn't update the metrics yet ("
+                                    + ex.getMessage() + "). Waiting for " + remaining + " ms.");
+                            metrics.wait(remaining);
+                        }
+                    }
+                }
+            }
         }
     }
 }

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisAsyncEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisAsyncEndpoint.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisAsyncEndpoint.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisAsyncEndpoint.java Fri Jan  2 22:33:39 2009
@@ -19,86 +19,79 @@
 
 package org.apache.axis2.transport.testkit.axis2.endpoint;
 
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-
 import javax.xml.namespace.QName;
 
 import junit.framework.Assert;
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.InOnlyAxisOperation;
+import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.transport.testkit.axis2.MessageContextValidator;
 import org.apache.axis2.transport.testkit.endpoint.AsyncEndpoint;
+import org.apache.axis2.transport.testkit.endpoint.InOnlyEndpointSupport;
 import org.apache.axis2.transport.testkit.message.AxisMessage;
 import org.apache.axis2.transport.testkit.message.IncomingMessage;
 import org.apache.axis2.transport.testkit.tests.Setup;
 import org.apache.axis2.transport.testkit.tests.Transient;
 
-public class AxisAsyncEndpoint extends AxisTestEndpoint implements AsyncEndpoint<AxisMessage>, MessageReceiver {
-    private interface Event {
-        IncomingMessage<AxisMessage> process() throws Throwable;
-    }
-    
+public class AxisAsyncEndpoint extends AxisTestEndpoint implements AsyncEndpoint<AxisMessage> {
+    private @Transient AxisTestEndpointContext context;
     private @Transient MessageContextValidator[] validators;
-    private @Transient BlockingQueue<Event> queue;
+    private @Transient InOnlyEndpointSupport<AxisMessage> support;
     
     @Setup @SuppressWarnings("unused")
     private void setUp(AxisTestEndpointContext context, MessageContextValidator[] validators) {
+        this.context = context;
         this.validators = validators;
-        queue = new LinkedBlockingQueue<Event>();
+        support = new InOnlyEndpointSupport<AxisMessage>();
     }
     
     @Override
-    protected AxisOperation createOperation() {
-        AxisOperation operation = new InOnlyAxisOperation(new QName("default"));
-        operation.setMessageReceiver(this);
+    protected InOnlyAxisOperation createOperation() {
+        InOnlyAxisOperation operation = new InOnlyAxisOperation(new QName("default"));
+        operation.setMessageReceiver(new MessageReceiver() {
+            public void receive(MessageContext messageCtx) throws AxisFault {
+                AxisAsyncEndpoint.this.receive(messageCtx);
+            }
+        });
         return operation;
     }
 
-    public void receive(MessageContext messageCtx) throws AxisFault {
+    void receive(MessageContext messageCtx) throws AxisFault {
         final AxisMessage messageData;
         try {
             Assert.assertTrue(messageCtx.isServerSide());
+            
+            TransportInDescription transportIn = messageCtx.getTransportIn();
+            Assert.assertNotNull("transportIn not set on message context", transportIn);
+            Assert.assertEquals(context.getTransportName(), transportIn.getName());
+            
+            Assert.assertEquals(context.getTransportName(), messageCtx.getIncomingTransportName());
+            
             for (MessageContextValidator validator : validators) {
                 validator.validate(messageCtx, false);
             }
             messageData = new AxisMessage(messageCtx);
         }
-        catch (final Throwable ex) {
-            queue.add(new Event() {
-                public IncomingMessage<AxisMessage> process() throws Throwable {
-                    throw ex;
-                }
-            });
+        catch (Throwable ex) {
+            support.putException(ex);
             return;
         }
-        queue.add(new Event() {
-            public IncomingMessage<AxisMessage> process() throws Throwable {
-                return new IncomingMessage<AxisMessage>(null, messageData);
-            }
-        });
+        support.putMessage(null, messageData);
     }
 
     @Override
-    protected void onTransportError(final Throwable ex) {
-        queue.add(new Event() {
-            public IncomingMessage<AxisMessage> process() throws Throwable {
-                throw ex;
-            }
-        });
+    protected void onTransportError(Throwable ex) {
+        support.putException(ex);
     }
     
     public void clear() throws Exception {
-        queue.clear();
+        support.clear();
     }
 
     public IncomingMessage<AxisMessage> waitForMessage(int timeout) throws Throwable {
-        Event event = queue.poll(timeout, TimeUnit.MILLISECONDS);
-        return event == null ? null : event.process();
+        return support.waitForMessage(timeout);
     }
 }

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisEchoEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisEchoEndpoint.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisEchoEndpoint.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisEchoEndpoint.java Fri Jan  2 22:33:39 2009
@@ -23,7 +23,6 @@
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.InOutAxisOperation;
 import org.apache.axis2.receivers.AbstractInOutMessageReceiver;
 import org.apache.axis2.transport.testkit.endpoint.EndpointErrorListener;
@@ -34,8 +33,8 @@
     private final InOutEndpointSupport support = new InOutEndpointSupport();
     
     @Override
-    protected AxisOperation createOperation() {
-        AxisOperation operation = new InOutAxisOperation(new QName("echo"));
+    protected InOutAxisOperation createOperation() {
+        InOutAxisOperation operation = new InOutAxisOperation(new QName("echo"));
         operation.setMessageReceiver(new AbstractInOutMessageReceiver() {
             @Override
             public void invokeBusinessLogic(MessageContext inMessage, MessageContext outMessage) throws AxisFault {

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisTestEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisTestEndpoint.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisTestEndpoint.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisTestEndpoint.java Fri Jan  2 22:33:39 2009
@@ -19,12 +19,20 @@
 
 package org.apache.axis2.transport.testkit.axis2.endpoint;
 
+import java.io.PrintWriter;
 import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
 import java.util.UUID;
 
+import junit.framework.Assert;
+
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.transport.TransportListener;
+import org.apache.axis2.transport.base.BaseUtils;
 import org.apache.axis2.transport.base.event.TransportError;
 import org.apache.axis2.transport.base.event.TransportErrorListener;
 import org.apache.axis2.transport.base.event.TransportErrorSource;
@@ -34,26 +42,46 @@
 import org.apache.axis2.transport.testkit.tests.Setup;
 import org.apache.axis2.transport.testkit.tests.TearDown;
 import org.apache.axis2.transport.testkit.tests.Transient;
+import org.apache.axis2.transport.testkit.util.LogManager;
 
+/**
+ * Base class for Axis2 based test endpoints.
+ */
 @Name("axis")
-public abstract class AxisTestEndpoint implements TransportErrorListener {
+public abstract class AxisTestEndpoint {
     private @Transient AxisTestEndpointContext context;
     private @Transient TransportErrorSource transportErrorSource;
-    private @Transient AxisService service;
+    private @Transient TransportErrorListener errorListener;
+    @Transient AxisService service;
     
     @Setup @SuppressWarnings("unused")
-    private void setUp(AxisTestEndpointContext context, Channel channel, AxisServiceConfigurator[] configurators) throws Exception {
+    private void setUp(LogManager logManager, AxisTestEndpointContext context, Channel channel,
+            AxisServiceConfigurator[] configurators) throws Exception {
+        
         this.context = context;
         
         TransportListener listener = context.getTransportListener();
         if (listener instanceof TransportErrorSource) {
             transportErrorSource = (TransportErrorSource)listener;
-            transportErrorSource.addErrorListener(this);
+            errorListener = new TransportErrorListener() {
+                public void error(TransportError error) {
+                    AxisService s = error.getService();
+                    if (s == null || s == service) {
+                        onTransportError(error.getException());
+                    }
+                }
+            };
+            transportErrorSource.addErrorListener(errorListener);
         } else {
             transportErrorSource = null;
         }
         
-        String path = new URI(channel.getEndpointReference().getAddress()).getPath();
+        String path;
+        try {
+            path = new URI(channel.getEndpointReference().getAddress()).getPath();
+        } catch (URISyntaxException ex) {
+            path = null;
+        }
         String serviceName;
         if (path != null && path.startsWith(Channel.CONTEXT_PATH + "/")) {
             serviceName = path.substring(Channel.CONTEXT_PATH.length()+1);
@@ -62,32 +90,62 @@
         }
         service = new AxisService(serviceName);
         service.addOperation(createOperation());
-        // We want to receive all messages through the same operation:
-        service.addParameter(AxisService.SUPPORT_SINGLE_OP, true);
         if (configurators != null) {
             for (AxisServiceConfigurator configurator : configurators) {
                 configurator.setupService(service, false);
             }
         }
+        
+        // Output service parameters to log file
+        // FIXME: This actually doesn't give the expected result because the AxisTestEndpoint might be reused
+        //        by several test cases and in that case the log file is only produced once
+        List<Parameter> params = (List<Parameter>)service.getParameters();
+        if (!params.isEmpty()) {
+            PrintWriter log = new PrintWriter(logManager.createLog("service-parameters"), false);
+            try {
+                for (Parameter param : params) {
+                    log.print(param.getName());
+                    log.print("=");
+                    log.println(param.getValue());
+                }
+            } finally {
+                log.close();
+            }
+        }
+        
+        // We want to receive all messages through the same operation:
+        service.addParameter(AxisService.SUPPORT_SINGLE_OP, true);
+        
         context.getAxisConfiguration().addService(service);
+        
+        // The transport may disable the service. In that case, fail directly.
+        if (!BaseUtils.isUsingTransport(service, context.getTransportName())) {
+            Assert.fail("The service has been disabled by the transport");
+        }
     }
     
     @TearDown @SuppressWarnings("unused")
     private void tearDown() throws Exception {
         if (transportErrorSource != null) {
-            transportErrorSource.removeErrorListener(this);
+            transportErrorSource.removeErrorListener(errorListener);
         }
         context.getAxisConfiguration().removeService(service.getName());
     }
     
-    public void error(TransportError error) {
-        AxisService s = error.getService();
-        if (s == null || s == service) {
-            onTransportError(error.getException());
-        }
-    }
-
+    /**
+     * Create an operation appropriate for the message exchange pattern implemented
+     * by the test endpoint. The operation returned should have a 
+     * {@link MessageReceiver} set.
+     * 
+     * @return the operation
+     */
     protected abstract AxisOperation createOperation();
     
+    /**
+     * Process a transport error. Note that this method will only be called if
+     * the underlying transport supports reporting of transport errors.
+     * 
+     * @param ex the exception describing the transport error
+     */
     protected abstract void onTransportError(Throwable ex);
 }

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisTestEndpointContext.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisTestEndpointContext.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisTestEndpointContext.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/axis2/endpoint/AxisTestEndpointContext.java Fri Jan  2 22:33:39 2009
@@ -1,99 +1,102 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.axis2.endpoint;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
-import org.apache.axis2.engine.AxisConfiguration;
-import org.apache.axis2.transport.TransportListener;
-import org.apache.axis2.transport.UtilsTransportServer;
-import org.apache.axis2.transport.testkit.axis2.TransportDescriptionFactory;
-import org.apache.axis2.transport.testkit.tests.Setup;
-import org.apache.axis2.transport.testkit.tests.TearDown;
-import org.apache.axis2.transport.testkit.tests.Transient;
-
-/**
- * Resource maintaining the {@link ConfigurationContext} for {@link AxisTestEndpoint}
- * instances. This class provides the Axis2 server environment.
- * <p>
- * Dependencies:
- * <dl>
- *   <dt>{@link TransportDescriptionFactory} (1)</dt>
- *   <dd>Used to create transport descriptions.</dd>
- *   <dt>{@link AxisTestEndpointContextConfigurator} (0..*)</dt>
- *   <dd>Used to configure the transport.</dd>
- * </dl>
- */
-public class AxisTestEndpointContext {
-    public static final AxisTestEndpointContext INSTANCE = new AxisTestEndpointContext();
-    
-    private @Transient TransportListener listener;
-    private @Transient UtilsTransportServer server;
-    
-    private AxisTestEndpointContext() {}
-    
-    @Setup @SuppressWarnings("unused")
-    private void setUp(TransportDescriptionFactory tdf, AxisTestEndpointContextConfigurator[] configurators) throws Exception {
-        
-        server = new UtilsTransportServer();
-        
-        TransportOutDescription trpOutDesc = tdf.createTransportOutDescription();
-        TransportInDescription trpInDesc = tdf.createTransportInDescription();
-        listener = trpInDesc.getReceiver();
-        server.addTransport(trpInDesc, trpOutDesc);
-        
-        for (AxisTestEndpointContextConfigurator configurator : configurators) {
-            configurator.setupTransport(trpInDesc, trpOutDesc);
-        }
-        
-        ConfigurationContext cfgCtx = server.getConfigurationContext();
-        
-        cfgCtx.setContextRoot("/");
-        cfgCtx.setServicePath("services");
-        
-        AxisConfiguration axisConfiguration = server.getAxisConfiguration();
-        
-        server.start();
-    }
-    
-    @TearDown @SuppressWarnings("unused")
-    private void tearDown() throws Exception {
-        server.stop();
-    }
-    
-    public AxisConfiguration getAxisConfiguration() {
-        return server.getAxisConfiguration();
-    }
-
-    public TransportListener getTransportListener() {
-        return listener;
-    }
-
-    public String getEPR(AxisService service) throws AxisFault {
-        EndpointReference[] endpointReferences =
-            listener.getEPRsForService(service.getName(), "localhost");
-        return endpointReferences != null && endpointReferences.length > 0
-                            ? endpointReferences[0].getAddress() : null;
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.axis2.endpoint;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.TransportInDescription;
+import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.transport.TransportListener;
+import org.apache.axis2.transport.UtilsTransportServer;
+import org.apache.axis2.transport.testkit.axis2.TransportDescriptionFactory;
+import org.apache.axis2.transport.testkit.tests.Setup;
+import org.apache.axis2.transport.testkit.tests.TearDown;
+import org.apache.axis2.transport.testkit.tests.Transient;
+
+/**
+ * Resource maintaining the {@link ConfigurationContext} for {@link AxisTestEndpoint}
+ * instances. This class provides the Axis2 server environment.
+ * <p>
+ * Dependencies:
+ * <dl>
+ *   <dt>{@link TransportDescriptionFactory} (1)</dt>
+ *   <dd>Used to create transport descriptions.</dd>
+ *   <dt>{@link AxisTestEndpointContextConfigurator} (0..*)</dt>
+ *   <dd>Used to configure the transport.</dd>
+ * </dl>
+ */
+public class AxisTestEndpointContext {
+    public static final AxisTestEndpointContext INSTANCE = new AxisTestEndpointContext();
+    
+    private @Transient TransportInDescription trpInDesc;
+    private @Transient UtilsTransportServer server;
+    
+    private AxisTestEndpointContext() {}
+    
+    @Setup @SuppressWarnings("unused")
+    private void setUp(TransportDescriptionFactory tdf, AxisTestEndpointContextConfigurator[] configurators) throws Exception {
+        
+        server = new UtilsTransportServer();
+        
+        TransportOutDescription trpOutDesc = tdf.createTransportOutDescription();
+        trpInDesc = tdf.createTransportInDescription();
+        server.addTransport(trpInDesc, trpOutDesc);
+        
+        for (AxisTestEndpointContextConfigurator configurator : configurators) {
+            configurator.setupTransport(trpInDesc, trpOutDesc);
+        }
+        
+        ConfigurationContext cfgCtx = server.getConfigurationContext();
+        
+        cfgCtx.setContextRoot("/");
+        cfgCtx.setServicePath("services");
+        
+        AxisConfiguration axisConfiguration = server.getAxisConfiguration();
+        
+        server.start();
+    }
+    
+    @TearDown @SuppressWarnings("unused")
+    private void tearDown() throws Exception {
+        server.stop();
+    }
+    
+    public AxisConfiguration getAxisConfiguration() {
+        return server.getAxisConfiguration();
+    }
+
+    public TransportListener getTransportListener() {
+        return trpInDesc.getReceiver();
+    }
+    
+    public String getTransportName() {
+        return trpInDesc.getName();
+    }
+
+    public String getEPR(AxisService service) throws AxisFault {
+        EndpointReference[] endpointReferences =
+            trpInDesc.getReceiver().getEPRsForService(service.getName(), "localhost");
+        return endpointReferences != null && endpointReferences.length > 0
+                            ? endpointReferences[0].getAddress() : null;
+    }
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/channel/AsyncChannel.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/channel/AsyncChannel.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/channel/AsyncChannel.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/channel/AsyncChannel.java Fri Jan  2 22:33:39 2009
@@ -1,23 +1,23 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.channel;
-
-public interface AsyncChannel extends Channel {
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.channel;
+
+public interface AsyncChannel extends Channel {
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/channel/RequestResponseChannel.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/channel/RequestResponseChannel.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/channel/RequestResponseChannel.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/channel/RequestResponseChannel.java Fri Jan  2 22:33:39 2009
@@ -1,23 +1,23 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.channel;
-
-public interface RequestResponseChannel extends Channel {
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.channel;
+
+public interface RequestResponseChannel extends Channel {
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/AsyncTestClient.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/AsyncTestClient.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/AsyncTestClient.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/AsyncTestClient.java Fri Jan  2 22:33:39 2009
@@ -1,26 +1,26 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.client;
-
-import javax.mail.internet.ContentType;
-
-public interface AsyncTestClient<M> extends TestClient {
-    void sendMessage(ClientOptions options, ContentType contentType, M message) throws Exception;
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.client;
+
+import javax.mail.internet.ContentType;
+
+public interface AsyncTestClient<M> extends TestClient {
+    void sendMessage(ClientOptions options, ContentType contentType, M message) throws Exception;
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/AsyncTestClientAdapter.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/AsyncTestClientAdapter.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/AsyncTestClientAdapter.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/AsyncTestClientAdapter.java Fri Jan  2 22:33:39 2009
@@ -1,47 +1,47 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.client;
-
-import javax.mail.internet.ContentType;
-
-import org.apache.axis2.transport.testkit.Adapter;
-import org.apache.axis2.transport.testkit.message.MessageEncoder;
-
-public class AsyncTestClientAdapter<M,N> implements AsyncTestClient<M>, Adapter {
-    private final AsyncTestClient<N> target;
-    private final MessageEncoder<M,N> encoder;
-
-    public AsyncTestClientAdapter(AsyncTestClient<N> target, MessageEncoder<M,N> encoder) {
-        this.target = target;
-        this.encoder = encoder;
-    }
-    
-    public AsyncTestClient<N> getTarget() {
-        return target;
-    }
-
-    public ContentType getContentType(ClientOptions options, ContentType contentType) throws Exception {
-        return target.getContentType(options, encoder.getContentType(options, contentType));
-    }
-
-    public void sendMessage(ClientOptions options, ContentType contentType, M message) throws Exception {
-        target.sendMessage(options, encoder.getContentType(options, contentType), encoder.encode(options, message));
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.client;
+
+import javax.mail.internet.ContentType;
+
+import org.apache.axis2.transport.testkit.Adapter;
+import org.apache.axis2.transport.testkit.message.MessageEncoder;
+
+public class AsyncTestClientAdapter<M,N> implements AsyncTestClient<M>, Adapter {
+    private final AsyncTestClient<N> target;
+    private final MessageEncoder<M,N> encoder;
+
+    public AsyncTestClientAdapter(AsyncTestClient<N> target, MessageEncoder<M,N> encoder) {
+        this.target = target;
+        this.encoder = encoder;
+    }
+    
+    public AsyncTestClient<N> getTarget() {
+        return target;
+    }
+
+    public ContentType getContentType(ClientOptions options, ContentType contentType) throws Exception {
+        return target.getContentType(options, encoder.getContentType(options, contentType));
+    }
+
+    public void sendMessage(ClientOptions options, ContentType contentType, M message) throws Exception {
+        target.sendMessage(options, encoder.getContentType(options, contentType), encoder.encode(options, message));
+    }
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/ClientOptions.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/ClientOptions.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/ClientOptions.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/ClientOptions.java Fri Jan  2 22:33:39 2009
@@ -1,65 +1,65 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.client;
-
-import javax.mail.internet.ContentType;
-
-import org.apache.axiom.om.util.UUIDGenerator;
-
-public class ClientOptions {
-    private final ContentType transportContentType;
-    private final String charset;
-    private String mimeBoundary;
-    private String rootContentId;
-
-    // TODO: this is ugly; find a better solution
-    public ClientOptions(TestClient client, ContentType baseContentType, String charset) throws Exception {
-        this.charset = charset;
-        transportContentType = client.getContentType(this, baseContentType);
-    }
-
-    public ContentType getTransportContentType() {
-        return transportContentType;
-    }
-
-    public String getCharset() {
-        return charset;
-    }
-    
-    public String getMimeBoundary() {
-        if (mimeBoundary == null) {
-            mimeBoundary =
-                    "MIMEBoundary"
-                            + UUIDGenerator.getUUID().replace(':', '_');
-
-        }
-        return mimeBoundary;
-    }
-
-    public String getRootContentId() {
-        if (rootContentId == null) {
-            rootContentId =
-                    "0."
-                            + UUIDGenerator.getUUID()
-                            + "@apache.org";
-        }
-        return rootContentId;
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.client;
+
+import javax.mail.internet.ContentType;
+
+import org.apache.axiom.om.util.UUIDGenerator;
+
+public class ClientOptions {
+    private final ContentType transportContentType;
+    private final String charset;
+    private String mimeBoundary;
+    private String rootContentId;
+
+    // TODO: this is ugly; find a better solution
+    public ClientOptions(TestClient client, ContentType baseContentType, String charset) throws Exception {
+        this.charset = charset;
+        transportContentType = client.getContentType(this, baseContentType);
+    }
+
+    public ContentType getTransportContentType() {
+        return transportContentType;
+    }
+
+    public String getCharset() {
+        return charset;
+    }
+    
+    public String getMimeBoundary() {
+        if (mimeBoundary == null) {
+            mimeBoundary =
+                    "MIMEBoundary"
+                            + UUIDGenerator.getUUID().replace(':', '_');
+
+        }
+        return mimeBoundary;
+    }
+
+    public String getRootContentId() {
+        if (rootContentId == null) {
+            rootContentId =
+                    "0."
+                            + UUIDGenerator.getUUID()
+                            + "@apache.org";
+        }
+        return rootContentId;
+    }
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/RequestResponseTestClient.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/RequestResponseTestClient.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/RequestResponseTestClient.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/RequestResponseTestClient.java Fri Jan  2 22:33:39 2009
@@ -1,28 +1,28 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.client;
-
-import javax.mail.internet.ContentType;
-
-import org.apache.axis2.transport.testkit.message.IncomingMessage;
-
-public interface RequestResponseTestClient<M,N> extends TestClient {
-    IncomingMessage<N> sendMessage(ClientOptions options, ContentType contentType, M message) throws Exception;
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.client;
+
+import javax.mail.internet.ContentType;
+
+import org.apache.axis2.transport.testkit.message.IncomingMessage;
+
+public interface RequestResponseTestClient<M,N> extends TestClient {
+    IncomingMessage<N> sendMessage(ClientOptions options, ContentType contentType, M message) throws Exception;
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/RequestResponseTestClientAdapter.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/RequestResponseTestClientAdapter.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/RequestResponseTestClientAdapter.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/RequestResponseTestClientAdapter.java Fri Jan  2 22:33:39 2009
@@ -1,55 +1,55 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.client;
-
-import javax.mail.internet.ContentType;
-
-import org.apache.axis2.transport.testkit.Adapter;
-import org.apache.axis2.transport.testkit.message.IncomingMessage;
-import org.apache.axis2.transport.testkit.message.MessageDecoder;
-import org.apache.axis2.transport.testkit.message.MessageEncoder;
-
-public class RequestResponseTestClientAdapter<M,N,O,P> implements RequestResponseTestClient<M,O>, Adapter {
-    private final RequestResponseTestClient<N,P> target;
-    private final MessageEncoder<M,N> encoder;
-    private final MessageDecoder<P,O> decoder;
-
-    public RequestResponseTestClientAdapter(RequestResponseTestClient<N,P> target,
-                                            MessageEncoder<M,N> encoder,
-                                            MessageDecoder<P,O> decoder) {
-        this.target = target;
-        this.encoder = encoder;
-        this.decoder = decoder;
-    }
-    
-    public RequestResponseTestClient<N,P> getTarget() {
-        return target;
-    }
-
-    public ContentType getContentType(ClientOptions options, ContentType contentType) throws Exception {
-        return target.getContentType(options, encoder.getContentType(options, contentType));
-    }
-
-    public IncomingMessage<O> sendMessage(ClientOptions options, ContentType contentType, M message) throws Exception {
-        IncomingMessage<P> response = target.sendMessage(options, encoder.getContentType(options, contentType), encoder.encode(options, message));
-        ContentType responseContentType = response.getContentType();
-        return new IncomingMessage<O>(responseContentType, decoder.decode(responseContentType, response.getData()));
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.client;
+
+import javax.mail.internet.ContentType;
+
+import org.apache.axis2.transport.testkit.Adapter;
+import org.apache.axis2.transport.testkit.message.IncomingMessage;
+import org.apache.axis2.transport.testkit.message.MessageDecoder;
+import org.apache.axis2.transport.testkit.message.MessageEncoder;
+
+public class RequestResponseTestClientAdapter<M,N,O,P> implements RequestResponseTestClient<M,O>, Adapter {
+    private final RequestResponseTestClient<N,P> target;
+    private final MessageEncoder<M,N> encoder;
+    private final MessageDecoder<P,O> decoder;
+
+    public RequestResponseTestClientAdapter(RequestResponseTestClient<N,P> target,
+                                            MessageEncoder<M,N> encoder,
+                                            MessageDecoder<P,O> decoder) {
+        this.target = target;
+        this.encoder = encoder;
+        this.decoder = decoder;
+    }
+    
+    public RequestResponseTestClient<N,P> getTarget() {
+        return target;
+    }
+
+    public ContentType getContentType(ClientOptions options, ContentType contentType) throws Exception {
+        return target.getContentType(options, encoder.getContentType(options, contentType));
+    }
+
+    public IncomingMessage<O> sendMessage(ClientOptions options, ContentType contentType, M message) throws Exception {
+        IncomingMessage<P> response = target.sendMessage(options, encoder.getContentType(options, contentType), encoder.encode(options, message));
+        ContentType responseContentType = response.getContentType();
+        return new IncomingMessage<O>(responseContentType, decoder.decode(responseContentType, response.getData()));
+    }
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/TestClient.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/TestClient.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/TestClient.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/client/TestClient.java Fri Jan  2 22:33:39 2009
@@ -1,29 +1,29 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.client;
-
-import javax.mail.internet.ContentType;
-
-import org.apache.axis2.transport.testkit.name.Key;
-
-@Key("client")
-public interface TestClient {
-    ContentType getContentType(ClientOptions options, ContentType contentType) throws Exception;
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.client;
+
+import javax.mail.internet.ContentType;
+
+import org.apache.axis2.transport.testkit.name.Key;
+
+@Key("client")
+public interface TestClient {
+    ContentType getContentType(ClientOptions options, ContentType contentType) throws Exception;
 }
\ No newline at end of file

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/AsyncEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/AsyncEndpoint.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/AsyncEndpoint.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/AsyncEndpoint.java Fri Jan  2 22:33:39 2009
@@ -1,33 +1,62 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.endpoint;
-
-import org.apache.axis2.transport.testkit.message.IncomingMessage;
-import org.apache.axis2.transport.testkit.name.Key;
-
-@Key("endpoint")
-public interface AsyncEndpoint<M> {
-    /**
-     * Discard any pending messages.
-     */
-    void clear() throws Exception;
-    
-    IncomingMessage<M> waitForMessage(int timeout) throws Throwable;
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.endpoint;
+
+import org.apache.axis2.transport.testkit.message.IncomingMessage;
+import org.apache.axis2.transport.testkit.name.Key;
+
+/**
+ * Interface implemented by in-only test endpoints.
+ * <p>
+ * The endpoint must be ready to receive messages immediately after it
+ * has been set up. In particular implementations must not make the
+ * assumption that messages are only during a call to {@link #waitForMessage(int)}.
+ * Indeed, a typical test case will set up the endpoint, send a message and only
+ * afterwards call {@link #waitForMessage(int)}.
+ * <p>
+ * There are two strategies to guarantee this behavior:
+ * <ul>
+ *   <li>The underlying transport internally queues incoming messages.
+ *       In that case {@link #waitForMessage(int)} should simply poll
+ *       for new messages. An example of this type of transport is
+ *       the mail transport.</li>
+ *   <li>The underlying transport requires that incoming messages are
+ *       processed immediately. In that case the implementation should
+ *       set up the required receiver or message processor and add
+ *       incoming messages to an internal queue that is polled
+ *       when {@link #waitForMessage(int)} is called. An example of
+ *       this kind of transport is HTTP. Implementations can use
+ *       {@link InOnlyEndpointSupport} to manage the message queue.</li>
+ * </ul>
+ * 
+ * @see org.apache.axis2.transport.testkit.endpoint
+ * 
+ * @param <M>
+ */
+// TODO: rename this to InOnlyEndpoint
+@Key("endpoint")
+public interface AsyncEndpoint<M> {
+    /**
+     * Discard any pending messages.
+     */
+    void clear() throws Exception;
+    
+    IncomingMessage<M> waitForMessage(int timeout) throws Throwable;
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/InOutEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/InOutEndpoint.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/InOutEndpoint.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/InOutEndpoint.java Fri Jan  2 22:33:39 2009
@@ -21,6 +21,11 @@
 
 import org.apache.axis2.transport.testkit.name.Key;
 
+/**
+ * Interface implemented by in-out test endpoints.
+ * 
+ * @see org.apache.axis2.transport.testkit.endpoint
+ */
 @Key("endpoint")
 public interface InOutEndpoint {
     void addEndpointErrorListener(EndpointErrorListener listener);

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/TestEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/TestEndpoint.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/TestEndpoint.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/TestEndpoint.java Fri Jan  2 22:33:39 2009
@@ -1,26 +1,26 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.axis2.transport.testkit.endpoint;
-
-import org.apache.axis2.transport.testkit.name.Key;
-
-@Key("endpoint")
-public interface TestEndpoint {
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.axis2.transport.testkit.endpoint;
+
+import org.apache.axis2.transport.testkit.name.Key;
+
+@Key("endpoint")
+public interface TestEndpoint {
+}

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/AndExpression.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/AndExpression.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/AndExpression.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/AndExpression.java Fri Jan  2 22:33:39 2009
@@ -21,6 +21,9 @@
 
 import java.util.Map;
 
+/**
+ * Implementation of the <em>and</em> (<tt>&amp;</tt>) operator.
+ */
 public class AndExpression implements FilterExpression {
     private final FilterExpression[] operands;
 

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/EqualityExpression.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/EqualityExpression.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/EqualityExpression.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/EqualityExpression.java Fri Jan  2 22:33:39 2009
@@ -21,6 +21,9 @@
 
 import java.util.Map;
 
+/**
+ * Implementation of the <em>equal</em> (<tt>=</tt>) operator.
+ */
 public class EqualityExpression implements FilterExpression {
     private final String key;
     private final String value;

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/FilterExpression.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/FilterExpression.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/FilterExpression.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/FilterExpression.java Fri Jan  2 22:33:39 2009
@@ -21,6 +21,15 @@
 
 import java.util.Map;
 
+/**
+ * Interface representing an abstract filter expression.
+ */
 public interface FilterExpression {
+    /**
+     * Evaluate the filter expression.
+     * 
+     * @param map the data on which the filter expression is evaluated
+     * @return true if the data matches the filter represented by this object
+     */
     boolean matches(Map<String,String> map);
 }

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/FilterExpressionParser.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/FilterExpressionParser.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/FilterExpressionParser.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/FilterExpressionParser.java Fri Jan  2 22:33:39 2009
@@ -30,6 +30,9 @@
 import org.apache.directory.shared.ldap.filter.OrNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 
+/**
+ * Parser for LDAP filter expressions.
+ */
 public class FilterExpressionParser {
     private FilterExpressionParser() {}
     
@@ -59,6 +62,13 @@
         }
     }
     
+    /**
+     * Parse an LDAP filter expression.
+     * 
+     * @param filter an LDAP filter as defined by <a href="http://www.ietf.org/rfc/rfc2254.txt">RFC2254</a>
+     * @return the parsed filter
+     * @throws ParseException if the filter is syntactically incorrect
+     */
     public static FilterExpression parse(String filter) throws ParseException {
         return buildExpression(FilterParser.parse(filter));
     }

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/NotExpression.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/NotExpression.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/NotExpression.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/NotExpression.java Fri Jan  2 22:33:39 2009
@@ -21,6 +21,9 @@
 
 import java.util.Map;
 
+/**
+ * Implementation of the <em>not</em> (<tt>!</tt>) operator.
+ */
 public class NotExpression implements FilterExpression {
     private final FilterExpression operand;
     

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/OrExpression.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/OrExpression.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/OrExpression.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/OrExpression.java Fri Jan  2 22:33:39 2009
@@ -21,6 +21,9 @@
 
 import java.util.Map;
 
+/**
+ * Implementation of the <em>or</em> (<tt>|</tt>) operator.
+ */
 public class OrExpression implements FilterExpression {
     private final FilterExpression[] operands;
 

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/PresenceExpression.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/PresenceExpression.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/PresenceExpression.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/PresenceExpression.java Fri Jan  2 22:33:39 2009
@@ -21,6 +21,9 @@
 
 import java.util.Map;
 
+/**
+ * Implementation of the <em>present</em> (<tt>=*</tt>) operator.
+ */
 public class PresenceExpression implements FilterExpression {
     private final String key;
 

Modified: webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/HttpTransportTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/HttpTransportTestSuiteBuilder.java?rev=730924&r1=730923&r2=730924&view=diff
==============================================================================
--- webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/HttpTransportTestSuiteBuilder.java (original)
+++ webservices/commons/trunk/scratch/senaka/sci-flex/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/HttpTransportTestSuiteBuilder.java Fri Jan  2 22:33:39 2009
@@ -68,11 +68,16 @@
         }
         builder.addRESTAsyncTestClient(new JavaNetRESTClient());
         
+        builder.addAxisAsyncEndpoint(new AxisAsyncEndpoint());
+        builder.addByteArrayAsyncEndpoint(new JettyByteArrayAsyncEndpoint());
+        builder.addRESTAsyncEndpoint(new JettyRESTAsyncEndpoint());
         
         builder.addRequestResponseChannel(channel);
         
         builder.addAxisRequestResponseTestClient(new AxisRequestResponseTestClient());
         
+        builder.addEchoEndpoint(new AxisEchoEndpoint());
+        builder.addEchoEndpoint(new JettyEchoEndpoint());
         
         builder.build();