You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/03/13 19:35:20 UTC

svn commit: r753338 - in /cxf/trunk: maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/

Author: dkulp
Date: Fri Mar 13 18:35:12 2009
New Revision: 753338

URL: http://svn.apache.org/viewvc?rev=753338&view=rev
Log:
[CXF-2112] Fix from Alessio Soldano applied

Modified:
    cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
    cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java?rev=753338&r1=753337&r2=753338&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java (original)
+++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java Fri Mar 13 18:35:12 2009
@@ -32,24 +32,105 @@
      */
     private static final String DEFAULT_WSDL_LOCATION = "DEFAULTWSDLLOCATION - WORKAROUND";
 
+    /**
+     * 
+     */
     protected List<String> packagenames;
+	
+    /**
+     * Extra arguments to pass to the command-line code generator. For compatibility as well as to 
+     * specify any extra flags not addressed by other parameters
+     */
     protected List<String> extraargs = new ArrayList<String>();
+	
+    /**
+     * Directory where generated java classes will be created. Defaults to plugin 'sourceRoot' parameter
+     */
     protected File outputDir;
+	
+    /**
+     * Ignore the specified WSDL schema namespace when generating code.
+     * Also, optionally specifies the Java package name used by types described in the excluded namespace(s) using
+     * schema-namespace[=java-packagename]
+     */
     List<String> namespaceExcludes;
+	
+    /**
+     * Enables or disables the loading of the default excludes namespace mapping. Default is true.
+     */
     Boolean defaultExcludesNamespace;
+	
+    /**
+     * Enables or disables the loading of the default namespace package name mapping. Default is true and 
+     * <a href=""http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing=org.apache.cxf.ws.addressingnamespace</a> 
+     * package mapping will be enabled.	 
+     */
     Boolean defaultNamespacePackageMapping;
+	
+    /**
+     * A set of dependent files used to detect the generator must process WSDL, even if generator marker files are up to date.
+     */
     File dependencies[];
+	
+    /**
+     * Redundant directories to be deleted after code generation
+     */
     File redundantDirs[];
+	
+    /**
+     * Specifies JAXWS or JAXB binding files. Use spaces to separate multiple entries.
+     */
     String bindingFiles[] = new String[0];
+	
+    /**
+     * Specifies the value of the @WebServiceClient annotation's wsdlLocation property. 
+     */
     String wsdlLocation = DEFAULT_WSDL_LOCATION;
+	
+    /**
+     * Specifies the frontend. Default is JAXWS. Currently supports only JAXWS frontend.
+     */
     String frontEnd;
+	
+    /**
+     * Specifies the databinding. Default is JAXB. Currently supports only JAXB databinding.
+     */
     String dataBinding;
+	
+    /**
+     * Specifies the wsdl version .Default is WSDL1.1. Currently suppports only WSDL1.1 version.
+     */
     String wsdlVersion;
+	
+    /**
+     * Specify catalog file to map the imported wsdl/schema
+     */
     String catalog;
+	
+    /**
+     * Enables or disables processing of implicit SOAP headers (i.e. SOAP headers defined in the 
+     * wsdl:binding but not wsdl:portType section.) Default is false.
+     */
     boolean extendedSoapHeaders;
+	
+    /**
+     * Enables validating the WSDL before generating the code. 
+     */
     boolean validateWsdl;
+	
+    /**
+     * The WSDL service name to use for the generated code
+     */
     String serviceName;
+	
+    /**
+     * Automatically resolve naming conflicts without requiring the use of binding customizations
+     */
     boolean autoNameResolution;
+	
+    /**
+     * Disable generation of service address binding in the generated Java classes
+     */
     boolean noAddressBinding;
 
 

Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java?rev=753338&r1=753337&r2=753338&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java (original)
+++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java Fri Mar 13 18:35:12 2009
@@ -21,7 +21,12 @@
 
 
 public class WsdlOption extends Option {
+
+    /**
+     * The WSDL file to process.
+     */
     String wsdl;
+	
     public String getWsdl() {
         return wsdl;
     }

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=753338&r1=753337&r2=753338&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Fri Mar 13 18:35:12 2009
@@ -371,7 +371,7 @@
 
         getDataBinding().initialize(service);
 
-        boolean isWrapped = isWrapped();
+        boolean isWrapped = isWrapped() || hasWrappedMethods(serviceInfo.getInterface());
         if (isWrapped) {
             initializeWrappedSchema(serviceInfo);
         }
@@ -409,6 +409,14 @@
             }
         }
     }
+    public boolean hasWrappedMethods(InterfaceInfo interfaceInfo) {
+        for (OperationInfo opInfo : interfaceInfo.getOperations()) {
+            if (opInfo.isUnwrappedCapable()) {
+                return true;
+            }
+        }
+        return false;
+    }
 
     protected boolean isFromWsdl() {
         return !populateFromClass && getWsdlURL() != null;