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 2005/12/28 06:59:16 UTC

svn commit: r359407 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/schema/ codegen/src/org/apache/axis2/schema/template/ codegen/src/org/apache/axis2/schema/writer/ codegen/src/org/apache/axis2/wsdl/codegen/ codegen/src/org/ap...

Author: ajith
Date: Tue Dec 27 21:58:51 2005
New Revision: 359407

URL: http://svn.apache.org/viewcvs?rev=359407&view=rev
Log:
1. Fixed a small mistake in the Constants.java (hardcoded path)
2. Added parameter passing capability for the extensions. If the parameter is prefixed by -E then it'll be available for the extensions.
3. Fixed the client emiitter to properly add the class name prefixes if the classes are wrapped.
4. Added parameters to control global wrapping of classes
5. Updated the server side code generation to have wrapping of databinding classes.


Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaConstants.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CommandLineOption.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CommandLineOptionConstants.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SimpleDBExtension.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaConstants.java?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaConstants.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaConstants.java Tue Dec 27 21:58:51 2005
@@ -93,5 +93,12 @@
         public static final String BEAN_WRITER_TYPEMAP_KEY = "schema.bean.typemap";
     }
 
+     public static class SchemaCompilerArguments{
 
+        public static final String WRAP_SCHEMA_CLASSES = "w";
+        public static final String WRITE_SCHEMA_CLASSES = "r";
+
+        public static final String STYLE = "s";
+
+    }
 }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl Tue Dec 27 21:58:51 2005
@@ -33,7 +33,7 @@
         <!-- write the class header. this should be done only when unwrapped -->
         <xsl:variable name="name"><xsl:value-of select="@name"/></xsl:variable>
 
-        <xsl:if test="@unwrapped">
+        <xsl:if test="not(@skip-write)">
             /**
             * <xsl:value-of select="$name"/>.java
             *
@@ -46,7 +46,7 @@
             *  <xsl:value-of select="$name"/> bean class
             */
         </xsl:if>
-        public <xsl:if test="not(@unwrapped)">static</xsl:if> class <xsl:value-of select="$name"/> <xsl:if test="@extension"> extends <xsl:value-of select="@extension"/></xsl:if>
+        public <xsl:if test="not(@unwrapped) or (@skip-write)">static</xsl:if> class <xsl:value-of select="$name"/> <xsl:if test="@extension"> extends <xsl:value-of select="@extension"/></xsl:if>
         implements org.apache.axis2.databinding.ADBBean{
         <xsl:choose>
             <xsl:when test="@type">/* This type was generated from the piece of schema that had

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java Tue Dec 27 21:58:51 2005
@@ -237,7 +237,7 @@
         String originalName = qName.getLocalPart();
         String className = getNonConflictingName(this.namesList, originalName);
 
-        String packagePrefix;
+        String packagePrefix = null;
 
         String fullyqualifiedClassName;
         ArrayList propertyNames = new ArrayList();
@@ -265,16 +265,21 @@
                 File out = createOutFile(packageName, className);
                 //parse with the template and create the files
                 parse(model, out);
+
+                packagePrefix = packageName ;
             }
 
             //add the model to the model map
             modelMap.put(qName,model);
 
-            packagePrefix = packageName ;
-        }
 
-        fullyqualifiedClassName = packagePrefix + (packagePrefix.endsWith(".")?"":".") + className;
+        }
 
+        if (packagePrefix!=null){
+            fullyqualifiedClassName = packagePrefix + (packagePrefix.endsWith(".")?"":".") + className;
+        }else{
+            fullyqualifiedClassName = className;
+        }
         //return the fully qualified class name
         return fullyqualifiedClassName;
 
@@ -311,6 +316,10 @@
             XSLTUtils.addAttribute(model, "unwrapped", "yes", rootElt);
         }
 
+        if (!writeClasses){
+            XSLTUtils.addAttribute(model, "skip-write", "yes", rootElt);
+        }
+
         if (!isElement) {
             XSLTUtils.addAttribute(model, "type", "yes", rootElt);
         }
@@ -406,6 +415,9 @@
 
     /**
      * gets a non conflicting java name
+     * the comparison with existing classnames need to be
+     * case insensitive, since certain file systems (specifaically
+     * the windows file system) has case insensitive file names)
      *
      * @param listOfNames
      * @param nameBase
@@ -416,11 +428,11 @@
         if (JavaUtils.isJavaKeyword(nameToReturn)) {
             nameToReturn = JavaUtils.makeNonJavaKeyword(nameToReturn);
         }
-        while (listOfNames.contains(nameToReturn)) {
+        while (listOfNames.contains(nameToReturn.toLowerCase())) {
             nameToReturn = nameToReturn + count++;
         }
 
-        listOfNames.add(nameToReturn);
+        listOfNames.add(nameToReturn.toLowerCase());
         return nameToReturn;
     }
 

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java Tue Dec 27 21:58:51 2005
@@ -23,6 +23,7 @@
 import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Iterator;
 
 public class CodeGenConfiguration implements CommandLineOptionConstants {
 
@@ -43,7 +44,12 @@
     private boolean writeTestCase = false;
     private boolean writeMessageReceiver = true;
     private String packageName = XSLTConstants.DEFAULT_PACKAGE_NAME;
-    private boolean wrapClasses = false;
+
+    // Default wrap classes is true, which means the classes generated
+    // by default are wrapped. The effect of this setting will be controlled
+    // to some extent, by the other settings as well.
+
+    private boolean wrapClasses = true;
 
     private boolean generateAll = false;
 
@@ -260,10 +266,10 @@
             setDatabindingType(dataBindingOption.getOptionValue());
         }
 
-        CommandLineOption wrapClassesOption = (CommandLineOption) optionMap.get(
-                WRAP_CLASSES_OPTION);
-        if (wrapClassesOption != null) {
-            wrapClasses = true;
+        CommandLineOption unwrapClassesOption = (CommandLineOption) optionMap.get(
+                UNWRAP_CLASSES_OPTION);
+        if (unwrapClassesOption != null) {
+            wrapClasses = false;
         }
 
         CommandLineOption generateAllOption = (CommandLineOption) optionMap.get(
@@ -271,6 +277,19 @@
         if (generateAllOption != null) {
             generateAll = true;
         }
+
+        //loop through the map and find parameters having the extra prefix.
+        //put them in the property map
+        Iterator keyIterator = optionMap.keySet().iterator();
+        while (keyIterator.hasNext()) {
+            Object key = keyIterator.next();
+            CommandLineOption option =  (CommandLineOption)optionMap.get(key);
+            if (key.toString().startsWith(EXTRA_OPTIONTYPE_PREFIX)){
+                //add this to the property map
+                configurationProperties.put(key.toString().replaceFirst("E",""),option.getOptionValue());
+            }
+        }
+
     }
 
 

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CommandLineOption.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CommandLineOption.java?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CommandLineOption.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CommandLineOption.java Tue Dec 27 21:58:51 2005
@@ -35,7 +35,12 @@
 
     private void updateType(String type) {
         if (type.startsWith("-")) type = type.replaceFirst("-", "");
-        type = type.toLowerCase();
+
+        //for options that start with the extra prefix, don't do any change for the
+        //case
+        if (!type.startsWith(EXTRA_OPTIONTYPE_PREFIX)){
+            type = type.toLowerCase();
+        }
         this.type = type;
     }
 
@@ -87,18 +92,24 @@
     }
 
     private void validate(String optionType) {
-        invalid = !((WSDL_LOCATION_URI_OPTION).equalsIgnoreCase(optionType) ||
-                (OUTPUT_LOCATION_OPTION).equalsIgnoreCase(optionType) ||
-                (SERVER_SIDE_CODE_OPTION).equalsIgnoreCase(optionType) ||
-                (CODEGEN_ASYNC_ONLY_OPTION).equalsIgnoreCase(optionType) ||
-                (CODEGEN_SYNC_ONLY_OPTION).equalsIgnoreCase(optionType) ||
-                (PACKAGE_OPTION).equalsIgnoreCase(optionType) ||
-                (GENERATE_SERVICE_DESCRIPTION_OPTION).equalsIgnoreCase(optionType) ||
-                (GENERATE_TEST_CASE_OPTION).equalsIgnoreCase(optionType) ||
-                (STUB_LANGUAGE_OPTION).equalsIgnoreCase(optionType) ||
-                (DATA_BINDING_TYPE_OPTION).equalsIgnoreCase(optionType) ||
-                (WRAP_CLASSES_OPTION).equalsIgnoreCase(optionType) ||
-                (GENERATE_ALL_OPTION).equalsIgnoreCase(optionType))
-                ;
+
+        if (optionType.startsWith(EXTRA_OPTIONTYPE_PREFIX)){
+            invalid = false;
+        } else{
+            invalid = !((WSDL_LOCATION_URI_OPTION).equalsIgnoreCase(optionType) ||
+                    (OUTPUT_LOCATION_OPTION).equalsIgnoreCase(optionType) ||
+                    (SERVER_SIDE_CODE_OPTION).equalsIgnoreCase(optionType) ||
+                    (CODEGEN_ASYNC_ONLY_OPTION).equalsIgnoreCase(optionType) ||
+                    (CODEGEN_SYNC_ONLY_OPTION).equalsIgnoreCase(optionType) ||
+                    (PACKAGE_OPTION).equalsIgnoreCase(optionType) ||
+                    (GENERATE_SERVICE_DESCRIPTION_OPTION).equalsIgnoreCase(optionType) ||
+                    (GENERATE_TEST_CASE_OPTION).equalsIgnoreCase(optionType) ||
+                    (STUB_LANGUAGE_OPTION).equalsIgnoreCase(optionType) ||
+                    (DATA_BINDING_TYPE_OPTION).equalsIgnoreCase(optionType) ||
+                    (UNWRAP_CLASSES_OPTION).equalsIgnoreCase(optionType) ||
+                    (GENERATE_ALL_OPTION).equalsIgnoreCase(optionType))
+                    ;
+        }
+
     }
 }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CommandLineOptionConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CommandLineOptionConstants.java?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CommandLineOptionConstants.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CommandLineOptionConstants.java Tue Dec 27 21:58:51 2005
@@ -30,10 +30,11 @@
     public static final String STUB_LANGUAGE_OPTION = "l";
     public static final String GENERATE_TEST_CASE_OPTION = "t";
     public static final String DATA_BINDING_TYPE_OPTION = "d";
-    public static final String WRAP_CLASSES_OPTION = "w";
+    public static final String UNWRAP_CLASSES_OPTION = "u";
     public static final String GENERATE_ALL_OPTION = "g";
 
     public static final String INVALID_OPTION = "INVALID_OPTION";
 
 
+    String EXTRA_OPTIONTYPE_PREFIX = "E";
 }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java Tue Dec 27 21:58:51 2005
@@ -86,7 +86,7 @@
 
     protected CodeGenConfiguration configuration;
     protected TypeMapper mapper;
-    protected URIResolver reslover;
+    protected URIResolver resolver;
 
 
     /**
@@ -106,7 +106,7 @@
      */
     public void setCodeGenConfiguration(CodeGenConfiguration configuration) {
         this.configuration = configuration;
-        reslover = new XSLTIncludeResolver(this.configuration.getProperties());
+        resolver = new XSLTIncludeResolver(this.configuration.getProperties());
     }
 
     /**
@@ -204,6 +204,11 @@
             for (Iterator iterator = bindingCollection.iterator(); iterator.hasNext();) {
                 axisBinding = (WSDLBinding) iterator.next();
 
+                //see the comment at updateMapperClassnames for details and reasons for
+                //calling this method
+                if (mapper.isObjectMappingPresent()){
+                    updateMapperForMessageReceiver(axisBinding.getBoundInterface());
+                }
                 //write skeleton
                 writeSkeleton(axisBinding.getBoundInterface(), axisBinding);
                 //write service xml
@@ -284,6 +289,13 @@
                 axisBinding = (WSDLBinding) iterator.next();
                 //Check the service
                 axisService = checkService(wom, axisService);
+
+                //see the comment at updateMapperClassnames for details and reasons for
+                //calling this method
+                if (mapper.isObjectMappingPresent()){
+                    updateMapperForStub(axisBinding.getBoundInterface());
+                }
+
                 //write the inteface
                 //feed the binding information also
                 //note that we do not create this interface if the user switched on the wrap classes mode
@@ -308,6 +320,38 @@
     }
 
     /**
+     * we need to modify the mapper's class name list. The issue here is that in this case we do not
+     * expect the fully qulified class names to be present in the class names list due to the simple
+     * reason that they've not been written yet! Hence the mappers class name list needs to be updated
+     * to suit the expected package to be written
+     * in this case we modify the package name to have make the class a inner class of the stub
+     */
+    private void updateMapperClassnames(WSDLInterface boundInterface,String fullyQulifiedIncludingClassNamePrefix) {
+
+
+        Map classNameMap = mapper.getAllMappedNames();
+        Iterator keys = classNameMap.keySet().iterator();
+        while (keys.hasNext()) {
+            Object key =  keys.next();
+            classNameMap.put(key,fullyQulifiedIncludingClassNamePrefix + classNameMap.get(key));
+        }
+    }
+
+
+    private void updateMapperForStub(WSDLInterface boundInterface){
+        String packageName = configuration.getPackageName();
+        String localPart = reformatName(boundInterface.getName().getLocalPart(), false);
+        String stubName = localPart + STUB_SUFFIX;
+        updateMapperClassnames(boundInterface,packageName + "." + stubName + ".");
+    }
+
+    private void updateMapperForMessageReceiver(WSDLInterface boundInterface){
+        String packageName = configuration.getPackageName();
+        String localPart = reformatName(boundInterface.getName().getLocalPart(), false);
+        String stubName = localPart + MESSAGE_RECEIVER_SUFFIX;
+        updateMapperClassnames(boundInterface,packageName + "." + stubName + ".");
+    }
+    /**
      * emit the stubcode with the automatic mode. Look for the binding and if present
      * emit the skeleton with the binding. Else go for the interface
      *
@@ -475,10 +519,10 @@
         writeClass(interfaceImplModel, writer);
     }
 
-    protected void writeMessageReceiver(WSDLBinding axisBinding) throws Exception {
+    protected void writeMessageReceiver(WSDLBinding binding) throws Exception {
         if (configuration.isWriteMessageReceiver()) {
             Document classModel = createDocumentForMessageReceiver(
-                    axisBinding);
+                    binding);
             MessageReceiverWriter writer =
                     new MessageReceiverWriter(
                             this.configuration.getOutputLocation(),
@@ -503,7 +547,7 @@
                 model.getDocumentElement().getAttribute("package"),
                 model.getDocumentElement().getAttribute("name"));
         //use the global resolver
-        writer.parse(model,reslover);
+        writer.parse(model,resolver);
     }
 
 
@@ -738,9 +782,8 @@
     }
 
 
-    protected Document createDocumentForMessageReceiver(WSDLBinding binding) {
+    protected Document createDocumentForMessageReceiver( WSDLBinding binding) {
         WSDLInterface boundInterface = binding.getBoundInterface();
-
         Document doc = getEmptyDocument();
         Element rootElement = doc.createElement("interface");
         addAttribute(doc,
@@ -760,13 +803,28 @@
                 "basereceiver",
                 "org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver",
                 rootElement);
-        addAttribute(doc,
-                "dbsupportpackage",
-                configuration.getPackageName() +
-                        DATABINDING_PACKAGE_NAME_SUFFIX,
-                rootElement);
+
         fillSyncAttributes(doc, rootElement);
-        loadOperations(boundInterface, doc, rootElement, binding);
+
+         //###########################################################################################
+        //this block of code specifically applies to the integration of databinding code into the
+        //generated classes tightly (probably as inner classes)
+        //###########################################################################################
+        //check for the special models in the mapper and if they are present process them
+        if (mapper.isObjectMappingPresent()){
+            // add an attribute to the root element showing that the writing has been skipped
+            addAttribute(doc,
+                    "skip-write",
+                    "yes",
+                    rootElement);
+            //process the mapper objects
+            processModelObjects(mapper.getAllMappedObjects(),rootElement,doc);
+
+
+        }
+      // #############################################################################################
+
+        loadOperations(boundInterface, doc, rootElement, null);
 
         /////////////////////////
         rootElement.appendChild(createDOMElementforDatabinders(doc, binding));
@@ -1127,6 +1185,11 @@
     protected Document createDOMDocumentForInterfaceImplementation(
             WSDLBinding binding, WSDLService service) throws Exception {
         WSDLInterface boundInterface = binding.getBoundInterface();
+
+        String packageName = configuration.getPackageName();
+        String localPart = reformatName(boundInterface.getName().getLocalPart(), false);
+        String stubName = localPart + STUB_SUFFIX;
+
         HashMap endpoints = new HashMap(1);
         if (service != null) {
             endpoints = service.getEndpoints();
@@ -1134,12 +1197,14 @@
 
         Document doc = getEmptyDocument();
         Element rootElement = doc.createElement("class");
+
         addAttribute(doc,
                 "package",
-                configuration.getPackageName(),
+                packageName,
                 rootElement);
-        String localPart = reformatName(boundInterface.getName().getLocalPart(), false);
-        addAttribute(doc, "name", localPart + STUB_SUFFIX, rootElement);
+
+
+        addAttribute(doc, "name", stubName, rootElement);
         addAttribute(doc, "servicename", localPart, rootElement);
         addAttribute(doc,
                 "namespace",
@@ -1159,12 +1224,6 @@
                     rootElement);
         }
 
-        //todo fix this
-        addAttribute(doc,
-                "dbsupportpackage",
-                configuration.getPackageName() +
-                        DATABINDING_PACKAGE_NAME_SUFFIX,
-                rootElement);
 
         //add SOAP version
         addSoapVersion(binding, doc, rootElement);
@@ -1172,6 +1231,25 @@
         addEndpoints(doc, rootElement, endpoints);
         //set the sync/async attributes
         fillSyncAttributes(doc, rootElement);
+
+        //###########################################################################################
+        //this block of code specifically applies to the integration of databinding code into the
+        //generated classes tightly (probably as inner classes)
+        //###########################################################################################
+        //check for the special models in the mapper and if they are present process them
+        if (mapper.isObjectMappingPresent()){
+            // add an attribute to the root element showing that the writing has been skipped
+            addAttribute(doc,
+                    "skip-write",
+                    "yes",
+                    rootElement);
+            //process the mapper objects
+            processModelObjects(mapper.getAllMappedObjects(),rootElement,doc);
+
+
+        }
+      // #############################################################################################
+
         //load the operations
         loadOperations(boundInterface, doc, rootElement, binding);
 
@@ -1180,10 +1258,7 @@
         rootElement.appendChild(
                 createDOMElementforDatabinders(doc, binding));
 
-        //check for the special models in the mapper and if they are present process them
-        if (mapper.isObjectMappingPresent()){
-            processModelObjects(mapper.getAllMappedObjects(),rootElement,doc);
-        }
+
 
         doc.appendChild(rootElement);
 
@@ -1203,7 +1278,7 @@
         while (objectIterator.hasNext()) {
             Object o =  objectIterator.next();
             if (o instanceof Document){
-              root.appendChild(doc.importNode(((Document)o).getDocumentElement(),false));
+                root.appendChild(doc.importNode(((Document)o).getDocumentElement(),true));
             }else{
                 //oops we have no idea how to do this
             }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SimpleDBExtension.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SimpleDBExtension.java?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SimpleDBExtension.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SimpleDBExtension.java Tue Dec 27 21:58:51 2005
@@ -95,10 +95,11 @@
 
             //set the default options
             setDefaultOptions(options);
-            
 
-            //todo allow the user to override the default options here
-            //perhaps by allowing -Eparameters
+            //set the user parameters. the user parameters get the preference over
+            //the default once. But the user better know what he's doing if he
+            //used module specific parameters
+            setUserparameters(options);
 
             SchemaCompiler schemaCompiler = new SchemaCompiler(options);
             schemaCompiler
@@ -139,8 +140,8 @@
                 //get the ADB template from the schema compilers property bag and set the
                 //template
                 configuration.putProperty(XSLTConstants.EXTERNAL_TEMPLATE_PROPERTY_KEY,
-                                          schemaCompiler.getCompilerProperties().getProperty(
-                                                  SchemaConstants.SchemaPropertyNames.BEAN_WRITER_TEMPLATE_KEY));
+                        schemaCompiler.getCompilerProperties().getProperty(
+                                SchemaConstants.SchemaPropertyNames.BEAN_WRITER_TEMPLATE_KEY));
 
             }
 
@@ -154,15 +155,35 @@
 
     }
 
+    private void setUserparameters(CompilerOptions options){
+        Map propertyMap = configuration.getProperties();
+        if (propertyMap.containsKey(SchemaConstants.SchemaCompilerArguments.WRAP_SCHEMA_CLASSES)){
+            if (Boolean.valueOf(
+                    propertyMap.get(SchemaConstants.SchemaCompilerArguments.WRAP_SCHEMA_CLASSES).toString()).
+                    booleanValue()) {
+             options.setWrapClasses(true);
+            }else{
+              options.setWrapClasses(true);
+            }
+        }
+
+        if (propertyMap.containsKey(SchemaConstants.SchemaCompilerArguments.WRITE_SCHEMA_CLASSES)){
+          if (Boolean.valueOf(
+                    propertyMap.get(SchemaConstants.SchemaCompilerArguments.WRITE_SCHEMA_CLASSES).toString()).
+                    booleanValue()) {
+             options.setWriteOutput(true);
+            }else{
+              options.setWriteOutput(false);
+            }
+        }
+    }
+
+
     private void setDefaultOptions(CompilerOptions options) {
         /// these options need to be taken from the command line
         options.setOutputLocation(configuration.getOutputLocation());
         options.setPackageName(ADB_PACKAGE_NAME_PREFIX);
 
-//        options.setWrapClasses(configuration.isWrapClasses());
-//        options.setWriteOutput(true);
-
-        //todo this needs to be attended to later
         //default setting is to set the wrap status depending on whether it's
         //the server side or the client side
         if (configuration.isServerSide()){

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Tue Dec 27 21:58:51 2005
@@ -3,7 +3,10 @@
 
     <!-- import the databinding template-->
     <xsl:include href="databindsupporter"/>
-    <!-- import the other templates for databinding -->
+    <!-- import the other templates for databinding
+         Note  -  these names would be handled by a special
+         URI resolver during the xslt transformations
+     -->
     <xsl:include href="externalTemplate"/>
 
     <xsl:template match="/class">

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl Tue Dec 27 21:58:51 2005
@@ -1,7 +1,14 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="text"/>
 
+    <!-- include the databind supporters  -->
     <xsl:include href="databindsupporter"/>
+    <!-- import the other templates for databinding
+           Note  -  these names would be handled by a special
+           URI resolver during the xslt transformations
+       -->
+       <xsl:include href="externalTemplate"/>
+
 
     <xsl:template match="/interface">
         <xsl:variable name="skeletonname"><xsl:value-of select="@skeletonname"/></xsl:variable>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=359407&r1=359406&r2=359407&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java Tue Dec 27 21:58:51 2005
@@ -153,7 +153,7 @@
     public static final String WSA_ACTION = "wsamapping";
     public static final String VALUE_TRUE = "true";
     public static final String VALUE_FALSE = "false";
-    public static final String TESTING_PATH = "/home/sanka/axis2-src/java/modules/integration/target/test-resources/";
+    public static final String TESTING_PATH = "target/test-resources/";
     public static final String TESTING_REPOSITORY = TESTING_PATH + "samples";
     public static final char SERVICE_NAME_SPLIT_CHAR = ':';
     public static final String SERVICE_GROUP_ID = "ServiceGroupId";