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 aj...@apache.org on 2006/07/06 17:08:39 UTC

svn commit: r419574 - in /webservices/axis2/trunk/java/modules: adb-codegen/src/org/apache/axis2/schema/template/ codegen/src/org/apache/axis2/wsdl/codegen/ codegen/src/org/apache/axis2/wsdl/codegen/extension/ codegen/src/org/apache/axis2/wsdl/util/

Author: ajith
Date: Thu Jul  6 08:08:38 2006
New Revision: 419574

URL: http://svn.apache.org/viewvc?rev=419574&view=rev
Log:
1. Fixed a minor error in the ADBDatabindingTemplate.xsl where a  parenthesis was missing.
2. Added a new parameter to enable unwrapping
   I. Added a temporary check in SchemaUnwrapperExtension.java to throw an exception in the case of other databindings (Note - this is TEMPORARY. will be removed soon)


Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/CommandLineOptionConstants.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl?rev=419574&r1=419573&r2=419574&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl Thu Jul  6 08:08:38 2006
@@ -51,7 +51,7 @@
                             </xsl:when>
                             <xsl:otherwise>
                                 elt.addChild(param.getOMElement(param.MY_QNAME,
-                                org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+                                org.apache.axiom.om.OMAbstractFactory.getOMFactory()));
                             </xsl:otherwise>
                         </xsl:choose>
                         wrapperElt.appendChild(elt);

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java?rev=419574&r1=419573&r2=419574&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java Thu Jul  6 08:08:38 2006
@@ -155,6 +155,14 @@
             }
         }
 
+         commandLineOption =
+                loadOption(WSDL2JavaConstants.UNWRAP_PARAMETERS,
+                        WSDL2JavaConstants.UNWRAP_PARAMETERS_LONG,
+                        optionMap);
+          if (commandLineOption!=null){
+              config.setParametersWrapped(false);
+          }
+
         commandLineOption =
                 loadOption(WSDL2JavaConstants.WSDL_VERSION_OPTION,
                         WSDL2JavaConstants.WSDL_VERSION_OPTION_LONG,

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java?rev=419574&r1=419573&r2=419574&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java Thu Jul  6 08:08:38 2006
@@ -53,6 +53,15 @@
      */
     public void engage(CodeGenConfiguration configuration) throws CodeGenerationException {
         if (!configuration.isParametersWrapped()){
+
+            ///////////////////////////////////////////////////////////////
+            // A temp check to avoid nasty surprises - Since unwrapping is
+            // supported only for ADB yet
+            if (!"adb".equals(configuration.getDatabindingType())){
+                throw new CodeGenerationException("Unsupported databinding framework for unwrapping!");
+            }
+            ///////////////////////////////////////////////////////////////
+            
             //walk the schema and find the top level elements
             AxisService axisService = configuration.getAxisService();
 

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/CommandLineOptionConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/CommandLineOptionConstants.java?rev=419574&r1=419573&r2=419574&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/CommandLineOptionConstants.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/CommandLineOptionConstants.java Thu Jul  6 08:08:38 2006
@@ -41,6 +41,7 @@
         String EXTERNAL_MAPPING_OPTION = "em";
         String WSDL_VERSION_OPTION = "wv";
         String FLATTEN_FILES_OPTION = "f";
+        String UNWRAP_PARAMETERS = "uw";
 
         
         //long option constants
@@ -65,6 +66,7 @@
         String EXTERNAL_MAPPING_OPTION_LONG = "external-mapping";
         String WSDL_VERSION_OPTION_LONG = "wsdl-version";
         String FLATTEN_FILES_OPTION_LONG = "flatten-filess";
+        String UNWRAP_PARAMETERS_LONG = "unwrap-params";
 
         String WSDL_VERSION_2 = "2.0";
         String WSDL_VERSION_2_OPTIONAL = "2";

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java?rev=419574&r1=419573&r2=419574&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java Thu Jul  6 08:08:38 2006
@@ -46,6 +46,7 @@
                     (WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION).equalsIgnoreCase(optionType) ||
                     (WSDL2JavaConstants.WSDL_VERSION_OPTION).equalsIgnoreCase(optionType) ||
                     (WSDL2JavaConstants.FLATTEN_FILES_OPTION).equalsIgnoreCase(optionType) ||
+                    (WSDL2JavaConstants.UNWRAP_PARAMETERS).equalsIgnoreCase(optionType) ||
 
                     (WSDL2JavaConstants.OUTPUT_LOCATION_OPTION_LONG).equalsIgnoreCase(optionType) ||
                     (WSDL2JavaConstants.SERVER_SIDE_CODE_OPTION_LONG).equalsIgnoreCase(optionType) ||
@@ -65,6 +66,7 @@
                     (WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION_LONG).equalsIgnoreCase(optionType) ||
                     (WSDL2JavaConstants.WSDL_VERSION_OPTION_LONG).equalsIgnoreCase(optionType) ||
                     (WSDL2JavaConstants.FLATTEN_FILES_OPTION_LONG).equalsIgnoreCase(optionType) ||
+                    (WSDL2JavaConstants.UNWRAP_PARAMETERS_LONG).equalsIgnoreCase(optionType) ||
                     (WSDL2JavaConstants.REPOSITORY_PATH_OPTION_LONG).equalsIgnoreCase(optionType)
             );
 



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