cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r529517 - in /incubator/cxf/trunk/rt: core/src/main/java/org/apache/cxf/wsdl11/ frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ frontend/simple/src/main/java/org/apache/c...
Date Tue, 17 Apr 2007 07:24:46 GMT
Author: ema
Date: Tue Apr 17 00:24:34 2007
New Revision: 529517

URL: http://svn.apache.org/viewvc?view=rev&rev=529517
Log:
Fixed issue CXF-533 : removed the response message from one way operation

Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBeanTest.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java?view=diff&rev=529517&r1=529516&r2=529517
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
Tue Apr 17 00:24:34 2007
@@ -291,12 +291,14 @@
                 input.setMessage(message);
                 operation.setInput(input);
                 
-                Output output = definition.createOutput();
-                output.setName(operationInfo.getOutputName());
-                message = definition.createMessage();
-                buildMessage(message, operationInfo.getOutput());
-                output.setMessage(message);
-                operation.setOutput(output);
+                if (operationInfo.getOutput() != null) {
+                    Output output = definition.createOutput();
+                    output.setName(operationInfo.getOutputName());
+                    message = definition.createMessage();
+                    buildMessage(message, operationInfo.getOutput());
+                    output.setMessage(message);
+                    operation.setOutput(output);
+                }
                 //loop to add fault
                 Collection<FaultInfo> faults = operationInfo.getFaults();
                 Fault fault = null;

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?view=diff&rev=529517&r1=529516&r2=529517
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Tue Apr 17 00:24:34 2007
@@ -23,6 +23,7 @@
 import java.lang.reflect.Method;
 import java.util.concurrent.Future;
 
+import javax.jws.Oneway;
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
 import javax.jws.WebParam.Mode;
@@ -503,15 +504,11 @@
         return Boolean.FALSE;
     }
     
-   /* 
+    
     @Override 
     public Boolean hasOutMessage(Method method) {
-        Annotation anno = method.getAnnotation(Oneway.class);
-        if (anno != null) {
-            return Boolean.FALSE;
-        }
-        return Boolean.TRUE;
+        return !method.isAnnotationPresent(Oneway.class);
     }
-    */
+    
     
 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBeanTest.java?view=diff&rev=529517&r1=529516&r2=529517
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBeanTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBeanTest.java
Tue Apr 17 00:24:34 2007
@@ -183,13 +183,11 @@
         OperationInfo greetMeOneWayOp = si.getInterface().getOperation(new QName(ns, "greetMeOneWay"));
         assertEquals(1, greetMeOneWayOp.getInput().getMessageParts().size());
         
-        
         //FIXME: CXF-533        
         //Collection<SchemaInfo> schemas = si.getSchemas();
         //assertEquals(2, schemas.size());
         
-        //FIXME: CXF-533
-        //assertEquals(0, greetMeOneWayOp.getOutput().getMessageParts().size());
+        assertNull(greetMeOneWayOp.getOutput());
     }
 
 }

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java?view=diff&rev=529517&r1=529516&r2=529517
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
Tue Apr 17 00:24:34 2007
@@ -152,6 +152,9 @@
 
     @Override
     public Boolean hasOutMessage(Method m) {
+        if (m.getReturnType().getClass().equals(void.class) && m.getExceptionTypes().length
== 0) {
+            return false;
+        }
         return true;
     }
 

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?view=diff&rev=529517&r1=529516&r2=529517
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Tue Apr 17 00:24:34 2007
@@ -466,10 +466,10 @@
         
         if (hasOutMessage(method)) {
             // Setup the output message
-            MessageInfo  outMsg = op.createMessage(createOutputMessageName(op, method));
+            MessageInfo outMsg = op.createMessage(createOutputMessageName(op, method));
             op.setOutput(outMsg.getName().getLocalPart(), outMsg);
             final Class<?> returnType = method.getReturnType();
-            if (!returnType.isAssignableFrom(void.class)) {
+            if (!returnType.isAssignableFrom(void.class)) {              
                 final QName q = getOutPartName(op, method, -1); 
                 QName q2 = getOutParameterName(op, method, -1);
                 MessagePartInfo part = outMsg.addMessagePart(q);



Mime
View raw message