cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r695497 - in /cxf/branches/2.1.x-fixes: ./ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java
Date Mon, 15 Sep 2008 15:13:50 GMT
Author: dkulp
Date: Mon Sep 15 08:13:49 2008
New Revision: 695497

URL: http://svn.apache.org/viewvc?rev=695497&view=rev
Log:
Merged revisions 695041 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r695041 | bimargulies | 2008-09-13 18:08:00 -0400 (Sat, 13 Sep 2008) | 6 lines
  
  remove some dead-ish code left over from when XFire supported Java 1.4, 
  or a smaller classpath. Either way, make 
  javax.xml.XMLGregorianCalendarType required in the classpath.
........

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 15 08:13:49 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java?rev=695497&r1=695496&r2=695497&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java
Mon Sep 15 08:13:49 2008
@@ -39,7 +39,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.cxf.aegis.DatabindingException;
 import org.apache.cxf.aegis.type.basic.Base64Type;
 import org.apache.cxf.aegis.type.basic.BigDecimalType;
 import org.apache.cxf.aegis.type.basic.BigIntegerType;
@@ -68,7 +67,6 @@
 import org.apache.cxf.aegis.type.xml.SourceType;
 import org.apache.cxf.aegis.type.xml.XMLStreamReaderType;
 import org.apache.cxf.binding.soap.Soap11;
-import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.common.util.XMLSchemaQNames;
 import org.jdom.Element;
@@ -322,55 +320,35 @@
                         CharacterAsStringType.CHARACTER_AS_STRING_TYPE_QNAME,
                         new CharacterAsStringType());
 
-        registerIfAvailable(tm, defaultNillable, "javax.xml.datatype.Duration", XMLSchemaQNames.XSD_DURATION,
-                            "org.apache.cxf.aegis.type.java5.DurationType");
-        registerIfAvailable(tm, defaultNillable, "javax.xml.datatype.XMLGregorianCalendar",
+        defaultRegister(tm, defaultNillable, javax.xml.datatype.Duration.class, XMLSchemaQNames.XSD_DURATION,
+                            new org.apache.cxf.aegis.type.java5.DurationType());
+        defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class,
                             XMLSchemaQNames.XSD_DATE,
-                            "org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType");
-        registerIfAvailable(tm, defaultNillable, "javax.xml.datatype.XMLGregorianCalendar",
+                            new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
+        defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class,
                             XMLSchemaQNames.XSD_TIME,
-                            "org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType");
-        registerIfAvailable(tm, defaultNillable, "javax.xml.datatype.XMLGregorianCalendar",
+                            new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
+        defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class,
                             XMLSchemaQNames.XSD_G_DAY,
-                            "org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType");
-        registerIfAvailable(tm, defaultNillable, "javax.xml.datatype.XMLGregorianCalendar",
+                            new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
+        defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class,
                             XMLSchemaQNames.XSD_G_MONTH,
-                            "org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType");
-        registerIfAvailable(tm, defaultNillable, "javax.xml.datatype.XMLGregorianCalendar",
+                            new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
+        defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class,
                             XMLSchemaQNames.XSD_G_MONTH_DAY,
-                            "org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType");
-        registerIfAvailable(tm, defaultNillable, "javax.xml.datatype.XMLGregorianCalendar",
+                            new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
+        defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class,
                             XMLSchemaQNames.XSD_G_YEAR,
-                            "org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType");
-        registerIfAvailable(tm, defaultNillable, "javax.xml.datatype.XMLGregorianCalendar",
+                            new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
+        defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class,
                             XMLSchemaQNames.XSD_G_YEAR_MONTH,
-                            "org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType");
-        registerIfAvailable(tm, defaultNillable, "javax.xml.datatype.XMLGregorianCalendar",
+                            new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
+        defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class,
                             XMLSchemaQNames.XSD_DATETIME,
-                            "org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType");
+                            new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
         return tm;
     }
 
-    private static void registerIfAvailable(TypeMapping tm, boolean defaultNillable, String
className,
-                                            QName typeName, String typeClassName) {
-        try {
-            Class cls = ClassLoaderUtils.loadClass(className, DefaultTypeMapping.class);
-            Class typeCls = ClassLoaderUtils.loadClass(typeClassName, DefaultTypeMapping.class);
-            try {
-                Type type = (Type)typeCls.newInstance();
-
-                defaultRegister(tm, defaultNillable, cls, typeName, type);
-            } catch (InstantiationException e) {
-                throw new DatabindingException("Couldn't instantiate Type ", e);
-            } catch (IllegalAccessException e) {
-                throw new DatabindingException("Couldn't instantiate Type ", e);
-            }
-        } catch (ClassNotFoundException e) {
-            LOG.debug("Could not find optional Type " + className + ". Skipping.");
-        }
-
-    }
-
     public String getMappingIdentifierURI() {
         return identifierURI;
     }



Mime
View raw message