Author: scheu
Date: Tue May 11 18:45:41 2010
New Revision: 943225

URL: http://svn.apache.org/viewvc?rev=943225&view=rev
Log:
AXIS2-4710
Contributor: Rich Scheuerle
Remove rpc/lit checking from doc/lit flow.  Also added a unit test.

Modified:
    
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
    
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java
    
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMinimalMethodMarshaller.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/DLWMinTests.java?rev=943225&r1=943224&r2=943225&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
 Tue May 11 18:45:41 2010
@@ -100,6 +100,25 @@ public class DLWMinTests extends Abstrac
     }
     
     /**
+     * Test simple greetMe method 
+     * with style doc/lit wrapped without the presence of wrapper classes.
+     * Passing a null input and receiving a null return
+     */
+    public void testGreetMe_Null() {
+        
+        
+        Greeter proxy = getProxy("greetMe");
+        
+        String me = null;
+        String response = proxy.greetMe(me);
+        assertTrue("Expected null but received " + response, response == null);
+        
+        // Try the call again
+        response = proxy.greetMe(me);
+        assertTrue("Expected null but received " + response, response == null);
+    }
+    
+    /**
      * Test simple greetMe method with dispatch 
      * with style doc/lit wrapped without the presence of wrapper classes.
      */

Modified: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java?rev=943225&r1=943224&r2=943225&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java
 Tue May 11 18:45:41 2010
@@ -35,7 +35,11 @@ import javax.xml.ws.WebServiceException;
 public class GreeterImpl implements Greeter {
 
     public String greetMe(String me) {
-        return "Hello " + me;
+        if (me == null) {
+            return null;
+        } else {
+            return "Hello " + me;
+        }
     }
 
     public String testUnqualified(String in) {

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMinimalMethodMarshaller.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMinimalMethodMarshaller.java?rev=943225&r1=943224&r2=943225&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMinimalMethodMarshaller.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMinimalMethodMarshaller.java
 Tue May 11 18:45:41 2010
@@ -61,7 +61,6 @@ import java.util.Map;
 import java.util.TreeSet;
 
 /**
- * The Doc/Lit Wrapped Minimal Marshaller is used when 
  *   1) The web service is Doc/Lit Wrapped, and 
  *   2) The wrapper and fault bean objects are missing (hence the term 
'Minimal')
  *   
@@ -341,16 +340,6 @@ public class DocLitWrappedMinimalMethodM
             }
 
             if (returnType != void.class) {
-
-                // TODO should we allow null if the return is a header?
-                //Validate input parameters for operation and make sure no 
input parameters are null.
-                //As per JAXWS Specification section 3.6.2.3 if a null value 
is passes as an argument 
-                //to a method then an implementation MUST throw 
WebServiceException.
-                if (returnObject == null) {
-                    throw ExceptionFactory.makeWebServiceException(
-                                       
Messages.getMessage("NullParamErr3",operationDesc.getJavaMethodName()));
-
-                }
                 Element returnElement = null;
                 QName returnQName = new QName(returnNS, returnLocalPart);
                 if (representAsOccurrence(returnObject)) {
@@ -584,14 +573,6 @@ public class DocLitWrappedMinimalMethodM
 
                 }
                 returnValue = returnElement.getTypeValue();
-                // TODO should we allow null if the return is a header?
-                //Validate input parameters for operation and make sure no 
input parameters are null.
-                //As per JAXWS Specification section 3.6.2.3 if a null value 
is passes as an argument 
-                //to a method then an implementation MUST throw 
WebServiceException.
-                if (returnValue == null) {
-                       throw ExceptionFactory.makeWebServiceException(
-                                       
Messages.getMessage("NullParamErr3",operationDesc.getJavaMethodName()));
-                }
             }
 
             // We want to use "by Java Type" unmarshalling for 


Reply via email to