You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sc...@apache.org on 2008/03/18 02:29:15 UTC

svn commit: r638163 - in /webservices/axis2/trunk/java/modules: jaxws-integration/ jaxws-integration/test/org/apache/axis2/jaxws/sample/ jaxws-integration/test/org/apache/axis2/jaxws/sample/faults/ jaxws/src/org/apache/axis2/jaxws/runtime/description/m...

Author: scheu
Date: Mon Mar 17 18:29:14 2008
New Revision: 638163

URL: http://svn.apache.org/viewvc?rev=638163&view=rev
Log:
AXIS2-3609
Contributor:Rich Scheuerle
Additional trace and some indentation corrections

Modified:
    webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/FaultyWebServiceTests.java
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/faults/FaultyWebServicePortTypeImpl.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml?rev=638163&r1=638162&r2=638163&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml Mon Mar 17 18:29:14 2008
@@ -1254,8 +1254,8 @@
                         <include>**/NonWrapTests.java</include>
                         <include>**/FaultyWebServiceTests.java</include> 
 
-                        <!--    These tests are currently failing    -->
-                        <!--          <include>**/ParallelAsyncTests.java</include> -->
+                        
+                        <include>**/ParallelAsyncTests.java</include>
                     </includes>
                     <systemProperties>
                         <property>

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/FaultyWebServiceTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/FaultyWebServiceTests.java?rev=638163&r1=638162&r2=638163&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/FaultyWebServiceTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/FaultyWebServiceTests.java Mon Mar 17 18:29:14 2008
@@ -43,49 +43,49 @@
 import java.util.concurrent.Future;
 
 public class FaultyWebServiceTests extends AbstractTestCase {
-	String axisEndpoint = "http://localhost:6060/axis2/services/FaultyWebServiceService.FaultyWebServicePortTypeImplPort";
+    String axisEndpoint = "http://localhost:6060/axis2/services/FaultyWebServiceService.FaultyWebServicePortTypeImplPort";
 
     public static Test suite() {
         return getTestSetup(new TestSuite(FaultyWebServiceTests.class));
     }
-    	
-	
-	
-	public void testFaultyWebService(){
-		FaultyWebServiceFault_Exception exception = null;
-		try{
+
+
+
+    public void testFaultyWebService(){
+        FaultyWebServiceFault_Exception exception = null;
+        try{
             TestLogger.logger.debug("----------------------------------");
             TestLogger.logger.debug("test: " + getName());
-		    FaultyWebServiceService service = new FaultyWebServiceService();
-		    FaultyWebServicePortType proxy = service.getFaultyWebServicePort();
-			BindingProvider p =	(BindingProvider)proxy;
-			p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
-
-			// the invoke will throw an exception, if the test is performed right
-			int total = proxy.faultyWebService(10);
-			
-		}catch(FaultyWebServiceFault_Exception e){
-			exception = e;
-		}catch(Exception e) {
-           e.printStackTrace();
-           fail(e.toString());
+            FaultyWebServiceService service = new FaultyWebServiceService();
+            FaultyWebServicePortType proxy = service.getFaultyWebServicePort();
+            BindingProvider p =	(BindingProvider)proxy;
+            p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
+
+            // the invoke will throw an exception, if the test is performed right
+            int total = proxy.faultyWebService(10);
+
+        }catch(FaultyWebServiceFault_Exception e){
+            exception = e;
+        }catch(Exception e) {
+            e.printStackTrace();
+            fail(e.toString());
         }
 
         TestLogger.logger.debug("----------------------------------");
-		
-		assertNotNull(exception);
-		assertEquals("custom exception", exception.getMessage());
-		assertNotNull(exception.getFaultInfo());
-		assertEquals("bean custom fault info", exception.getFaultInfo().getFaultInfo());
-		assertEquals("bean custom message", exception.getFaultInfo().getMessage());
-		
-	}
-    
+
+        assertNotNull(exception);
+        assertEquals("custom exception", exception.getMessage());
+        assertNotNull(exception.getFaultInfo());
+        assertEquals("bean custom fault info", exception.getFaultInfo().getFaultInfo());
+        assertEquals("bean custom message", exception.getFaultInfo().getMessage());
+
+    }
+
     public void testFaultyWebService_badEndpoint(){
-        
+
         String host = "this.is.a.bad.endpoint.terrible.in.fact";
         String badEndpoint = "http://" + host;
-        
+
         WebServiceException exception = null;
 
         try{
@@ -109,7 +109,7 @@
         }
 
         TestLogger.logger.debug("----------------------------------");
-        
+
         assertNotNull(exception);
         assertTrue(exception.getCause() instanceof UnknownHostException);
         assertEquals(exception.getCause().getMessage(), host);
@@ -119,24 +119,24 @@
     // TODO should also have an invoke oneway bad endpoint test to make sure
     // we get an exception as indicated in JAXWS 6.4.2.
 
-    
+
     public void testFaultyWebService_badEndpoint_oneWay() {
-        
+
         String host = "this.is.a.bad.endpoint.terrible.in.fact";
         String badEndpoint = "http://" + host;
-        
+
         WebServiceException exception = null;
 
         TestLogger.logger.debug("------------------------------");
         TestLogger.logger.debug("Test : " + getName());
         try{
-            
+
             DocLitWrapService service = new DocLitWrapService();
             DocLitWrap proxy = service.getDocLitWrapPort();
             BindingProvider p = (BindingProvider)proxy;
             p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,badEndpoint);
             proxy.oneWayVoid();
-            
+
         }catch(WebServiceException e) {
             exception = e;
         }catch(Exception e) {
@@ -144,15 +144,15 @@
         }
 
         TestLogger.logger.debug("----------------------------------");
-        
+
         assertNotNull(exception);
         assertTrue(exception.getCause() instanceof UnknownHostException);
         assertEquals(exception.getCause().getMessage(), host);
-        
+
     }
-    
+
     public void testFaultyWebService_badEndpoint_AsyncCallback()
-            throws Exception {
+    throws Exception {
 
         String host = "this.is.a.bad.endpoint.terrible.in.fact";
         String badEndpoint = "http://" + host;
@@ -164,7 +164,7 @@
         FaultyWebServicePortType proxy = service.getFaultyWebServicePort();
         BindingProvider p = (BindingProvider) proxy;
         p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
-                badEndpoint);
+                                  badEndpoint);
 
         FaultyAsyncHandler callback = new FaultyAsyncHandler();
         Future<?> future = proxy.faultyWebServiceAsync(1, callback);
@@ -180,17 +180,17 @@
         // an ExecutionException, with a WebServiceException underneath.
         assertNotNull("The exception was null.", e);
         assertTrue("The thrown exception should be an ExecutionException.", e
-                .getClass().equals(ExecutionException.class));
+                   .getClass().equals(ExecutionException.class));
         assertTrue(
-                "The expected fault type under the ExecutionException should be a "
-                        + "SOAPFaultException.  Found type: "
-                        + e.getCause().getClass(), e.getCause().getClass()
-                        .isAssignableFrom(SOAPFaultException.class));
+                   "The expected fault type under the ExecutionException should be a "
+                   + "SOAPFaultException.  Found type: "
+                   + e.getCause().getClass(), e.getCause().getClass()
+                   .isAssignableFrom(SOAPFaultException.class));
 
     }
-    
+
     public void testFaultyWebService_badEndpoint_AsyncPolling()
-            throws Exception {
+    throws Exception {
 
         String host = "this.is.a.bad.endpoint.terrible.in.fact";
         String badEndpoint = "http://" + host;
@@ -202,7 +202,7 @@
         FaultyWebServicePortType proxy = service.getFaultyWebServicePort();
         BindingProvider p = (BindingProvider) proxy;
         p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
-                badEndpoint);
+                                  badEndpoint);
 
         Future<?> future = proxy.faultyWebServiceAsync(1);
         while (!future.isDone()) {
@@ -216,32 +216,32 @@
         } catch (Exception ex) {
             e = ex;
         }
-        
+
         // Section 4.3.3 states that the top level Exception should be
         // an ExecutionException, with a WebServiceException underneath.
         assertNotNull("The exception was null.", e);
         assertTrue("The thrown exception should be an ExecutionException.", e
-                .getClass().equals(ExecutionException.class));
+                   .getClass().equals(ExecutionException.class));
         assertTrue(
-                "The expected fault type under the ExecutionException should be a "
-                        + "SOAPFaultException.  Found type: "
-                        + e.getCause().getClass(), e.getCause().getClass()
-                        .isAssignableFrom(SOAPFaultException.class));
+                   "The expected fault type under the ExecutionException should be a "
+                   + "SOAPFaultException.  Found type: "
+                   + e.getCause().getClass(), e.getCause().getClass()
+                   .isAssignableFrom(SOAPFaultException.class));
 
     }
-    
+
     /*
      * Tests fault processing for user defined fault types
      */      
     public void testCustomFault_AsyncCallback() throws Exception {
         TestLogger.logger.debug("------------------------------");
         TestLogger.logger.debug("test: " + getName());
-        
+
         FaultyWebServiceService service = new FaultyWebServiceService();
         FaultyWebServicePortType proxy = service.getFaultyWebServicePort();
         BindingProvider p = (BindingProvider) proxy;
         p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
-        
+
         FaultyAsyncHandler callback = new FaultyAsyncHandler();
         Future<?> future = proxy.faultyWebServiceAsync(1, callback);
 
@@ -249,18 +249,18 @@
             Thread.sleep(1000);
             TestLogger.logger.debug("Async invocation incomplete");
         }
-        
+
         Exception e = callback.getException();
         e.printStackTrace();
-        
+
         // Section 4.3.3 states that the top level Exception should be
         // an ExecutionException, with a WebServiceException underneath.
         assertNotNull("The exception was null.", e);
         assertTrue("The thrown exception should be an ExecutionException.", 
-                e.getClass().equals(ExecutionException.class));
+                   e.getClass().equals(ExecutionException.class));
         assertTrue("The expected fault type under the ExecutionException should be a " +
-                "FaultyWebServiceFault_Exception.  Found type: " + e.getCause().getClass(), 
-                e.getCause().getClass().isAssignableFrom(FaultyWebServiceFault_Exception.class));
+                   "FaultyWebServiceFault_Exception.  Found type: " + e.getCause().getClass(), 
+                   e.getCause().getClass().isAssignableFrom(FaultyWebServiceFault_Exception.class));
     }
 
 
@@ -268,9 +268,9 @@
      * A callback implementation that can be used to collect the exceptions
      */
     class FaultyAsyncHandler implements AsyncHandler<FaultyWebServiceResponse> {
-     
+
         Exception exception;
-        
+
         public void handleResponse(Response<FaultyWebServiceResponse> response) {
             try {
                 TestLogger.logger.debug("FaultyAsyncHandler.handleResponse() was called");
@@ -282,10 +282,10 @@
                 exception = e;
             }
         }
-        
+
         public Exception getException() {
             return exception;
         }
     }
-    
+
 }

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/faults/FaultyWebServicePortTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/faults/FaultyWebServicePortTypeImpl.java?rev=638163&r1=638162&r2=638163&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/faults/FaultyWebServicePortTypeImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/faults/FaultyWebServicePortTypeImpl.java Mon Mar 17 18:29:14 2008
@@ -32,29 +32,28 @@
 
 @WebService(serviceName="FaultyWebServiceService",
 			endpointInterface="org.apache.axis2.jaxws.sample.faults.FaultyWebServicePortType")
-public class FaultyWebServicePortTypeImpl {
+			public class FaultyWebServicePortTypeImpl {
 
-	/* (non-Javadoc)
-	 * @see org.apache.axis2.jaxws.sample.faults.FaultyWebServicePortType#faultyWebService(int)
-	 */
-	public int faultyWebService(int arg0) throws FaultyWebServiceFault_Exception {
-		
-		FaultyWebServiceFault bean = new FaultyWebServiceFault();
-		bean.setFaultInfo("bean custom fault info");
-		bean.setMessage("bean custom message");
-		
-		throw new FaultyWebServiceFault_Exception("custom exception", bean);
-	}
-	
-    public Future<?> faultyWebServiceAsync(
-            int arg0,
-            AsyncHandler<FaultyWebServiceResponse> asyncHandler) {
-        	return null;
-        }
+    /* (non-Javadoc)
+     * @see org.apache.axis2.jaxws.sample.faults.FaultyWebServicePortType#faultyWebService(int)
+     */
+    public int faultyWebService(int arg0) throws FaultyWebServiceFault_Exception {
+
+        FaultyWebServiceFault bean = new FaultyWebServiceFault();
+        bean.setFaultInfo("bean custom fault info");
+        bean.setMessage("bean custom message");
+
+        throw new FaultyWebServiceFault_Exception("custom exception", bean);
+    }
+
+    public Future<?> faultyWebServiceAsync(int arg0,
+                                           AsyncHandler<FaultyWebServiceResponse> asyncHandler) {
+        return null;
+    }
 
 
     public Response<FaultyWebServiceResponse> faultyWebServiceAsync(int arg0) {
-    	return null;
+        return null;
     }
 
 

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java?rev=638163&r1=638162&r2=638163&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java Mon Mar 17 18:29:14 2008
@@ -97,6 +97,7 @@
     private static void getAnnotationDescs(EndpointInterfaceDescription endpointInterfaceDesc,
                                            ArtifactProcessor ap,
                                            Map<String, AnnotationDesc> map) {
+        // Don't dig into the async operations
         OperationDescription[] opDescs = endpointInterfaceDesc.getDispatchableOperations();
 
         // Build a set of packages from all of the opertions

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?rev=638163&r1=638162&r2=638163&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java Mon Mar 17 18:29:14 2008
@@ -1746,6 +1746,11 @@
             answer = (returnTypeName.contains(Response.class.getName()) ||
                     returnTypeName.contains(Future.class.getName()));
         }
+        if (log.isDebugEnabled()) {
+            log.debug("Method = " + methodName);
+            log.debug("Return Type = " + returnTypeName);
+            log.debug("Is client async = " + answer);
+        }
         return answer;
     }
 



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