Author: amilas
Date: Sat Feb  5 10:39:53 2011
New Revision: 1067421

URL: http://svn.apache.org/viewvc?rev=1067421&view=rev
Log:
Avoding and special behavior for exception classes at the java.lang package 
such as java.lang.ClassNotFoundException

Modified:
    
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java?rev=1067421&r1=1067420&r2=1067421&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java
 Sat Feb  5 10:39:53 2011
@@ -156,10 +156,18 @@ public class TypeTable {
     public QName getSimpleSchemaTypeName(String typeName) {
         QName qName = (QName) simpleTypetoxsd.get(typeName);
         if(qName == null){
-            
if((typeName.startsWith("java.lang")||typeName.startsWith("javax.")) &&
-                    !Exception.class.getName().equals(typeName)){
+             Class typeClass = null;
+            try {
+                typeClass = Class.forName(typeName);
+            } catch (ClassNotFoundException e) {
+                // we need to do this change only with the proper classes. 
this my gives
+                // the exceptions but that should be ok.
+            }
+            if ((typeName.startsWith("java.lang") || 
typeName.startsWith("javax.")) &&
+                    !Exception.class.isAssignableFrom(typeClass)) {
                 return ANY_TYPE;
             }
+
         }
         return qName;
     }


Reply via email to