You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sc...@apache.org on 2011/01/25 04:38:57 UTC

svn commit: r1063125 - in /tuscany/sca-java-2.x/trunk/modules: binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/ databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/ interface-java-jaxws/src/main/java/org/ap...

Author: scottkurz
Date: Tue Jan 25 03:38:57 2011
New Revision: 1063125

URL: http://svn.apache.org/viewvc?rev=1063125&view=rev
Log:
Fix bare+JAXB wsdlgen case.  Fix Holder+void_return_type case.

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java
    tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java
    tuscany/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java
    tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaOperation.java
    tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
    tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaOperationImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java?rev=1063125&r1=1063124&r2=1063125&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java Tue Jan 25 03:38:57 2011
@@ -23,6 +23,7 @@ import javax.jws.WebMethod;
 import javax.jws.WebService;
 import javax.jws.soap.SOAPBinding;
 import javax.jws.soap.SOAPBinding.ParameterStyle;
+import org.apache.tuscany.sca.binding.ws.other.Other;
 
 import org.oasisopen.sca.annotation.OneWay;
 import org.oasisopen.sca.annotation.Remotable;
@@ -64,4 +65,8 @@ public interface TestJavaInterface {
     @WebMethod
     @SOAPBinding(parameterStyle=ParameterStyle.BARE)
     int m9(String str);
+
+    @WebMethod
+    @SOAPBinding(parameterStyle=ParameterStyle.BARE)
+    Other m10(Other other);
 }

Modified: tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java?rev=1063125&r1=1063124&r2=1063125&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java Tue Jan 25 03:38:57 2011
@@ -92,7 +92,15 @@ public class JAXBDataBinding extends Bas
         if (xmlType == null) {
             return false;
         }
-        dataType.setLogical(xmlType);
+        
+        // If DataType is already an XMLType it might have an element name that we wish to preserve
+        Object logical = dataType.getLogical();
+        if (logical instanceof XMLType) {
+            ((XMLType)logical).setTypeName(xmlType.getTypeName());
+        } else {
+            dataType.setLogical(xmlType);            
+        }
+
         dataType.setDataBinding(NAME);
         return true;
     }

Modified: tuscany/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java?rev=1063125&r1=1063124&r2=1063125&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java Tue Jan 25 03:38:57 2011
@@ -184,16 +184,25 @@ public class JAXWSJavaInterfaceProcessor
                         }
                         operation.getParameterModes().set(i, getParameterMode(param.mode()));
                     }
+                    ParameterMode mode = operation.getParameterModes().get(i);
                 }
+                
+                // 
+                // Note for BARE mapping this will NOT be WS-I compliant, but let's assume this is not the place to 
+                // worry about non-compliance, and keep on going. 
+                //                 
                 WebResult result = method.getAnnotation(WebResult.class);
                 if (result != null) {
                     String ns = getValue(result.targetNamespace(), tns);
                     // Default to <operationName>Response for doc-bare
                     String name = getValue(result.name(), documentStyle ? operationName + "Response" : "return");
                     QName element = new QName(ns, name);
-                    Object logical = operation.getOutputType().getLogical();
-                    if (logical instanceof XMLType) {
-                        ((XMLType)logical).setElementName(element);
+                    if (!operation.hasReturnTypeVoid()) {
+                        List<DataType> outputDataTypes = operation.getOutputType().getLogical();                    
+                        DataType returnDataType = outputDataTypes.get(0);
+                        if (returnDataType instanceof XMLType) {
+                            ((XMLType)returnDataType).setElementName(element);
+                        }
                     }
                 }
                 // FIXME: [rfeng] For the BARE mapping, do we need to create a Wrapper?
@@ -290,8 +299,7 @@ public class JAXWSJavaInterfaceProcessor
                 name = getValue(name, "return");
                 QName element = new QName(ns, name);
 
-                // This must be a check for void? 
-                if ((operation.getOutputType() != null) && (operation.getOutputType().getLogical().size() != 0)) {
+                if (!operation.hasReturnTypeVoid()) {
                     Object logical = operation.getOutputType().getLogical().get(0).getLogical();
                     QName type = null;
                     if (logical instanceof XMLType) {

Modified: tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaOperation.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaOperation.java?rev=1063125&r1=1063124&r2=1063125&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaOperation.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaOperation.java Tue Jan 25 03:38:57 2011
@@ -66,5 +66,17 @@ public interface JavaOperation extends O
      * @return - true if the operation is async server style
      */
     public boolean isAsyncServer();
+    
+    /** 
+     * Indicates whether the underlying Java method has void return type.
+     * @return - true if the Java method has void return type.
+     */
+    public boolean hasReturnTypeVoid();
+    
+    /**
+     * Sets whether the underlying Java method has void return type.
+     * @param flag - "true" marks this operation as having void return type.
+     */
+    public void setReturnTypeVoid(boolean flag);
 
 }

Modified: tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java?rev=1063125&r1=1063124&r2=1063125&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java Tue Jan 25 03:38:57 2011
@@ -77,11 +77,11 @@ public class JavaInterfaceIntrospectorIm
     }
 
     public void introspectInterface(JavaInterface javaInterface, Class<?> clazz) throws InvalidInterfaceException {
-        
+
         if(!loadedVisitors) {
             this.visitors = javaFactory.getInterfaceVisitors();
         }
-        
+
         javaInterface.setJavaClass(clazz);
 
         boolean remotable = clazz.isAnnotationPresent(Remotable.class);
@@ -104,7 +104,7 @@ public class JavaInterfaceIntrospectorIm
                 }
             }
         }
-        
+
         if (remotable) {
             if (javaInterface.isRemotableSet() && javaInterface.isRemotable() == false) {
                 throw new InvalidAnnotationException("[JCA30005] @Remotable annotation present in a interface marked as not remotable in the SCDL", Remotable.class);
@@ -123,11 +123,11 @@ public class JavaInterfaceIntrospectorIm
             callbackClass = callback.value();
             if (remotable && !callbackClass.isAnnotationPresent(Remotable.class)) {
                 throw new InvalidCallbackException("Callback " + callbackClass.getName() + 
-                		" must be remotable on remotable interface " + clazz.getName());
+                                                   " must be remotable on remotable interface " + clazz.getName());
             }
             if (!remotable && callbackClass.isAnnotationPresent(Remotable.class)) {
                 throw new InvalidCallbackException("Callback" + callbackClass.getName() + 
-                		" must not be remotable on local interface " + clazz.getName());
+                                                   " must not be remotable on local interface " + clazz.getName());
             }
         } else if (callback != null && Void.class.equals(callback.value())) {
             throw new InvalidCallbackException("No callback interface specified on callback annotation in " + clazz.getName());
@@ -141,7 +141,7 @@ public class JavaInterfaceIntrospectorIm
         for (JavaInterfaceVisitor extension : visitors) {
             extension.visitInterface(javaInterface);
         } // end for
-        
+
         // Check if any methods have disallowed annotations
         // Check if any private methods have illegal annotations that should be raised as errors
         Set<Method> methods = JavaIntrospectionHelper.getMethods(clazz);
@@ -151,29 +151,29 @@ public class JavaInterfaceIntrospectorIm
     } // end method introspectInterface
 
     private void checkMethodAnnotations(Method method, JavaInterface javaInterface) throws InvalidAnnotationException {
-    	for ( Annotation a : method.getAnnotations() ) {
-    		if( a instanceof Remotable ) {
-				// [JCA90053] @Remotable annotation cannot be on a method that is not a setter method
-    			if( !JavaIntrospectionHelper.isSetter(method) ) {
-    				throw new InvalidAnnotationException("[JCA90053] @Remotable annotation present on an interface method" +
-    						" which is not a Setter method: " + javaInterface.getName() + "/" + method.getName(), Remotable.class);
-    			} // end if
-			} // end if		
-		} // end for
-    	
-    	// Parameter annotations
-    	for (Annotation[] parmAnnotations : method.getParameterAnnotations()) {
-    		for (Annotation annotation : parmAnnotations) {
-				if (annotation instanceof Remotable ) {
-    				throw new InvalidAnnotationException("[JCA90053] @Remotable annotation present on an interface method" +
-    						" parameter: " + javaInterface.getName() + "/" + method.getName(), Remotable.class);
-				} // end if
-			} // end for		
-		} // end for
-    	method.getParameterAnnotations();
-	} // end method checkMethodAnnotations
+        for ( Annotation a : method.getAnnotations() ) {
+            if( a instanceof Remotable ) {
+                // [JCA90053] @Remotable annotation cannot be on a method that is not a setter method
+                if( !JavaIntrospectionHelper.isSetter(method) ) {
+                    throw new InvalidAnnotationException("[JCA90053] @Remotable annotation present on an interface method" +
+                                                         " which is not a Setter method: " + javaInterface.getName() + "/" + method.getName(), Remotable.class);
+                } // end if
+            } // end if		
+        } // end for
 
-	private Class<?>[] getActualTypes(Type[] types, Class<?>[] rawTypes, Map<String, Type> typeBindings) {
+        // Parameter annotations
+        for (Annotation[] parmAnnotations : method.getParameterAnnotations()) {
+            for (Annotation annotation : parmAnnotations) {
+                if (annotation instanceof Remotable ) {
+                    throw new InvalidAnnotationException("[JCA90053] @Remotable annotation present on an interface method" +
+                                                         " parameter: " + javaInterface.getName() + "/" + method.getName(), Remotable.class);
+                } // end if
+            } // end for		
+        } // end for
+        method.getParameterAnnotations();
+    } // end method checkMethodAnnotations
+
+    private Class<?>[] getActualTypes(Type[] types, Class<?>[] rawTypes, Map<String, Type> typeBindings) {
         Class<?>[] actualTypes = new Class<?>[types.length];
         for (int i = 0; i < actualTypes.length; i++) {
             actualTypes[i] = getActualType(types[i], rawTypes[i], typeBindings);
@@ -193,7 +193,7 @@ public class JavaInterfaceIntrospectorIm
     }
 
     @SuppressWarnings("rawtypes")
-	private <T> List<Operation> getOperations(Class<T> clazz,
+    private <T> List<Operation> getOperations(Class<T> clazz,
                                               boolean remotable,
                                               String ns) throws InvalidInterfaceException {
 
@@ -217,7 +217,7 @@ public class JavaInterfaceIntrospectorIm
         List<Operation> operations = new ArrayList<Operation>(methods.length);
         Set<String> names = remotable ? new HashSet<String>() : null;
         for (Method method : methods) {
-        	boolean hasMultipleOutputs = false;
+            boolean hasMultipleOutputs = false;
             if (method.getDeclaringClass() == Object.class) {
                 // Skip the methods on the Object.class
                 continue;
@@ -236,10 +236,10 @@ public class JavaInterfaceIntrospectorIm
             Class<?>[] faultTypes =
                 getActualTypes(method.getGenericExceptionTypes(), method.getExceptionTypes(), typeBindings);
             Class<?>[] allOutputTypes = getOutputTypes(returnType, parameterTypes);
-            
+
             // For async server interfaces, faults are described using the @AsyncFaults annotation
             if( method.isAnnotationPresent(AsyncFault.class) ) {
-            	faultTypes = readAsyncFaultTypes( method );
+                faultTypes = readAsyncFaultTypes( method );
             } // end if 
 
             boolean nonBlocking = method.isAnnotationPresent(OneWay.class);
@@ -258,46 +258,49 @@ public class JavaInterfaceIntrospectorIm
 
             JavaOperation operation = new JavaOperationImpl();
             operation.setName(name);
-            
-            // Set outputType to null for void
-            XMLType xmlReturnType = new XMLType(new QName(ns, "return"), null);
-            DataType<XMLType> returnDataType =
-                returnType == void.class ? null : new DataTypeImpl<XMLType>(UNKNOWN_DATABINDING, returnType, method
-                    .getGenericReturnType(), xmlReturnType);
-            
-            
+
+            XMLType xmlReturnType = new XMLType(new QName(ns, "return"), null);            
+            DataType<XMLType> returnDataType = null;
+            if (returnType == void.class) {
+                operation.setReturnTypeVoid(true);
+            } else {
+                 returnDataType = new DataTypeImpl<XMLType>(UNKNOWN_DATABINDING, returnType, 
+                     method.getGenericReturnType(), xmlReturnType);
+                 operation.setReturnTypeVoid(false);
+            }
+
             // Handle Input Types
-          	List<DataType> paramDataTypes = new ArrayList<DataType>(parameterTypes.length);
-          	List<Type> genericHolderTypes = new ArrayList<Type>();
-          	List<Class<?>> physicalHolderTypes = new ArrayList<Class<?>>();
+            List<DataType> paramDataTypes = new ArrayList<DataType>(parameterTypes.length);
+            List<Type> genericHolderTypes = new ArrayList<Type>();
+            List<Class<?>> physicalHolderTypes = new ArrayList<Class<?>>();
             Type[] genericParamTypes = method.getGenericParameterTypes();
             for (int i = 0; i < parameterTypes.length; i++) {
                 Class<?> paramType = parameterTypes[i];
                 XMLType xmlParamType = new XMLType(new QName(ns, "arg" + i), null);                            
-     
+
                 DataTypeImpl<XMLType> xmlDataType = new DataTypeImpl<XMLType>(
-                		UNKNOWN_DATABINDING, paramType, genericParamTypes[i],xmlParamType);
+                    UNKNOWN_DATABINDING, paramType, genericParamTypes[i],xmlParamType);
                 ParameterMode mode = ParameterMode.IN;
                 // Holder pattern. Physical types of Holder<T> classes are updated to <T> to aid in transformations.
                 if ( Holder.class == paramType) {
-                	hasMultipleOutputs = true;
-                	genericHolderTypes.add(genericParamTypes[i]);
-                	Type firstActual = getFirstActualType( genericParamTypes[ i ] );
-                	if ( firstActual != null ) {
-                		physicalHolderTypes.add((Class<?>)firstActual);
-                		xmlDataType.setPhysical( (Class<?>)firstActual );
-                		mode = ParameterMode.INOUT;
-                	} else {
-                		physicalHolderTypes.add(xmlDataType.getPhysical());
-                	}
+                    hasMultipleOutputs = true;
+                    genericHolderTypes.add(genericParamTypes[i]);
+                    Type firstActual = getFirstActualType( genericParamTypes[ i ] );
+                    if ( firstActual != null ) {
+                        physicalHolderTypes.add((Class<?>)firstActual);
+                        xmlDataType.setPhysical( (Class<?>)firstActual );
+                        mode = ParameterMode.INOUT;
+                    } else {
+                        physicalHolderTypes.add(xmlDataType.getPhysical());
+                    }
                 }
                 paramDataTypes.add( xmlDataType);
                 operation.getParameterModes().add(mode);
             }
-                       
+
             // Get Output Types, but skip over void return type                
             List<DataType> outputDataTypes = new ArrayList<DataType>();
-            if (returnDataType != null) {
+            if (!operation.hasReturnTypeVoid()) {
                 outputDataTypes.add(returnDataType);
             }
 
@@ -314,7 +317,7 @@ public class JavaInterfaceIntrospectorIm
             List<DataType> faultDataTypes = new ArrayList<DataType>(faultTypes.length);
             Type[] genericFaultTypes = method.getGenericExceptionTypes();
             if( method.isAnnotationPresent(AsyncFault.class) ) {
-            	genericFaultTypes = readAsyncGenericFaultTypes( method );
+                genericFaultTypes = readAsyncGenericFaultTypes( method );
             } // end if
             for (int i = 0; i < faultTypes.length; i++) {
                 Class<?> faultType = faultTypes[i];
@@ -326,17 +329,17 @@ public class JavaInterfaceIntrospectorIm
                     DataType<XMLType> faultDataType =
                         new DataTypeImpl<XMLType>(UNKNOWN_DATABINDING, faultType, genericFaultTypes[i], xmlFaultType);
                     faultDataTypes.add(new DataTypeImpl<DataType>(UNKNOWN_DATABINDING, faultType, genericFaultTypes[i],
-                                                                  faultDataType));
+                        faultDataType));
                 }
             }
 
             DataType<List<DataType>> inputType =
                 new DataTypeImpl<List<DataType>>(IDL_INPUT, Object[].class, paramDataTypes);
             DataType<List<DataType>> outputType = 
-            	new DataTypeImpl<List<DataType>>(IDL_OUTPUT, Object[].class, outputDataTypes);
+                new DataTypeImpl<List<DataType>>(IDL_OUTPUT, Object[].class, outputDataTypes);
 
             operation.setOutputType(outputType);
-            	
+
             operation.setInputType(inputType);                     
             operation.setFaultTypes(faultDataTypes);
             operation.setNonBlocking(nonBlocking);
@@ -346,42 +349,42 @@ public class JavaInterfaceIntrospectorIm
         }
         return operations;
     }
-    
 
-	private Class<?>[] getOutputTypes(Class<?> returnType, Class<?>[] parameterTypes) {
-	    
-		ArrayList<Class<?>> returnTypes = new ArrayList<Class<?>>();
-		returnTypes.add(returnType);
-		for ( Class<?> clazz : parameterTypes ) {
-			if ( Holder.class == clazz )
-			    returnTypes.add(clazz);
-		}
-		Class[] arrayType = new Class[0];
-		return returnTypes.toArray(arrayType);
-	}
 
+    private Class<?>[] getOutputTypes(Class<?> returnType, Class<?>[] parameterTypes) {
 
+        ArrayList<Class<?>> returnTypes = new ArrayList<Class<?>>();
+        returnTypes.add(returnType);
+        for ( Class<?> clazz : parameterTypes ) {
+            if ( Holder.class == clazz )
+                returnTypes.add(clazz);
+        }
+        Class[] arrayType = new Class[0];
+        return returnTypes.toArray(arrayType);
+    }
 
-	/**
+
+
+    /**
      * Reads the fault types declared in an @AsyncFault annotation on an async server method
      * @param method - the Method
      * @return - an array of fault/exception classes
      */
     private  Class<?>[] readAsyncFaultTypes( Method method ) {
-    	AsyncFault theFaults = method.getAnnotation(AsyncFault.class);
-    	if ( theFaults == null ) return null;
-    	return theFaults.value();
+        AsyncFault theFaults = method.getAnnotation(AsyncFault.class);
+        if ( theFaults == null ) return null;
+        return theFaults.value();
     } // end method readAsyncFaultTypes
-    
+
     /**
      * Reads the generic fault types declared in an @AsyncFault annotation on an async server method
      * @param method - the Method
      * @return - an array of fault/exception classes
      */
     private  Type[] readAsyncGenericFaultTypes( Method method ) {
-    	AsyncFault theFaults = method.getAnnotation(AsyncFault.class);
-    	if ( theFaults == null ) return null;
-    	return theFaults.value();
+        AsyncFault theFaults = method.getAnnotation(AsyncFault.class);
+        if ( theFaults == null ) return null;
+        return theFaults.value();
     } // end method readAsyncFaultTypes
 
     private boolean jaxwsAsyncMethod(Method method) {
@@ -399,7 +402,7 @@ public class JavaInterfaceIntrospectorIm
         }
         return false;
     }
-    
+
 
     /**
      * Given a Class<T>, returns T, otherwise null.

Modified: tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaOperationImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaOperationImpl.java?rev=1063125&r1=1063124&r2=1063125&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaOperationImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaOperationImpl.java Tue Jan 25 03:38:57 2011
@@ -34,7 +34,8 @@ public class JavaOperationImpl extends O
     private Method method;
     private String action;
     private boolean isAsyncServer = false;
-
+    private boolean hasReturnTypeVoid = false;
+    
     public Method getJavaMethod() {
         return method;
     }
@@ -97,4 +98,14 @@ public class JavaOperationImpl extends O
         return method == null ? "null" : method.toGenericString();
     }
 
+    @Override
+    public boolean hasReturnTypeVoid() {
+        return hasReturnTypeVoid;
+    }
+    
+    @Override
+    public void setReturnTypeVoid(boolean flag) {
+        hasReturnTypeVoid = flag;
+    }
+
 }