cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r752744 - in /cxf/branches/2.1.x-fixes: ./ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/ rt/databi...
Date Thu, 12 Mar 2009 01:49:07 GMT
Author: bimargulies
Date: Thu Mar 12 01:49:06 2009
New Revision: 752744

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

........
  r752734 | bimargulies | 2009-03-11 20:58:31 -0400 (Wed, 11 Mar 2009) | 3 lines
  
  This is a part of CXF-2093. Allow the app to grab the type mapping before service initialization
without
  causing all the automatically mapped types to fall into the XSD namespace.
........

Added:
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/InconsistentInitializationException.java
      - copied unchanged from r752734, cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/InconsistentInitializationException.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/CustomBeansTest.java
      - copied unchanged from r752734, cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/CustomBeansTest.java
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/AegisContext.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMapping.java

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/AegisContext.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisContext.java?rev=752744&r1=752743&r2=752744&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisContext.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisContext.java
Thu Mar 12 01:49:06 2009
@@ -151,9 +151,8 @@
         if (typeMapping == null) {
             boolean defaultNillable = configuration.isDefaultNillable();
             TypeMapping baseTM = DefaultTypeMapping.createDefaultTypeMapping(defaultNillable,
mtomUseXmime);
-            // The use of the XSD URI in the mapping is, MAGIC.
             if (mappingNamespaceURI == null) {
-                mappingNamespaceURI = SOAPConstants.XSD;
+                mappingNamespaceURI = DefaultTypeMapping.DEFAULT_MAPPING_URI;
             }
             DefaultTypeMapping defaultTypeMapping = new DefaultTypeMapping(mappingNamespaceURI,
baseTM);
             defaultTypeMapping.setTypeCreator(createTypeCreator());
@@ -466,5 +465,8 @@
 
     public void setMappingNamespaceURI(String mappingNamespaceURI) {
         this.mappingNamespaceURI = mappingNamespaceURI;
+        if (typeMapping != null) {
+            typeMapping.setMappingIdentifierURI(mappingNamespaceURI);
+        }
     }
 }

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=752744&r1=752743&r2=752744&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
Thu Mar 12 01:49:06 2009
@@ -76,6 +76,7 @@
  * Contains type mappings for java/qname pairs.
  */
 public class DefaultTypeMapping implements TypeMapping {
+    public  static final String DEFAULT_MAPPING_URI = "urn:org.apache.cxf.aegis.types";
     private static final Log LOG = LogFactory.getLog(DefaultTypeMapping.class);
     private Map<Class, Type> class2Type;
     private Map<QName, Type> xml2Type;
@@ -91,7 +92,7 @@
     }
     
     public DefaultTypeMapping() {
-        this(SOAPConstants.XSD);
+        this(DEFAULT_MAPPING_URI);
     }
 
     public DefaultTypeMapping(String identifierURI) {
@@ -358,4 +359,9 @@
     public String getMappingIdentifierURI() {
         return identifierURI;
     }
+
+    public void setMappingIdentifierURI(String uri) {
+        identifierURI = uri;
+        
+    }
 }

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMapping.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMapping.java?rev=752744&r1=752743&r2=752744&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMapping.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMapping.java
Thu Mar 12 01:49:06 2009
@@ -73,4 +73,9 @@
      * @return the URI.
      */
     String getMappingIdentifierURI();
+    /**
+     * This exists only to deal with an initialization order problem.
+     * @param uri
+     */
+    void setMappingIdentifierURI(String uri);
 }



Mime
View raw message