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 ve...@apache.org on 2008/11/03 22:07:21 UTC

svn commit: r710158 [16/20] - in /webservices/commons/trunk/modules/transport: ./ modules/base/ modules/base/src/main/java/org/apache/axis2/format/ modules/base/src/main/java/org/apache/axis2/transport/base/ modules/base/src/main/java/org/apache/axis2/...

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/TestEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/TestEndpoint.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/TestEndpoint.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/TestEndpoint.java Mon Nov  3 13:07:13 2008
@@ -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 {
+}

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/endpoint/TestEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/AndExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/EqualityExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/FilterExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/FilterExpressionParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/NotExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/OrExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/filter/PresenceExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/HttpChannel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/HttpTransportTestSuiteBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JavaNetClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JavaNetRESTClient.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JavaNetRESTClient.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JavaNetRESTClient.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JavaNetRESTClient.java Mon Nov  3 13:07:13 2008
@@ -1,64 +1,64 @@
-/*
- *  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.http;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLConnection;
-
-import javax.mail.internet.ContentType;
-
-import org.apache.axis2.transport.testkit.client.AsyncTestClient;
-import org.apache.axis2.transport.testkit.client.ClientOptions;
-import org.apache.axis2.transport.testkit.message.RESTMessage;
-import org.apache.axis2.transport.testkit.name.Name;
-import org.apache.axis2.transport.testkit.tests.Setup;
-import org.apache.axis2.transport.testkit.tests.Transient;
-import org.apache.commons.io.IOUtils;
-
-@Name("java.net")
-public class JavaNetRESTClient implements AsyncTestClient<RESTMessage> {
-    private @Transient HttpChannel channel;
-    
-    @Setup @SuppressWarnings("unused")
-    private void setUp(HttpChannel channel) {
-        this.channel = channel;
-    }
-    
-    public ContentType getContentType(ClientOptions options, ContentType contentType) {
-        return contentType;
-    }
-
-    public void sendMessage(ClientOptions options, ContentType contentType, RESTMessage message) throws Exception {
-        StringBuilder url = new StringBuilder();
-        url.append(channel.getEndpointReference().getAddress());
-        url.append("/default");
-        String queryString = message.getQueryString();
-        if (queryString.length() > 0) {
-            url.append('?');
-            url.append(queryString);
-        }
-        URLConnection connection = new URL(url.toString()).openConnection();
-        connection.setDoInput(true);
-        InputStream in = connection.getInputStream();
-        IOUtils.copy(in, System.out);
-        in.close();
-    }
-}
+/*
+ *  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.http;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+
+import javax.mail.internet.ContentType;
+
+import org.apache.axis2.transport.testkit.client.AsyncTestClient;
+import org.apache.axis2.transport.testkit.client.ClientOptions;
+import org.apache.axis2.transport.testkit.message.RESTMessage;
+import org.apache.axis2.transport.testkit.name.Name;
+import org.apache.axis2.transport.testkit.tests.Setup;
+import org.apache.axis2.transport.testkit.tests.Transient;
+import org.apache.commons.io.IOUtils;
+
+@Name("java.net")
+public class JavaNetRESTClient implements AsyncTestClient<RESTMessage> {
+    private @Transient HttpChannel channel;
+    
+    @Setup @SuppressWarnings("unused")
+    private void setUp(HttpChannel channel) {
+        this.channel = channel;
+    }
+    
+    public ContentType getContentType(ClientOptions options, ContentType contentType) {
+        return contentType;
+    }
+
+    public void sendMessage(ClientOptions options, ContentType contentType, RESTMessage message) throws Exception {
+        StringBuilder url = new StringBuilder();
+        url.append(channel.getEndpointReference().getAddress());
+        url.append("/default");
+        String queryString = message.getQueryString();
+        if (queryString.length() > 0) {
+            url.append('?');
+            url.append(queryString);
+        }
+        URLConnection connection = new URL(url.toString()).openConnection();
+        connection.setDoInput(true);
+        InputStream in = connection.getInputStream();
+        IOUtils.copy(in, System.out);
+        in.close();
+    }
+}

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JavaNetRESTClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JettyAsyncEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JettyByteArrayAsyncEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JettyEchoEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JettyEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JettyRESTAsyncEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/http/JettyServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/AxisMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/IncomingMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/MessageDecoder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/MessageEncoder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/RESTMessage.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/RESTMessage.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/RESTMessage.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/RESTMessage.java Mon Nov  3 13:07:13 2008
@@ -1,93 +1,93 @@
-/*
- *  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.message;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-
-import org.apache.commons.lang.ObjectUtils;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-
-public class RESTMessage {
-    public static class Parameter {
-        private final String key;
-        private final String value;
-        
-        public Parameter(String key, String value) {
-            this.key = key;
-            this.value = value;
-        }
-
-        public String getKey() {
-            return key;
-        }
-
-        public String getValue() {
-            return value;
-        }
-
-        @Override
-        public boolean equals(Object _obj) {
-            if (_obj instanceof Parameter) {
-                Parameter obj = (Parameter)_obj;
-                return ObjectUtils.equals(key, obj.key) && ObjectUtils.equals(value, obj.value);
-            } else {
-                return false;
-            }
-        }
-
-        @Override
-        public int hashCode() {
-            return new HashCodeBuilder().append(key).append(value).toHashCode();
-        }
-
-        @Override
-        public String toString() {
-            return key + "=" + value;
-        }
-    }
-    
-    private final Parameter[] parameters;
-
-    public RESTMessage(Parameter[] parameters) {
-        this.parameters = parameters;
-    }
-    
-    public Parameter[] getParameters() {
-        return parameters;
-    }
-
-    public String getQueryString() {
-        StringBuilder buffer = new StringBuilder();
-        for (Parameter parameter : parameters) {
-            if (buffer.length() > 0) {
-                buffer.append('&');
-            }
-            buffer.append(parameter.getKey());
-            buffer.append('=');
-            try {
-                buffer.append(URLEncoder.encode(parameter.getValue(), "UTF-8"));
-            } catch (UnsupportedEncodingException e) {
-                throw new Error("JRE doesn't know UTF-8!", e);
-            }
-        }
-        return buffer.toString();
-    }
-}
+/*
+ *  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.message;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+import org.apache.commons.lang.ObjectUtils;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+
+public class RESTMessage {
+    public static class Parameter {
+        private final String key;
+        private final String value;
+        
+        public Parameter(String key, String value) {
+            this.key = key;
+            this.value = value;
+        }
+
+        public String getKey() {
+            return key;
+        }
+
+        public String getValue() {
+            return value;
+        }
+
+        @Override
+        public boolean equals(Object _obj) {
+            if (_obj instanceof Parameter) {
+                Parameter obj = (Parameter)_obj;
+                return ObjectUtils.equals(key, obj.key) && ObjectUtils.equals(value, obj.value);
+            } else {
+                return false;
+            }
+        }
+
+        @Override
+        public int hashCode() {
+            return new HashCodeBuilder().append(key).append(value).toHashCode();
+        }
+
+        @Override
+        public String toString() {
+            return key + "=" + value;
+        }
+    }
+    
+    private final Parameter[] parameters;
+
+    public RESTMessage(Parameter[] parameters) {
+        this.parameters = parameters;
+    }
+    
+    public Parameter[] getParameters() {
+        return parameters;
+    }
+
+    public String getQueryString() {
+        StringBuilder buffer = new StringBuilder();
+        for (Parameter parameter : parameters) {
+            if (buffer.length() > 0) {
+                buffer.append('&');
+            }
+            buffer.append(parameter.getKey());
+            buffer.append('=');
+            try {
+                buffer.append(URLEncoder.encode(parameter.getValue(), "UTF-8"));
+            } catch (UnsupportedEncodingException e) {
+                throw new Error("JRE doesn't know UTF-8!", e);
+            }
+        }
+        return buffer.toString();
+    }
+}

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/RESTMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/XMLMessage.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/XMLMessage.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/XMLMessage.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/XMLMessage.java Mon Nov  3 13:07:13 2008
@@ -1,109 +1,109 @@
-/*
- *  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.message;
-
-import javax.mail.internet.ContentType;
-import javax.mail.internet.ParseException;
-
-import org.apache.axiom.attachments.Attachments;
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.soap.SOAP11Constants;
-import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axiom.soap.SOAPFactory;
-import org.apache.axis2.transport.http.HTTPConstants;
-
-public class XMLMessage {
-    public enum Type {
-        SOAP11(SOAP11Constants.SOAP_11_CONTENT_TYPE),
-        SOAP12(SOAP12Constants.SOAP_12_CONTENT_TYPE),
-        POX("application/xml"),
-        SWA(HTTPConstants.MEDIA_TYPE_MULTIPART_RELATED);
-        
-        private final String contentType;
-        
-        private Type(String contentType) {
-            this.contentType = contentType;
-        }
-        
-        public ContentType getContentType() {
-            try {
-                return new ContentType(contentType);
-            } catch (ParseException ex) {
-                throw new Error(ex);
-            }
-        }
-    }
-    
-    private final Type type;
-    private final OMElement payload;
-    private final Attachments attachments;
-    
-    public XMLMessage(OMElement payload, Type type, Attachments attachments) {
-        this.payload = payload;
-        this.type = type;
-        this.attachments = attachments;
-    }
-
-    public XMLMessage(OMElement payload, Type type) {
-        this(payload, type, null);
-    }
-    
-    public Type getType() {
-        return type;
-    }
-
-    public OMElement getPayload() {
-        return payload;
-    }
-    
-    public OMElement getMessageElement() {
-        if (type == Type.POX) {
-            return payload;
-        } else {
-            SOAPFactory factory;
-            if (type == Type.SOAP11) {
-                factory = OMAbstractFactory.getSOAP11Factory();
-            } else {
-                factory = OMAbstractFactory.getSOAP12Factory();
-            }
-            SOAPEnvelope envelope = factory.getDefaultEnvelope();
-            envelope.getBody().addChild(payload);
-            return envelope;
-        }
-    }
-
-    public Attachments getAttachments() {
-        return attachments;
-    }
-    
-    public static Type getTypeFromContentType(ContentType contentType) {
-        String baseType = contentType.getBaseType();
-        Type type = null;
-        for (Type candidate : Type.values()) {
-            if (candidate.getContentType().getBaseType().equalsIgnoreCase(baseType)) {
-                type = candidate;
-                break;
-            }
-        }
-        return type;
-    }
-}
+/*
+ *  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.message;
+
+import javax.mail.internet.ContentType;
+import javax.mail.internet.ParseException;
+
+import org.apache.axiom.attachments.Attachments;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.SOAP11Constants;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.transport.http.HTTPConstants;
+
+public class XMLMessage {
+    public enum Type {
+        SOAP11(SOAP11Constants.SOAP_11_CONTENT_TYPE),
+        SOAP12(SOAP12Constants.SOAP_12_CONTENT_TYPE),
+        POX("application/xml"),
+        SWA(HTTPConstants.MEDIA_TYPE_MULTIPART_RELATED);
+        
+        private final String contentType;
+        
+        private Type(String contentType) {
+            this.contentType = contentType;
+        }
+        
+        public ContentType getContentType() {
+            try {
+                return new ContentType(contentType);
+            } catch (ParseException ex) {
+                throw new Error(ex);
+            }
+        }
+    }
+    
+    private final Type type;
+    private final OMElement payload;
+    private final Attachments attachments;
+    
+    public XMLMessage(OMElement payload, Type type, Attachments attachments) {
+        this.payload = payload;
+        this.type = type;
+        this.attachments = attachments;
+    }
+
+    public XMLMessage(OMElement payload, Type type) {
+        this(payload, type, null);
+    }
+    
+    public Type getType() {
+        return type;
+    }
+
+    public OMElement getPayload() {
+        return payload;
+    }
+    
+    public OMElement getMessageElement() {
+        if (type == Type.POX) {
+            return payload;
+        } else {
+            SOAPFactory factory;
+            if (type == Type.SOAP11) {
+                factory = OMAbstractFactory.getSOAP11Factory();
+            } else {
+                factory = OMAbstractFactory.getSOAP12Factory();
+            }
+            SOAPEnvelope envelope = factory.getDefaultEnvelope();
+            envelope.getBody().addChild(payload);
+            return envelope;
+        }
+    }
+
+    public Attachments getAttachments() {
+        return attachments;
+    }
+    
+    public static Type getTypeFromContentType(ContentType contentType) {
+        String baseType = contentType.getBaseType();
+        Type type = null;
+        for (Type candidate : Type.values()) {
+            if (candidate.getContentType().getBaseType().equalsIgnoreCase(baseType)) {
+                type = candidate;
+                break;
+            }
+        }
+        return type;
+    }
+}

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/message/XMLMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/name/Key.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/name/Name.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/name/NameUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/name/Named.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/ManagedTestCase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/ManagedTestCase.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/ManagedTestCase.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/ManagedTestCase.java Mon Nov  3 13:07:13 2008
@@ -1,128 +1,128 @@
-/*
- *  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.tests;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.apache.axis2.transport.testkit.name.Key;
-import org.apache.axis2.transport.testkit.name.NameUtils;
-import org.apache.axis2.transport.testkit.util.LogManager;
-
-@Key("test")
-public abstract class ManagedTestCase extends TestCase {
-    private final TestResourceSet resourceSet = new TestResourceSet();
-    
-    private Map<String,String> nameComponents;
-    
-    private String id;
-    private boolean managed;
-    private Class<?> testClass;
-
-    public ManagedTestCase(Object... resources) {
-        resourceSet.addResources(resources);
-        addResource(LogManager.INSTANCE);
-    }
-
-    protected void addResource(Object resource) {
-        resourceSet.addResource(resource);
-    }
-    
-    public Map<String,String> getNameComponents() {
-        if (nameComponents == null) {
-            nameComponents = new LinkedHashMap<String,String>();
-            NameUtils.getNameComponents(nameComponents, this);
-            resourceSet.resolve();
-            for (Object resource : resourceSet.getResources()) {
-                NameUtils.getNameComponents(nameComponents, resource);
-            }
-        }
-        return nameComponents;
-    }
-    
-    // TODO: TransportTestCase should be in the same package as TransportTestSuite and this
-    //       method should have package access
-    public void init(String id, boolean managed, Class<?> testClass) {
-        this.id = id;
-        this.managed = managed;
-        this.testClass = testClass;
-    }
-
-    public String getId() {
-        return id != null ? id : getName();
-    }
-
-    public Class<?> getTestClass() {
-        return testClass != null ? testClass : getClass();
-    }
-
-    @Override
-    public String getName() {
-        String testName = super.getName();
-        if (testName == null) {
-            StringBuilder buffer = new StringBuilder();
-            if (id != null) {
-                buffer.append(id);
-                buffer.append(':');
-            }
-            boolean first = true;
-            for (Map.Entry<String,String> entry : getNameComponents().entrySet()) {
-                if (first) {
-                    first = false;
-                } else {
-                    buffer.append(',');
-                }
-                buffer.append(entry.getKey());
-                buffer.append('=');
-                buffer.append(entry.getValue());
-            }
-            testName = buffer.toString();
-            setName(testName);
-        }
-        return testName;
-    }
-
-    public TestResourceSet getResourceSet() {
-        return resourceSet;
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        if (!managed) {
-            LogManager.INSTANCE.setTestCase(this);
-            resourceSet.setUp();
-        }
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        if (!managed) {
-            resourceSet.tearDown();
-            LogManager.INSTANCE.setTestCase(null);
-        }
-    }
-
-    @Override
-    public String toString() {
-        return getName() + "(" + testClass.getName() + ")";
-    }
+/*
+ *  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.tests;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.transport.testkit.name.Key;
+import org.apache.axis2.transport.testkit.name.NameUtils;
+import org.apache.axis2.transport.testkit.util.LogManager;
+
+@Key("test")
+public abstract class ManagedTestCase extends TestCase {
+    private final TestResourceSet resourceSet = new TestResourceSet();
+    
+    private Map<String,String> nameComponents;
+    
+    private String id;
+    private boolean managed;
+    private Class<?> testClass;
+
+    public ManagedTestCase(Object... resources) {
+        resourceSet.addResources(resources);
+        addResource(LogManager.INSTANCE);
+    }
+
+    protected void addResource(Object resource) {
+        resourceSet.addResource(resource);
+    }
+    
+    public Map<String,String> getNameComponents() {
+        if (nameComponents == null) {
+            nameComponents = new LinkedHashMap<String,String>();
+            NameUtils.getNameComponents(nameComponents, this);
+            resourceSet.resolve();
+            for (Object resource : resourceSet.getResources()) {
+                NameUtils.getNameComponents(nameComponents, resource);
+            }
+        }
+        return nameComponents;
+    }
+    
+    // TODO: TransportTestCase should be in the same package as TransportTestSuite and this
+    //       method should have package access
+    public void init(String id, boolean managed, Class<?> testClass) {
+        this.id = id;
+        this.managed = managed;
+        this.testClass = testClass;
+    }
+
+    public String getId() {
+        return id != null ? id : getName();
+    }
+
+    public Class<?> getTestClass() {
+        return testClass != null ? testClass : getClass();
+    }
+
+    @Override
+    public String getName() {
+        String testName = super.getName();
+        if (testName == null) {
+            StringBuilder buffer = new StringBuilder();
+            if (id != null) {
+                buffer.append(id);
+                buffer.append(':');
+            }
+            boolean first = true;
+            for (Map.Entry<String,String> entry : getNameComponents().entrySet()) {
+                if (first) {
+                    first = false;
+                } else {
+                    buffer.append(',');
+                }
+                buffer.append(entry.getKey());
+                buffer.append('=');
+                buffer.append(entry.getValue());
+            }
+            testName = buffer.toString();
+            setName(testName);
+        }
+        return testName;
+    }
+
+    public TestResourceSet getResourceSet() {
+        return resourceSet;
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        if (!managed) {
+            LogManager.INSTANCE.setTestCase(this);
+            resourceSet.setUp();
+        }
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        if (!managed) {
+            resourceSet.tearDown();
+            LogManager.INSTANCE.setTestCase(null);
+        }
+    }
+
+    @Override
+    public String toString() {
+        return getName() + "(" + testClass.getName() + ")";
+    }
 }
\ No newline at end of file

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/ManagedTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/MessageTestCase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/MessageTestCase.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/MessageTestCase.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/MessageTestCase.java Mon Nov  3 13:07:13 2008
@@ -1,69 +1,69 @@
-/*
- *  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.tests;
-
-import javax.mail.internet.ContentType;
-
-import org.apache.axis2.transport.testkit.Adapter;
-import org.apache.axis2.transport.testkit.MessageExchangeValidator;
-import org.apache.axis2.transport.testkit.client.ClientOptions;
-import org.apache.axis2.transport.testkit.client.TestClient;
-
-public abstract class MessageTestCase extends ManagedTestCase {
-    protected final ContentType contentType;
-    protected final ClientOptions options;
-    private @Transient MessageExchangeValidator[] validators;
-
-    public MessageTestCase(TestClient client, ContentType contentType, String charset, Object... resources) {
-        super(resources);
-        if (client instanceof Adapter) {
-            addResource(((Adapter)client).getTarget());
-        } else {
-            addResource(client);
-        }
-        this.contentType = contentType;
-        try {
-            options = new ClientOptions(client, contentType, charset);
-        } catch (Exception ex) {
-            // TODO: handle this in a better way
-            throw new Error(ex);
-        }
-        addResource(options);
-        addResource(this);
-    }
-    
-    @Setup @SuppressWarnings("unused")
-    private void setUp(MessageExchangeValidator[] validators) {
-        this.validators = validators;
-    }
-    
-    @Override
-    protected void runTest() throws Throwable {
-        for (MessageExchangeValidator validator : validators) {
-            validator.beforeSend();
-        }
-        doRunTest();
-        for (MessageExchangeValidator validator : validators) {
-            validator.afterReceive();
-        }
-    }
-
-    protected abstract void doRunTest() 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.tests;
+
+import javax.mail.internet.ContentType;
+
+import org.apache.axis2.transport.testkit.Adapter;
+import org.apache.axis2.transport.testkit.MessageExchangeValidator;
+import org.apache.axis2.transport.testkit.client.ClientOptions;
+import org.apache.axis2.transport.testkit.client.TestClient;
+
+public abstract class MessageTestCase extends ManagedTestCase {
+    protected final ContentType contentType;
+    protected final ClientOptions options;
+    private @Transient MessageExchangeValidator[] validators;
+
+    public MessageTestCase(TestClient client, ContentType contentType, String charset, Object... resources) {
+        super(resources);
+        if (client instanceof Adapter) {
+            addResource(((Adapter)client).getTarget());
+        } else {
+            addResource(client);
+        }
+        this.contentType = contentType;
+        try {
+            options = new ClientOptions(client, contentType, charset);
+        } catch (Exception ex) {
+            // TODO: handle this in a better way
+            throw new Error(ex);
+        }
+        addResource(options);
+        addResource(this);
+    }
+    
+    @Setup @SuppressWarnings("unused")
+    private void setUp(MessageExchangeValidator[] validators) {
+        this.validators = validators;
+    }
+    
+    @Override
+    protected void runTest() throws Throwable {
+        for (MessageExchangeValidator validator : validators) {
+            validator.beforeSend();
+        }
+        doRunTest();
+        for (MessageExchangeValidator validator : validators) {
+            validator.afterReceive();
+        }
+    }
+
+    protected abstract void doRunTest() throws Throwable;
+}

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/MessageTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/Setup.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/Setup.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/Setup.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/Setup.java Mon Nov  3 13:07:13 2008
@@ -1,33 +1,33 @@
-/*
- *  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.tests;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation identifying methods to be called when a resource is set up.
- */
-@Target({ElementType.TYPE, ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Setup {
-}
+/*
+ *  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.tests;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation identifying methods to be called when a resource is set up.
+ */
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Setup {
+}

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/Setup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TearDown.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TearDown.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TearDown.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TearDown.java Mon Nov  3 13:07:13 2008
@@ -1,33 +1,33 @@
-/*
- *  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.tests;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation identifying methods to be called when a resource is torn down.
- */
-@Target({ElementType.TYPE, ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface TearDown {
-}
+/*
+ *  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.tests;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation identifying methods to be called when a resource is torn down.
+ */
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TearDown {
+}

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TearDown.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResourceSet.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResourceSet.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResourceSet.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResourceSet.java Mon Nov  3 13:07:13 2008
@@ -1,177 +1,177 @@
-/*
- *  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.tests;
-
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class TestResourceSet {
-    enum Status { UNRESOLVED, RESOLVED, SETUP, RECYCLED };
-    
-    private static Log log = LogFactory.getLog(TestResourceSet.class);
-    
-    private final TestResourceSet parent;
-    private final List<TestResource> unresolvedResources = new LinkedList<TestResource>();
-    final List<TestResource> resolvedResources = new LinkedList<TestResource>();
-    Status status = Status.UNRESOLVED;
-    
-    public TestResourceSet(TestResourceSet parent) {
-        this.parent = parent;
-    }
-    
-    public TestResourceSet() {
-        this(null);
-    }
-
-    public void addResource(Object resource) {
-        if (status != Status.UNRESOLVED) {
-            throw new IllegalStateException();
-        }
-        unresolvedResources.add(new TestResource(resource));
-    }
-    
-    public void addResources(Object... resources) {
-        for (Object resource : resources) {
-            addResource(resource);
-        }
-    }
-    
-    public Object[] getResources() {
-        if (status == Status.UNRESOLVED) {
-            throw new IllegalStateException();
-        }
-        Object[] result = new Object[resolvedResources.size()];
-        int i = 0;
-        for (TestResource resource : resolvedResources) {
-            result[i++] = resource.getInstance();
-        }
-        return result;
-    }
-    
-    public void resolve() {
-        if (status == Status.UNRESOLVED) {
-            while (!unresolvedResources.isEmpty()) {
-                resolveResource(unresolvedResources.get(0));
-            }
-            status = Status.RESOLVED;
-        }
-    }
-    
-    private void resolveResource(TestResource resource) {
-        unresolvedResources.remove(resource);
-        resource.resolve(this);
-        resolvedResources.add(resource);
-    }
-    
-    TestResource[] findResources(Class<?> clazz, boolean allowAutoCreate) {
-        List<TestResource> result = new LinkedList<TestResource>();
-        if (parent != null) {
-            result.addAll(Arrays.asList(parent.findResources(clazz, false)));
-        }
-        for (TestResource resource : resolvedResources) {
-            if (clazz.isInstance(resource.getInstance())) {
-                result.add(resource);
-            }
-        }
-        List<TestResource> unresolvedMatchingResources = new LinkedList<TestResource>();
-        for (TestResource resource : unresolvedResources) {
-            if (clazz.isInstance(resource.getInstance())) {
-                unresolvedMatchingResources.add(resource);
-            }
-        }
-        for (TestResource resource : unresolvedMatchingResources) {
-            resolveResource(resource);
-            result.add(resource);
-        }
-        if (allowAutoCreate && result.isEmpty()) {
-            TestResource resource;
-            try {
-                Field field = clazz.getField("INSTANCE");
-                resource = new TestResource(field.get(null));
-            } catch (Throwable ex) {
-                resource = null;
-            }
-            if (resource != null) {
-                unresolvedResources.add(resource);
-                resolveResource(resource);
-                result.add(resource);
-            }
-        }
-        return result.toArray(new TestResource[result.size()]);
-    }
-    
-    public void setUp() throws Exception {
-        resolve();
-        if (status != Status.RESOLVED) {
-            throw new IllegalStateException();
-        }
-        setUp(resolvedResources);
-        status = Status.SETUP;
-    }
-    
-    static List<TestResource> filterOnHasLifecycle(List<TestResource> resources) {
-        List<TestResource> result = new ArrayList<TestResource>(resources.size());
-        for (TestResource resource : resources) {
-            if (resource.hasLifecycle()) {
-                result.add(resource);
-            }
-        }
-        return result;
-    }
-    
-    static void setUp(List<TestResource> resources) throws Exception {
-        resources = filterOnHasLifecycle(resources);
-        if (!resources.isEmpty()) {
-            log.info("Setting up: " + resources);
-            for (TestResource resource : resources) {
-                resource.setUp();
-            }
-        }
-    }
-    
-    public void tearDown() throws Exception {
-        if (status != Status.SETUP) {
-            throw new IllegalStateException();
-        }
-        tearDown(resolvedResources);
-    }
-    
-    static void tearDown(List<TestResource> resources) throws Exception {
-        resources = filterOnHasLifecycle(resources);
-        if (!resources.isEmpty()) {
-            log.info("Tearing down: " + resources);
-            for (ListIterator<TestResource> it = resources.listIterator(resources.size()); it.hasPrevious(); ) {
-                it.previous().tearDown();
-            }
-        }
-    }
-
-    @Override
-    public String toString() {
-        return resolvedResources.toString();
-    }
-}
+/*
+ *  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.tests;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class TestResourceSet {
+    enum Status { UNRESOLVED, RESOLVED, SETUP, RECYCLED };
+    
+    private static Log log = LogFactory.getLog(TestResourceSet.class);
+    
+    private final TestResourceSet parent;
+    private final List<TestResource> unresolvedResources = new LinkedList<TestResource>();
+    final List<TestResource> resolvedResources = new LinkedList<TestResource>();
+    Status status = Status.UNRESOLVED;
+    
+    public TestResourceSet(TestResourceSet parent) {
+        this.parent = parent;
+    }
+    
+    public TestResourceSet() {
+        this(null);
+    }
+
+    public void addResource(Object resource) {
+        if (status != Status.UNRESOLVED) {
+            throw new IllegalStateException();
+        }
+        unresolvedResources.add(new TestResource(resource));
+    }
+    
+    public void addResources(Object... resources) {
+        for (Object resource : resources) {
+            addResource(resource);
+        }
+    }
+    
+    public Object[] getResources() {
+        if (status == Status.UNRESOLVED) {
+            throw new IllegalStateException();
+        }
+        Object[] result = new Object[resolvedResources.size()];
+        int i = 0;
+        for (TestResource resource : resolvedResources) {
+            result[i++] = resource.getInstance();
+        }
+        return result;
+    }
+    
+    public void resolve() {
+        if (status == Status.UNRESOLVED) {
+            while (!unresolvedResources.isEmpty()) {
+                resolveResource(unresolvedResources.get(0));
+            }
+            status = Status.RESOLVED;
+        }
+    }
+    
+    private void resolveResource(TestResource resource) {
+        unresolvedResources.remove(resource);
+        resource.resolve(this);
+        resolvedResources.add(resource);
+    }
+    
+    TestResource[] findResources(Class<?> clazz, boolean allowAutoCreate) {
+        List<TestResource> result = new LinkedList<TestResource>();
+        if (parent != null) {
+            result.addAll(Arrays.asList(parent.findResources(clazz, false)));
+        }
+        for (TestResource resource : resolvedResources) {
+            if (clazz.isInstance(resource.getInstance())) {
+                result.add(resource);
+            }
+        }
+        List<TestResource> unresolvedMatchingResources = new LinkedList<TestResource>();
+        for (TestResource resource : unresolvedResources) {
+            if (clazz.isInstance(resource.getInstance())) {
+                unresolvedMatchingResources.add(resource);
+            }
+        }
+        for (TestResource resource : unresolvedMatchingResources) {
+            resolveResource(resource);
+            result.add(resource);
+        }
+        if (allowAutoCreate && result.isEmpty()) {
+            TestResource resource;
+            try {
+                Field field = clazz.getField("INSTANCE");
+                resource = new TestResource(field.get(null));
+            } catch (Throwable ex) {
+                resource = null;
+            }
+            if (resource != null) {
+                unresolvedResources.add(resource);
+                resolveResource(resource);
+                result.add(resource);
+            }
+        }
+        return result.toArray(new TestResource[result.size()]);
+    }
+    
+    public void setUp() throws Exception {
+        resolve();
+        if (status != Status.RESOLVED) {
+            throw new IllegalStateException();
+        }
+        setUp(resolvedResources);
+        status = Status.SETUP;
+    }
+    
+    static List<TestResource> filterOnHasLifecycle(List<TestResource> resources) {
+        List<TestResource> result = new ArrayList<TestResource>(resources.size());
+        for (TestResource resource : resources) {
+            if (resource.hasLifecycle()) {
+                result.add(resource);
+            }
+        }
+        return result;
+    }
+    
+    static void setUp(List<TestResource> resources) throws Exception {
+        resources = filterOnHasLifecycle(resources);
+        if (!resources.isEmpty()) {
+            log.info("Setting up: " + resources);
+            for (TestResource resource : resources) {
+                resource.setUp();
+            }
+        }
+    }
+    
+    public void tearDown() throws Exception {
+        if (status != Status.SETUP) {
+            throw new IllegalStateException();
+        }
+        tearDown(resolvedResources);
+    }
+    
+    static void tearDown(List<TestResource> resources) throws Exception {
+        resources = filterOnHasLifecycle(resources);
+        if (!resources.isEmpty()) {
+            log.info("Tearing down: " + resources);
+            for (ListIterator<TestResource> it = resources.listIterator(resources.size()); it.hasPrevious(); ) {
+                it.previous().tearDown();
+            }
+        }
+    }
+
+    @Override
+    public String toString() {
+        return resolvedResources.toString();
+    }
+}

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResourceSet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResourceSetTransition.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResourceSetTransition.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResourceSetTransition.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResourceSetTransition.java Mon Nov  3 13:07:13 2008
@@ -1,82 +1,82 @@
-/*
- *  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.tests;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.axis2.transport.testkit.tests.TestResourceSet.Status;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class TestResourceSetTransition {
-    private static final Log log = LogFactory.getLog(TestResourceSetTransition.class);
-    
-    private final TestResourceSet old;
-    private final TestResourceSet target;
-    private final List<TestResource> oldResourcesToTearDown;
-    private final List<TestResource> resourcesToSetUp;
-    private final List<TestResource> resourcesToKeep;
-    
-    public TestResourceSetTransition(TestResourceSet old, TestResourceSet target) {
-        this.old = old;
-        this.target = target;
-        target.resolve();
-        if (target.status != TestResourceSet.Status.RESOLVED) {
-            throw new IllegalStateException();
-        }
-        if (old.status != Status.SETUP) {
-            throw new IllegalStateException();
-        }
-        oldResourcesToTearDown = new LinkedList<TestResource>();
-        resourcesToSetUp = new LinkedList<TestResource>(target.resolvedResources);
-        resourcesToKeep = new LinkedList<TestResource>();
-        outer: for (TestResource oldResource : TestResourceSet.filterOnHasLifecycle(old.resolvedResources)) {
-            for (Iterator<TestResource> it = resourcesToSetUp.iterator(); it.hasNext(); ) {
-                TestResource resource = it.next();
-                if (resource.equals(oldResource)) {
-                    it.remove();
-                    resource.recycle(oldResource);
-                    resourcesToKeep.add(oldResource);
-                    continue outer;
-                }
-            }
-            oldResourcesToTearDown.add(oldResource);
-        }
-    }
-    
-    public void tearDown() throws Exception {
-        if (old.status != Status.SETUP) {
-            throw new IllegalStateException();
-        }
-        TestResourceSet.tearDown(oldResourcesToTearDown);
-        old.status = Status.RECYCLED;
-    }
-    
-    public void setUp() throws Exception {
-        if (target.status != TestResourceSet.Status.RESOLVED) {
-            throw new IllegalStateException();
-        }
-        log.debug("Keeping: " + resourcesToKeep);
-        TestResourceSet.setUp(resourcesToSetUp);
-        target.status = Status.SETUP;
-    }
-}
+/*
+ *  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.tests;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.axis2.transport.testkit.tests.TestResourceSet.Status;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class TestResourceSetTransition {
+    private static final Log log = LogFactory.getLog(TestResourceSetTransition.class);
+    
+    private final TestResourceSet old;
+    private final TestResourceSet target;
+    private final List<TestResource> oldResourcesToTearDown;
+    private final List<TestResource> resourcesToSetUp;
+    private final List<TestResource> resourcesToKeep;
+    
+    public TestResourceSetTransition(TestResourceSet old, TestResourceSet target) {
+        this.old = old;
+        this.target = target;
+        target.resolve();
+        if (target.status != TestResourceSet.Status.RESOLVED) {
+            throw new IllegalStateException();
+        }
+        if (old.status != Status.SETUP) {
+            throw new IllegalStateException();
+        }
+        oldResourcesToTearDown = new LinkedList<TestResource>();
+        resourcesToSetUp = new LinkedList<TestResource>(target.resolvedResources);
+        resourcesToKeep = new LinkedList<TestResource>();
+        outer: for (TestResource oldResource : TestResourceSet.filterOnHasLifecycle(old.resolvedResources)) {
+            for (Iterator<TestResource> it = resourcesToSetUp.iterator(); it.hasNext(); ) {
+                TestResource resource = it.next();
+                if (resource.equals(oldResource)) {
+                    it.remove();
+                    resource.recycle(oldResource);
+                    resourcesToKeep.add(oldResource);
+                    continue outer;
+                }
+            }
+            oldResourcesToTearDown.add(oldResource);
+        }
+    }
+    
+    public void tearDown() throws Exception {
+        if (old.status != Status.SETUP) {
+            throw new IllegalStateException();
+        }
+        TestResourceSet.tearDown(oldResourcesToTearDown);
+        old.status = Status.RECYCLED;
+    }
+    
+    public void setUp() throws Exception {
+        if (target.status != TestResourceSet.Status.RESOLVED) {
+            throw new IllegalStateException();
+        }
+        log.debug("Keeping: " + resourcesToKeep);
+        TestResourceSet.setUp(resourcesToSetUp);
+        target.status = Status.SETUP;
+    }
+}

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/TestResourceSetTransition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/Transient.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/Transient.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/Transient.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/Transient.java Mon Nov  3 13:07:13 2008
@@ -1,33 +1,33 @@
-/*
- *  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.tests;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation identifying fields to be reset when a resource is torn down.
- */
-@Target({ElementType.TYPE, ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Transient {
-}
+/*
+ *  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.tests;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation identifying fields to be reset when a resource is torn down.
+ */
+@Target({ElementType.TYPE, ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Transient {
+}

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/Transient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/AsyncMessageTestCase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/AsyncMessageTestCase.java?rev=710158&r1=710157&r2=710158&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/AsyncMessageTestCase.java (original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/AsyncMessageTestCase.java Mon Nov  3 13:07:13 2008
@@ -1,61 +1,61 @@
-/*
- *  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.tests.async;
-
-import javax.mail.internet.ContentType;
-
-import org.apache.axis2.transport.testkit.channel.AsyncChannel;
-import org.apache.axis2.transport.testkit.client.AsyncTestClient;
-import org.apache.axis2.transport.testkit.endpoint.AsyncEndpoint;
-import org.apache.axis2.transport.testkit.message.IncomingMessage;
-import org.apache.axis2.transport.testkit.tests.MessageTestCase;
-
-public abstract class AsyncMessageTestCase<M> extends MessageTestCase {
-    private final AsyncTestClient<M> client;
-    private final AsyncEndpoint<M> endpoint;
-    
-    // TODO: maybe we don't need an explicit AsyncChannel
-    public AsyncMessageTestCase(AsyncChannel channel, AsyncTestClient<M> client, AsyncEndpoint<M> endpoint, ContentType contentType, String charset, Object... resources) {
-        super(client, contentType, charset, resources);
-        this.client = client;
-        this.endpoint = endpoint;
-        addResource(channel);
-        addResource(endpoint);
-    }
-
-    @Override
-    protected void doRunTest() throws Throwable {
-        endpoint.clear();
-        M expected = prepareMessage();
-        
-        // Run the test.
-//                    contentTypeMode == ContentTypeMode.TRANSPORT ? contentType : null);
-        client.sendMessage(options, contentType, expected);
-        IncomingMessage<M> actual = endpoint.waitForMessage(8000);
-        if (actual == null) {
-            fail("Failed to get message");
-        }
-        
-        checkMessageData(expected, actual.getData());
-    }
-    
-    protected abstract M prepareMessage() throws Exception;
-    protected abstract void checkMessageData(M expected, M actual) 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.tests.async;
+
+import javax.mail.internet.ContentType;
+
+import org.apache.axis2.transport.testkit.channel.AsyncChannel;
+import org.apache.axis2.transport.testkit.client.AsyncTestClient;
+import org.apache.axis2.transport.testkit.endpoint.AsyncEndpoint;
+import org.apache.axis2.transport.testkit.message.IncomingMessage;
+import org.apache.axis2.transport.testkit.tests.MessageTestCase;
+
+public abstract class AsyncMessageTestCase<M> extends MessageTestCase {
+    private final AsyncTestClient<M> client;
+    private final AsyncEndpoint<M> endpoint;
+    
+    // TODO: maybe we don't need an explicit AsyncChannel
+    public AsyncMessageTestCase(AsyncChannel channel, AsyncTestClient<M> client, AsyncEndpoint<M> endpoint, ContentType contentType, String charset, Object... resources) {
+        super(client, contentType, charset, resources);
+        this.client = client;
+        this.endpoint = endpoint;
+        addResource(channel);
+        addResource(endpoint);
+    }
+
+    @Override
+    protected void doRunTest() throws Throwable {
+        endpoint.clear();
+        M expected = prepareMessage();
+        
+        // Run the test.
+//                    contentTypeMode == ContentTypeMode.TRANSPORT ? contentType : null);
+        client.sendMessage(options, contentType, expected);
+        IncomingMessage<M> actual = endpoint.waitForMessage(8000);
+        if (actual == null) {
+            fail("Failed to get message");
+        }
+        
+        checkMessageData(expected, actual.getData());
+    }
+    
+    protected abstract M prepareMessage() throws Exception;
+    protected abstract void checkMessageData(M expected, M actual) throws Exception;
 }
\ No newline at end of file

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/AsyncMessageTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/BinaryTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/LargeSOAPAsyncMessageTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/RESTTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/SwATestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/commons/trunk/modules/transport/modules/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/async/TextPlainTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native