You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by wo...@apache.org on 2008/03/03 19:48:24 UTC

svn commit: r633234 [6/24] - in /webservices/axis2/trunk/java: ./ modules/jaxws-integration/ modules/jaxws-integration/test/ modules/jaxws-integration/test/client/ modules/jaxws-integration/test/org/ modules/jaxws-integration/test/org/apache/ modules/j...

Added: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/StreamSourceDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/StreamSourceDispatch.java?rev=633234&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/StreamSourceDispatch.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/StreamSourceDispatch.java Mon Mar  3 10:47:38 2008
@@ -0,0 +1,316 @@
+/*
+ * 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.jaxws.dispatch;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.concurrent.Future;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Response;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
+
+import junit.framework.TestCase;
+import org.apache.axis2.jaxws.message.util.Reader2Writer;
+import org.apache.axis2.jaxws.TestLogger;
+
+/**
+ * This class tests the JAX-WS Dispatch<Source> functionality with various
+ * forms of a StreamSource object. 
+ *
+ */
+public class StreamSourceDispatch extends TestCase {
+
+    private static XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+    
+	/**
+     * Invoke a Dispatch<Source> synchronously with the content in PAYLOAD mode.
+	 */
+    public void testSyncPayloadMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+		svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+		Dispatch<Source> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, Source.class, 
+                Service.Mode.PAYLOAD);
+		
+        // Create a StreamSource with the desired content
+        byte[] bytes = DispatchTestConstants.sampleBodyContent.getBytes();
+        ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
+        Source srcStream = new StreamSource((InputStream) stream);
+        
+        // Invoke the Dispatch<Source>
+        TestLogger.logger.debug(">> Invoking sync Dispatch with PAYLOAD mode");
+		Source response = dispatch.invoke(srcStream);
+		assertNotNull(response);
+        
+        // Prepare the response content for checking
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
+        Reader2Writer r2w = new Reader2Writer(reader);
+        String responseText = r2w.getAsString();
+        TestLogger.logger.debug(responseText);
+        
+        // Check to make sure the content is correct
+        assertTrue(!responseText.contains("soap"));
+        assertTrue(!responseText.contains("Envelope"));
+        assertTrue(!responseText.contains("Body"));
+        assertTrue(responseText.contains("echoStringResponse"));            
+	}
+
+    /**
+     * Invoke a Dispatch<Source> synchronously with the content in MESSAGE mode.
+     */
+    public void testSyncMessageMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+		Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+		svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+		Dispatch<Source> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, Source.class,
+				Mode.MESSAGE);
+		
+		// Create a StreamSource with the desired content
+        byte[] bytes = DispatchTestConstants.sampleSoapMessage.getBytes();
+        ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
+        Source srcStream = new StreamSource((InputStream) stream);
+
+        TestLogger.logger.debug(">> Invoking sync Dispatch with MESSAGE Mode");
+		StreamSource response = (StreamSource) dispatch.invoke(srcStream);
+        assertNotNull(response);
+
+        // Prepare the response content for checking
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
+        Reader2Writer r2w = new Reader2Writer(reader);
+        String responseText = r2w.getAsString();
+        TestLogger.logger.debug(responseText);
+        
+        // Check to make sure the content is correct
+        assertTrue(responseText.contains("soap"));
+        assertTrue(responseText.contains("Envelope"));
+        assertTrue(responseText.contains("Body"));
+        assertTrue(responseText.contains("echoStringResponse"));            
+	}
+
+    /**
+     * Invoke a Dispatch<Source> asynchronously with the content in PAYLOAD mode.
+     */
+    public void testAsyncCallbackPayloadMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<Source> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, Source.class,
+                Service.Mode.PAYLOAD);
+        
+        // We'll need a callback instance to handle the async responses
+        AsyncCallback<Source> callbackHandler = new AsyncCallback<Source>();
+        
+        // Create a StreamSource with the desired content
+        byte[] bytes = DispatchTestConstants.sampleBodyContent.getBytes();
+        ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
+        Source srcStream = new StreamSource((InputStream) stream);
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch with PAYLOAD mode");
+        Future<?> monitor = dispatch.invokeAsync(srcStream, callbackHandler);
+
+        // Wait for the async response to be returned
+        while (!monitor.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
+        }
+        
+        Source response = callbackHandler.getValue();
+        assertNotNull(response);
+        
+        // Prepare the response content for checking
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
+        Reader2Writer r2w = new Reader2Writer(reader);
+        String responseText = r2w.getAsString();
+        TestLogger.logger.debug(responseText);
+        
+        // Check to make sure the content is correct
+        assertTrue(!responseText.contains("soap"));
+        assertTrue(!responseText.contains("Envelope"));
+        assertTrue(!responseText.contains("Body"));
+        assertTrue(responseText.contains("echoStringResponse"));
+    }
+    
+    /**
+     * Invoke a Dispatch<Source> asynchronously with the content in MESSAGE mode.
+     */
+	public void testAsyncCallbackMessageMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts 
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+		svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<Source> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, Source.class,
+                Mode.MESSAGE);
+        
+        // We'll need a callback instance to handle the async responses
+        AsyncCallback<Source> callbackHandler = new AsyncCallback<Source>();
+
+        // Create a StreamSource with the desired content
+        byte[] bytes = DispatchTestConstants.sampleSoapMessage.getBytes();
+        ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
+		Source srcStream = new StreamSource((InputStream) stream);
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch with MESSAGE mode");
+        Future<?> monitor = dispatch.invokeAsync(srcStream, callbackHandler);
+
+        // Wait for the async response to be returned
+        while (!monitor.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
+        }
+        
+        Source response = callbackHandler.getValue();
+        assertNotNull(response);
+
+        // Prepare the response content for checking
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
+        Reader2Writer r2w = new Reader2Writer(reader);
+        String responseText = r2w.getAsString();
+        TestLogger.logger.debug(responseText);
+        
+        // Check to make sure the content is correct
+        assertTrue(responseText.contains("soap"));
+        assertTrue(responseText.contains("Envelope"));
+        assertTrue(responseText.contains("Body"));
+        assertTrue(responseText.contains("echoStringResponse"));
+    }
+
+    /**
+     * Invoke a Dispatch<Source> asynchronously with the content in PAYLOAD mode.
+     */
+    public void testAsyncPollingPayloadMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<Source> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, Source.class,
+                Service.Mode.PAYLOAD);
+        // Create a StreamSource with the desired content
+        byte[] bytes = DispatchTestConstants.sampleBodyContent.getBytes();
+        ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
+        Source srcStream = new StreamSource((InputStream) stream);
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch with PAYLOAD mode");
+        Response<Source> asyncResponse = dispatch.invokeAsync(srcStream);
+
+        // Wait for the async response to be returned
+        while (!asyncResponse.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
+        }
+        
+        Source response = asyncResponse.get();
+        assertNotNull(response);
+        
+        // Prepare the response content for checking
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
+        Reader2Writer r2w = new Reader2Writer(reader);
+        String responseText = r2w.getAsString();
+        TestLogger.logger.debug(responseText);
+        
+        // Check to make sure the content is correct
+        assertTrue(!responseText.contains("soap"));
+        assertTrue(!responseText.contains("Envelope"));
+        assertTrue(!responseText.contains("Body"));
+        assertTrue(responseText.contains("echoStringResponse"));
+    }
+    
+    /**
+     * Invoke a Dispatch<Source> asynchronously with the content in MESSAGE mode.
+     */
+    public void testAsyncPollingMessageMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts 
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<Source> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, Source.class,
+                Mode.MESSAGE);
+
+        // Create a StreamSource with the desired content
+        byte[] bytes = DispatchTestConstants.sampleSoapMessage.getBytes();
+        ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
+        Source srcStream = new StreamSource((InputStream) stream);
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch with MESSAGE mode");
+        Response<Source> asyncResponse = dispatch.invokeAsync(srcStream);
+
+        // Wait for the async response to be returned
+        while (!asyncResponse.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
+        }
+        
+        Source response = asyncResponse.get();
+        assertNotNull(response);
+
+        // Prepare the response content for checking
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
+        Reader2Writer r2w = new Reader2Writer(reader);
+        String responseText = r2w.getAsString();
+        TestLogger.logger.debug(responseText);
+        
+        // Check to make sure the content is correct
+        assertTrue(responseText.contains("soap"));
+        assertTrue(responseText.contains("Envelope"));
+        assertTrue(responseText.contains("Body"));
+        assertTrue(responseText.contains("echoStringResponse"));
+    }
+    
+    /**
+     * Invoke a Dispatch<Source> one-way operation
+     */
+	public void testOneWayPayloadMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+		Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+		svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+		Dispatch<Source> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, Source.class,
+				Service.Mode.PAYLOAD);
+        
+		// Create a StreamSource with the desired content
+        byte[] bytes = DispatchTestConstants.sampleBodyContent.getBytes();
+        ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
+		Source srcStream = new StreamSource((InputStream) stream);
+
+        TestLogger.logger.debug(">> Invoking One Way Dispatch");
+		dispatch.invokeOneWay(srcStream);
+	}
+}

Added: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/StringDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/StringDispatch.java?rev=633234&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/StringDispatch.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/StringDispatch.java Mon Mar  3 10:47:38 2008
@@ -0,0 +1,384 @@
+/*
+ * 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.jaxws.dispatch;
+
+import java.net.UnknownHostException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.ProtocolException;
+import javax.xml.ws.Response;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceException;
+
+import junit.framework.TestCase;
+import org.apache.axis2.jaxws.TestLogger;
+
+public class StringDispatch extends TestCase {
+
+    /**
+     * Invoke a sync Dispatch<String> in PAYLOAD mode
+     */
+    public void testSyncPayloadMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.PAYLOAD);
+        
+        // Invoke the Dispatch
+        TestLogger.logger.debug(">> Invoking sync Dispatch");
+        String response = dispatch.invoke(DispatchTestConstants.sampleBodyContent);
+
+        assertNotNull("dispatch invoke returned null", response);
+        TestLogger.logger.debug(response);
+        
+        // Check to make sure the content is correct
+        assertTrue(!response.contains("soap"));
+        assertTrue(!response.contains("Envelope"));
+        assertTrue(!response.contains("Body"));
+        assertTrue(response.contains("echoStringResponse"));
+	}
+    
+    /**
+     * Invoke a sync Dispatch<String> in PAYLOAD mode
+     * Server response with exception.  Section 4.3.2
+     * says we should get a ProtocolException, not a
+     * WebServiceException.
+     */
+    public void testSyncPayloadMode_exception() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.PAYLOAD);
+        
+        // Invoke the Dispatch
+        TestLogger.logger.debug(">> Invoking sync Dispatch");
+        Exception e = null;
+        try {
+            // The _bad string passes "THROW EXCEPTION", which causes the echo function on the
+            // server to throw a RuntimeException.  We should get a ProtocolException here on the client
+            String response = dispatch.invoke(DispatchTestConstants.sampleBodyContent_bad);
+        } catch (Exception ex) {
+            e = ex;
+        }
+
+        assertNotNull("No exception received", e);
+        assertTrue("'e' should be of type ProtocolException", e instanceof ProtocolException);
+
+    }
+    
+    /**
+     * Invoke a sync Dispatch<String> in MESSAGE mode
+     */
+    public void testSyncWithMessageMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.MESSAGE);
+        
+        // Invoke the Dispatch
+        TestLogger.logger.debug(">> Invoking sync Dispatch");
+        String response = dispatch.invoke(DispatchTestConstants.sampleSoapMessage);
+
+        assertNotNull("dispatch invoke returned null", response);
+        TestLogger.logger.debug(response);
+        
+        // Check to make sure the content is correct
+        assertTrue(response.contains("soap"));
+        assertTrue(response.contains("Envelope"));
+        assertTrue(response.contains("Body"));
+        assertTrue(response.contains("echoStringResponse"));
+	}
+    
+	/**
+     * Invoke a Dispatch<String> using the async callback API in PAYLOAD mode
+	 */
+    public void testAsyncCallbackPayloadMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.PAYLOAD);
+
+        // Create the callback for async responses
+        AsyncCallback<String> callback = new AsyncCallback<String>();
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch");
+        Future<?> monitor = dispatch.invokeAsync(DispatchTestConstants.sampleBodyContent, callback);
+	        
+        while (!monitor.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
+        }
+        
+        String response = callback.getValue();
+        assertNotNull("dispatch invoke returned null", response);
+        TestLogger.logger.debug(response);
+        
+        // Check to make sure the content is correct
+        assertTrue(!response.contains("soap"));
+        assertTrue(!response.contains("Envelope"));
+        assertTrue(!response.contains("Body"));
+        assertTrue(response.contains("echoStringResponse"));
+	}
+    
+    /**
+     * Invoke a Dispatch<String> using the async callback API in MESSAGE mode
+     */
+    public void testAsyncCallbackMessageMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.MESSAGE);
+
+        // Create the callback for async responses
+        AsyncCallback<String> callback = new AsyncCallback<String>();
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch with Message Mode");
+        Future<?> monitor = dispatch.invokeAsync(DispatchTestConstants.sampleSoapMessage, callback);
+    
+        while (!monitor.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
+        }
+        
+        String response = callback.getValue();
+        assertNotNull("dispatch invoke returned null", response);
+        TestLogger.logger.debug(response);
+        
+        // Check to make sure the content is correct
+        assertTrue(response.contains("soap"));
+        assertTrue(response.contains("Envelope"));
+        assertTrue(response.contains("Body"));
+        assertTrue(response.contains("echoStringResponse"));
+	}
+    
+    /**
+     * Invoke a Dispatch<String> using the async polling API in PAYLOAD mode
+     */
+    public void testAsyncPollingPayloadMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.PAYLOAD);
+
+        TestLogger.logger.debug(">> Invoking async (polling) Dispatch");
+        Response<String> asyncResponse = dispatch.invokeAsync(DispatchTestConstants.sampleBodyContent);
+            
+        while (!asyncResponse.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
+        }
+        
+        String response = asyncResponse.get();
+        assertNotNull("dispatch invoke returned null", response);
+        TestLogger.logger.debug(response);
+        
+        // Check to make sure the content is correct
+        assertTrue(!response.contains("soap"));
+        assertTrue(!response.contains("Envelope"));
+        assertTrue(!response.contains("Body"));
+        assertTrue(response.contains("echoStringResponse"));
+    }
+    
+    /**
+     * Invoke a Dispatch<String> using the async polling API in MESSAGE mode
+     */
+    public void testAsyncPollingMessageMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.MESSAGE);
+
+        TestLogger.logger.debug(">> Invoking async (polling) Dispatch with Message Mode");
+        Response<String> asyncResponse = dispatch.invokeAsync(DispatchTestConstants.sampleSoapMessage);
+    
+        while (!asyncResponse.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
+        }
+        
+        String response = asyncResponse.get();
+        assertNotNull("dispatch invoke returned null", response);
+        TestLogger.logger.debug(response);
+        
+        // Check to make sure the content is correct
+        assertTrue(response.contains("soap"));
+        assertTrue(response.contains("Envelope"));
+        assertTrue(response.contains("Body"));
+        assertTrue(response.contains("echoStringResponse"));
+    }
+	
+    /**
+     * Invoke a Dispatch<String> one-way in PAYLOAD mode 
+     */
+    public void testOneWayPayloadMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.PAYLOAD);
+
+        TestLogger.logger.debug(">> Invoking one-way Dispatch");
+        dispatch.invokeOneWay(DispatchTestConstants.sampleBodyContent);
+    }
+    
+    /**
+     * Invoke a Dispatch<String> one-way in MESSAGE mode 
+	 */
+    public void testOneWayMessageMode() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.MESSAGE);
+
+        TestLogger.logger.debug(">> Invoking one-way Dispatch");
+        dispatch.invokeOneWay(DispatchTestConstants.sampleSoapMessage);
+	}
+    
+    
+    public void testSyncPayloadMode_badHostName() {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.BADURL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.PAYLOAD);
+        
+        // Invoke the Dispatch
+        Throwable ttemp = null;
+        try {
+            TestLogger.logger.debug(">> Invoking sync Dispatch");
+            String response = dispatch.invoke(DispatchTestConstants.sampleBodyContent);
+        } catch (Throwable t) {
+            assertTrue(t instanceof WebServiceException);
+            assertTrue(t.getCause() instanceof UnknownHostException);
+            ttemp = t;
+        }
+        assertNotNull(ttemp);
+
+    }
+    
+    public void testAsyncCallbackMessageMode_badHostName() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.BADURL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.MESSAGE);
+
+        // Create the callback for async responses
+        AsyncCallback<String> callback = new AsyncCallback<String>();
+
+        TestLogger.logger.debug(">> Invoking async (callback) Dispatch with Message Mode");
+        Future<?> monitor = dispatch.invokeAsync(DispatchTestConstants.sampleSoapMessage, callback);
+    
+        while (!monitor.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
+        }
+        
+        if (callback.hasError()) {
+            Throwable t = callback.getError();
+            t.printStackTrace();
+            
+            assertTrue(t.getClass().getName() + " does not match expected type ExecutionException", t instanceof ExecutionException);
+            
+            Throwable cause = t.getCause();
+            assertNotNull("There must be a cause under the ExecutionException", cause);
+            assertTrue(cause.getClass().getName() + " does not match expected type WebServiceException" ,cause instanceof WebServiceException);
+            
+            Throwable hostException = t.getCause().getCause();
+            assertNotNull("There must be a cause under the WebServiceException", hostException);
+            assertTrue(hostException.getClass().getName() + " does not match expected type UnknownHostException", hostException instanceof UnknownHostException);
+        } else {
+            fail("No fault thrown.  Should have retrieved an UnknownHostException from callback");
+        }
+    }
+    
+    public void testAsyncPollingPayloadMode_badHostName() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test: " + getName());
+        
+        // Initialize the JAX-WS client artifacts
+        Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
+        svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.BADURL);
+        Dispatch<String> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, 
+                String.class, Service.Mode.PAYLOAD);
+
+        TestLogger.logger.debug(">> Invoking async (polling) Dispatch");
+        Response<String> asyncResponse = dispatch.invokeAsync(DispatchTestConstants.sampleBodyContent);
+            
+        while (!asyncResponse.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
+        }
+        
+        Throwable ttemp = null;
+        try {
+            asyncResponse.get();
+        } catch (Throwable t) {
+            assertTrue(t instanceof ExecutionException);
+            assertTrue(t.getCause() instanceof WebServiceException);
+            assertTrue(t.getCause().getCause() instanceof UnknownHostException);
+            ttemp = t;
+        }
+        assertNotNull(ttemp);
+    }
+    
+}

Added: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/server/SOAP12Provider.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/server/SOAP12Provider.java?rev=633234&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/server/SOAP12Provider.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/server/SOAP12Provider.java Mon Mar  3 10:47:38 2008
@@ -0,0 +1,48 @@
+/*
+ * 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.jaxws.dispatch.server;
+
+import org.apache.axis2.jaxws.TestLogger;
+
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.http.HTTPBinding;
+import javax.xml.ws.soap.SOAPBinding;
+
+/**
+ * A Provider&lt;String&gt; implementation used to test sending and 
+ * receiving SOAP 1.2 messages.
+ */
+@WebServiceProvider(serviceName="SOAP12ProviderService")
+@BindingType(HTTPBinding.HTTP_BINDING)
+public class SOAP12Provider implements Provider<String> {
+
+    private static final String sampleResponse = 
+        "<test:echoStringResponse xmlns:test=\"http://org/apache/axis2/jaxws/test/SOAP12\">" +
+        "<test:output>SAMPLE REQUEST MESSAGE</test:output>" +
+        "</test:echoStringResponse>";
+    
+    public String invoke(String obj) {
+        TestLogger.logger.debug(">> request received");
+        TestLogger.logger.debug(obj);
+        return sampleResponse;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/endpoint/BasicEndpointTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/endpoint/BasicEndpointTests.java?rev=633234&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/endpoint/BasicEndpointTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/endpoint/BasicEndpointTests.java Mon Mar  3 10:47:38 2008
@@ -0,0 +1,67 @@
+/*
+ * 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.jaxws.endpoint;
+
+import javax.jws.WebService;
+import javax.xml.ws.Binding;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.soap.SOAPBinding;
+
+import junit.framework.TestCase;
+
+public class BasicEndpointTests extends TestCase {
+
+    public void testCreateSimpleEndpoint() {
+        SampleEndpoint sample = new SampleEndpoint();
+        
+        Endpoint ep = Endpoint.create(sample);
+        assertTrue("The returned Endpoint instance was null", ep != null);
+        
+        ep.publish("test");
+        assertTrue("The endpoint was not published successfully", ep.isPublished());
+    }
+    
+    public void testCreateAndPublishEndpoint() {
+        SampleEndpoint sample = new SampleEndpoint();
+
+        Endpoint ep = Endpoint.publish("test" , sample);
+        assertTrue("The returned Endpoint instance was null", ep != null);
+        assertTrue("The endpoint was not published successfully", ep.isPublished());
+    }
+    
+    public void testGetBinding() throws Exception {
+        SampleEndpoint sample = new SampleEndpoint();
+
+        Endpoint ep = Endpoint.create(sample);
+        assertTrue("The returned Endpoint instance was null", ep != null);
+
+        Binding bnd = ep.getBinding();
+        assertTrue("The returned Binding instance was null", bnd != null);
+        assertTrue("The returned Binding instance was of the wrong type (" + bnd.getClass().getName() + "), expected SOAPBinding", 
+                SOAPBinding.class.isAssignableFrom(bnd.getClass()));
+    }
+    
+        @WebService
+    class SampleEndpoint {
+        
+        public int foo(String bar) {
+            return bar.length();
+        }
+    }
+}
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/exception/ExceptionFactoryTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/exception/ExceptionFactoryTests.java?rev=633234&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/exception/ExceptionFactoryTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/exception/ExceptionFactoryTests.java Mon Mar  3 10:47:38 2008
@@ -0,0 +1,96 @@
+/*
+ * 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.jaxws.exception;
+
+import javax.xml.ws.ProtocolException;
+import javax.xml.ws.WebServiceException;
+
+import junit.framework.TestCase;
+import org.apache.axis2.jaxws.ExceptionFactory;
+
+/**
+ * Tests the ExceptionFactory
+ */
+public class ExceptionFactoryTests extends TestCase {
+	private static final String sampleText = "Sample";
+
+    /**
+     * @param name
+     */
+    public ExceptionFactoryTests(String name) {
+        super(name);
+    }
+    
+    /**
+     * @teststrategy Tests creation of a WebServiceException
+     */
+    public void testExceptionFactory00() throws Exception {
+    	try{
+    		throw ExceptionFactory.makeWebServiceException(sampleText);
+    	} catch(WebServiceException e){
+    		assertTrue(sampleText.equals(e.getMessage()));
+    		assertTrue(e.getCause() == null);
+    	}
+    }
+    
+    /**
+     * @teststrategy Tests creation of a WebServiceException from another WebServiceException
+     */
+    public void testExceptionFactory01() throws Exception {
+    	try{
+    		WebServiceException wse = (WebServiceException) ExceptionFactory.makeWebServiceException(sampleText);
+    		throw ExceptionFactory.makeWebServiceException(wse);
+    	} catch(WebServiceException e){
+    		// Should only be a single WebServiceException
+    		assertTrue(sampleText.equals(e.getMessage()));
+    		assertTrue(e.getCause() == null);
+    	}
+    }
+    
+    /**
+     * @teststrategy Tests creation of a WebServiceException->WebServiceException->ProtocolException
+     */
+    public void testExceptionFactory02() throws Exception {
+    	ProtocolException pe = new ProtocolException(sampleText);
+    	try{
+    		WebServiceException wse = (WebServiceException) ExceptionFactory.makeWebServiceException(pe);
+    		throw ExceptionFactory.makeWebServiceException(wse);
+    	} catch(WebServiceException e){
+    		// Should only be a single WebServiceException with a Protocol Exception
+    		assertTrue(sampleText.equals(e.getMessage()));
+    		assertTrue(e.getCause() == null);
+    	}
+    }
+    
+    /**
+     * @teststrategy Tests creation of a WebServiceException->WebServiceException->NullPointerException
+     */
+    public void testExceptionFactory03() throws Exception {
+    	NullPointerException npe = new NullPointerException();
+    	try{
+    		WebServiceException wse = (WebServiceException) ExceptionFactory.makeWebServiceException(npe);
+    		throw ExceptionFactory.makeWebServiceException(wse);
+    	} catch(WebServiceException e){
+    		// Should only be a single WebServiceException with a Protocol Exception
+    		assertTrue(e.getCause() == npe);
+    		assertTrue(e.getCause().getMessage() == null);
+    	}
+    }
+    
+}

Added: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/JAXWSTest.java?rev=633234&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/JAXWSTest.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/JAXWSTest.java Mon Mar  3 10:47:38 2008
@@ -0,0 +1,251 @@
+/*
+ * 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.jaxws.framework;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.axis2.jaxws.addressing.util.EndpointReferenceUtilsTests;
+import org.apache.axis2.jaxws.addressing.util.ReferenceParameterListTests;
+import org.apache.axis2.jaxws.anytype.tests.AnyTypeTests;
+import org.apache.axis2.jaxws.attachments.MTOMSerializationTests;
+import org.apache.axis2.jaxws.client.ClientConfigTests;
+import org.apache.axis2.jaxws.client.DispatchSoapActionTests;
+import org.apache.axis2.jaxws.client.PropertyValueTests;
+import org.apache.axis2.jaxws.client.ProxySoapActionTests;
+import org.apache.axis2.jaxws.core.MessageContextTests;
+import org.apache.axis2.jaxws.databinding.BindingToProtocolTests;
+import org.apache.axis2.jaxws.description.AnnotationDescriptionTests;
+import org.apache.axis2.jaxws.description.GetDescFromBindingProviderTests;
+import org.apache.axis2.jaxws.description.PortSelectionTests;
+import org.apache.axis2.jaxws.description.ServiceTests;
+import org.apache.axis2.jaxws.description.WSDLDescriptionTests;
+import org.apache.axis2.jaxws.description.WSDLTests;
+import org.apache.axis2.jaxws.dispatch.DispatchTestSuite;
+import org.apache.axis2.jaxws.dispatch.SOAP12Dispatch;
+import org.apache.axis2.jaxws.endpoint.BasicEndpointTests;
+import org.apache.axis2.jaxws.exception.ExceptionFactoryTests;
+import org.apache.axis2.jaxws.handler.HandlerChainProcessorTests;
+import org.apache.axis2.jaxws.handler.HandlerPrePostInvokerTests;
+import org.apache.axis2.jaxws.handler.context.CompositeMessageContextTests;
+import org.apache.axis2.jaxws.handler.context.LogicalMessageContextTests;
+import org.apache.axis2.jaxws.handler.context.SOAPMessageContextTests;
+import org.apache.axis2.jaxws.i18n.JaxwsMessageBundleTests;
+import org.apache.axis2.jaxws.injection.ResourceInjectionTests;
+import org.apache.axis2.jaxws.lifecycle.EndpointLifecycleTests;
+import org.apache.axis2.jaxws.message.BlockTests;
+import org.apache.axis2.jaxws.message.FaultTests;
+import org.apache.axis2.jaxws.message.MessagePersistanceTests;
+import org.apache.axis2.jaxws.message.MessageTests;
+import org.apache.axis2.jaxws.message.SAAJConverterTests;
+import org.apache.axis2.jaxws.message.SOAP12Tests;
+import org.apache.axis2.jaxws.misc.JAXBContextTest;
+import org.apache.axis2.jaxws.misc.NS2PkgTest;
+import org.apache.axis2.jaxws.nonanonymous.complextype.NonAnonymousComplexTypeTests;
+import org.apache.axis2.jaxws.polymorphic.shape.tests.PolymorphicTests;
+import org.apache.axis2.jaxws.provider.JAXBProviderTests;
+import org.apache.axis2.jaxws.provider.SOAPFaultProviderTests;
+import org.apache.axis2.jaxws.provider.SoapMessageProviderTests;
+import org.apache.axis2.jaxws.provider.SoapMessageMUProviderTests;
+import org.apache.axis2.jaxws.provider.SourceMessageProviderTests;
+import org.apache.axis2.jaxws.provider.SourceProviderTests;
+import org.apache.axis2.jaxws.provider.StringMessageProviderTests;
+import org.apache.axis2.jaxws.provider.StringProviderTests;
+import org.apache.axis2.jaxws.proxy.GorillaDLWProxyTests;
+import org.apache.axis2.jaxws.proxy.ProxyNonWrappedTests;
+import org.apache.axis2.jaxws.proxy.ProxyTests;
+import org.apache.axis2.jaxws.proxy.RPCLitSWAProxyTests;
+import org.apache.axis2.jaxws.proxy.RPCProxyTests;
+import org.apache.axis2.jaxws.proxy.SOAP12ProxyTests;
+import org.apache.axis2.jaxws.rpclit.enumtype.tests.RPCLitEnumTests;
+import org.apache.axis2.jaxws.rpclit.stringarray.tests.RPCLitStringArrayTests;
+import org.apache.axis2.jaxws.sample.AddNumbersHandlerTests;
+import org.apache.axis2.jaxws.sample.AddNumbersTests;
+import org.apache.axis2.jaxws.sample.AddressBookTests;
+import org.apache.axis2.jaxws.sample.BareTests;
+import org.apache.axis2.jaxws.sample.DLWMinTests;
+import org.apache.axis2.jaxws.sample.DocLitBareMinTests;
+import org.apache.axis2.jaxws.sample.FaultsServiceTests;
+import org.apache.axis2.jaxws.sample.FaultyWebServiceTests;
+import org.apache.axis2.jaxws.sample.MtomSampleByteArrayTests;
+import org.apache.axis2.jaxws.sample.MtomSampleTests;
+import org.apache.axis2.jaxws.sample.NonWrapTests;
+import org.apache.axis2.jaxws.sample.StringListTests;
+import org.apache.axis2.jaxws.sample.WSGenTests;
+import org.apache.axis2.jaxws.sample.WrapTests;
+import org.apache.axis2.jaxws.security.BasicAuthSecurityTests;
+import org.apache.axis2.jaxws.server.JAXWSServerTests;
+import org.apache.axis2.jaxws.spi.BindingProviderTests;
+import org.apache.axis2.jaxws.spi.handler.HandlerResolverTests;
+import org.apache.axis2.jaxws.wsdl.schemareader.SchemaReaderTests;
+import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.datasource.DispatchXMessageDataSource;
+import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.jaxb.DispatchXPayloadJAXB;
+import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.source.DispatchXMessageSource;
+import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.source.DispatchXPayloadSource;
+import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.string.DispatchXMessageString;
+import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.string.DispatchXPayloadString;
+import org.apache.axis2.jaxws.TestLogger;
+import org.apache.log4j.BasicConfigurator;
+
+public class JAXWSTest extends TestCase {
+    
+    static {
+        // Note you will probably need to increase the java heap size, for example
+        // -Xmx512m.  This can be done by setting maven.junit.jvmargs in project.properties.
+        // To change the settings, edit the log4j.property file
+        // in the test-resources directory.
+        BasicConfigurator.configure();
+    }
+    
+    /**
+     * suite
+     * @return
+     */
+    public static Test suite() {
+        TestSuite suite = new TestSuite();
+        
+        
+        // Add each of the test suites
+        suite = DispatchTestSuite.addTestSuites(suite);
+        suite.addTestSuite(SOAP12Dispatch.class);
+        suite.addTestSuite(DispatchSoapActionTests.class);
+        suite.addTestSuite(ProxySoapActionTests.class);
+        suite.addTestSuite(PropertyValueTests.class);
+        suite.addTestSuite(ClientConfigTests.class);
+        
+        suite.addTestSuite(BlockTests.class);
+        suite.addTestSuite(MessageTests.class);
+        suite.addTestSuite(MessagePersistanceTests.class);
+        suite.addTestSuite(MessageContextTests.class);
+        suite.addTestSuite(FaultTests.class);
+        suite.addTestSuite(SAAJConverterTests.class);
+        suite.addTestSuite(SOAP12Tests.class);
+        suite.addTestSuite(MTOMSerializationTests.class);
+        suite.addTestSuite(BindingToProtocolTests.class);
+        
+        // ------ Addressing Tests ------
+        suite.addTestSuite(EndpointReferenceUtilsTests.class);
+        suite.addTestSuite(ReferenceParameterListTests.class);
+        
+        // ------ Metadata Tests ------
+        suite.addTestSuite(WSDLTests.class);
+        suite.addTestSuite(WSDLDescriptionTests.class);
+        suite.addTestSuite(AnnotationDescriptionTests.class);
+        suite.addTestSuite(GetDescFromBindingProviderTests.class);
+        suite.addTestSuite(ServiceTests.class);
+        suite.addTestSuite(PortSelectionTests.class);
+        
+        // ------ Handler Tests ------
+        suite.addTestSuite(LogicalMessageContextTests.class);
+        suite.addTestSuite(SOAPMessageContextTests.class);
+        suite.addTestSuite(HandlerPrePostInvokerTests.class);
+        suite.addTestSuite(CompositeMessageContextTests.class);
+        suite.addTestSuite(HandlerChainProcessorTests.class);
+        suite.addTestSuite(HandlerResolverTests.class);
+        
+        // ------ Message Tests ------
+        suite.addTestSuite(JaxwsMessageBundleTests.class);
+        
+        suite.addTestSuite(StringProviderTests.class);
+        suite.addTestSuite(SOAPFaultProviderTests.class);
+        suite.addTestSuite(StringMessageProviderTests.class);
+        suite.addTestSuite(SourceProviderTests.class);
+        suite.addTestSuite(SourceMessageProviderTests.class);
+        suite.addTestSuite(SoapMessageProviderTests.class);
+        suite.addTestSuite(SoapMessageMUProviderTests.class);
+        suite.addTestSuite(JAXBProviderTests.class);
+        suite.addTestSuite(ProxyTests.class);
+        suite.addTestSuite(ProxyNonWrappedTests.class);
+        suite.addTestSuite(RPCProxyTests.class);
+        suite.addTestSuite(RPCLitSWAProxyTests.class);
+        suite.addTestSuite(GorillaDLWProxyTests.class);
+        suite.addTestSuite(SOAP12ProxyTests.class);
+        suite.addTestSuite(ExceptionFactoryTests.class);
+        suite.addTestSuite(BasicAuthSecurityTests.class);
+
+        suite.addTestSuite(AddressBookTests.class);
+        //suite.addTestSuite(MtomSampleTests.class);
+        
+        // This test fails only on Solaris
+        //suite.addTestSuite(MtomSampleByteArrayTests.class);
+        suite.addTestSuite(BareTests.class);
+        // Intermittent failure, logged bug AXIS2-2605
+        //suite.addTestSuite(DocLitBareMinTests.class);
+        //TODO: FIXME - Was working, now doesn't
+        //suite.addTestSuite(NonWrapTests.class);
+        suite.addTestSuite(WSGenTests.class);
+        suite.addTestSuite(WrapTests.class);
+        suite.addTestSuite(DLWMinTests.class);
+        suite.addTestSuite(NonAnonymousComplexTypeTests.class);
+        suite.addTestSuite(AddNumbersTests.class);
+        suite.addTestSuite(AddNumbersHandlerTests.class);
+        
+        // TODO: This test intermittently fails on Linux and with trace enabled.
+        //suite.addTestSuite(ParallelAsyncTests.class);
+        // TODO: FIXME - Was working, now doesn't
+        //suite.addTestSuite(FaultyWebServiceTests.class);
+        suite.addTestSuite(FaultsServiceTests.class);
+
+        suite.addTestSuite(EndpointLifecycleTests.class);
+        suite.addTestSuite(ResourceInjectionTests.class);
+        suite.addTestSuite(AnyTypeTests.class);
+        suite.addTestSuite(PolymorphicTests.class);
+        suite.addTestSuite(NS2PkgTest.class);
+        suite.addTestSuite(JAXBContextTest.class);
+        
+        suite.addTestSuite(DispatchXPayloadString.class);
+        suite.addTestSuite(DispatchXMessageString.class);
+        suite.addTestSuite(DispatchXPayloadSource.class);
+        suite.addTestSuite(DispatchXMessageSource.class);
+        suite.addTestSuite(DispatchXPayloadJAXB.class);
+        suite.addTestSuite(DispatchXMessageDataSource.class);
+        suite.addTestSuite(SchemaReaderTests.class);
+        suite.addTestSuite(RPCLitEnumTests.class);
+        suite.addTestSuite(BindingProviderTests.class);
+        // Commented due to test failure...
+        /* FAILURE IS:
+         * org.apache.axiom.om.OMException: javax.xml.bind.MarshalException
+         *  - with linked exception:
+         *  [javax.xml.bind.JAXBException: java.util.List is not known to this context]
+         */
+        //suite.addTestSuite(StringListTests.class);
+        suite.addTestSuite(RPCLitStringArrayTests.class);
+        // ------ Endpoint Tests ------
+        suite.addTestSuite(BasicEndpointTests.class);
+        
+        suite.addTestSuite(JAXWSServerTests.class);
+
+        // Start (and stop) the server only once for all the tests
+        TestSetup testSetup = new TestSetup(suite) {
+            public void setUp() {
+                TestLogger.logger.debug("Starting the server.");
+                StartServer startServer = new StartServer("server1");
+                startServer.testStartServer();
+            }
+            public void tearDown() {
+                TestLogger.logger.debug("Stopping the server");
+                StopServer stopServer = new StopServer("server1");
+                stopServer.testStopServer();
+            }
+        };
+        return testSetup;
+    }
+}

Added: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StartServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StartServer.java?rev=633234&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StartServer.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StartServer.java Mon Mar  3 10:47:38 2008
@@ -0,0 +1,35 @@
+/*
+ * 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.jaxws.framework;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.jaxws.utility.SimpleServer;
+
+public class StartServer extends TestCase {
+
+    public StartServer(String name) {
+        super(name);
+    }
+    
+    public void testStartServer() {
+        SimpleServer server = new SimpleServer();
+        server.start();
+    }
+}

Added: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StopServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StopServer.java?rev=633234&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StopServer.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StopServer.java Mon Mar  3 10:47:38 2008
@@ -0,0 +1,35 @@
+/*
+ * 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.jaxws.framework;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.jaxws.utility.SimpleServer;
+
+public class StopServer extends TestCase {
+
+    public StopServer(String name) {
+        super(name);
+    }
+    
+    public void testStopServer() {
+        SimpleServer server = new SimpleServer();
+        server.stop();
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org