axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r428281 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/codegen/extension/ codegen/src/org/apache/axis2/wsdl/databinding/ core/src/org/apache/axis2/description/
Date Thu, 03 Aug 2006 08:31:56 GMT
Author: ajith
Date: Thu Aug  3 01:31:55 2006
New Revision: 428281

URL: http://svn.apache.org/viewvc?rev=428281&view=rev
Log:
1.Changed the implementation of the DefaultTypeMapper.java to override the getTypeMappingName
method to provide only the default mapping.
2. Added a null check to support cases with no types

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/DefaultDatabindingExtension.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/databinding/DefaultTypeMapper.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/DefaultDatabindingExtension.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/DefaultDatabindingExtension.java?rev=428281&r1=428280&r2=428281&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/DefaultDatabindingExtension.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/DefaultDatabindingExtension.java
Thu Aug  3 01:31:55 2006
@@ -38,6 +38,9 @@
             }
             return;
         }
+        //the mapper has not been populated yet. since this extension is
+        //registered for -d none, we have to generate a new type mapper
+        //that serves only the default types
         if (mapper ==null){
             configuration.setTypeMapper(new DefaultTypeMapper());
         }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/databinding/DefaultTypeMapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/databinding/DefaultTypeMapper.java?rev=428281&r1=428280&r2=428281&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/databinding/DefaultTypeMapper.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/databinding/DefaultTypeMapper.java
Thu Aug  3 01:31:55 2006
@@ -17,6 +17,11 @@
 
 package org.apache.axis2.wsdl.databinding;
 
+import org.apache.axis2.namespace.Constants;
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
+
+import javax.xml.namespace.QName;
+
 /**
  * The default type mapper. This type mapper has no default configurations
  */
@@ -25,4 +30,19 @@
     public DefaultTypeMapper() {
     }
 
+    /**
+     * Gets the type mapping name.
+     * always returns the default mapping
+     *
+     * @see TypeMapper#getTypeMappingName(javax.xml.namespace.QName)
+     */
+    public String getTypeMappingName(QName qname) {
+
+        if ((qname != null)) {
+            return defaultClassName;
+        }else{
+            return null;
+        }
+
+    }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=428281&r1=428280&r2=428281&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Thu Aug  3 01:31:55 2006
@@ -244,14 +244,16 @@
      */
 
     private Map populateSchemaMap(Types wsdl4jTypes) {
-        List typesExtensibilityElements = wsdl4jTypes.getExtensibilityElements();
         Map schemaMap = new HashMap();
-        for (int i = 0; i < typesExtensibilityElements.size(); i++) {
-            Object o = typesExtensibilityElements.get(i);
-            if (o instanceof Schema) {
-                Schema s = (Schema) o;
-                String targetNamespace = s.getElement().getAttribute(TRAGET_NAMESPACE);
-                schemaMap.put(targetNamespace, s.getElement());
+        if (wsdl4jTypes!=null){
+            List typesExtensibilityElements = wsdl4jTypes.getExtensibilityElements();
+            for (int i = 0; i < typesExtensibilityElements.size(); i++) {
+                Object o = typesExtensibilityElements.get(i);
+                if (o instanceof Schema) {
+                    Schema s = (Schema) o;
+                    String targetNamespace = s.getElement().getAttribute(TRAGET_NAMESPACE);
+                    schemaMap.put(targetNamespace, s.getElement());
+                }
             }
         }
         return schemaMap;



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


Mime
View raw message