snichol     2003/02/06 20:15:58

  Modified:    java/src/org/apache/soap/util/xml
                        XMLJavaMappingRegistry.java
               java/src/org/apache/soap/encoding SOAPMappingRegistry.java
  Log:
  Undo the gist of update 1.9 2002/10/23 04:05:22
  
  Map javaType <--> elementType regardless of specification of serializer and
  deserializer, since the mapping can be used for null values, too, in which
  cases [de-]serializers are not required.
  
  Revision  Changes    Path
  1.14      +11 -15    
xml-soap/java/src/org/apache/soap/util/xml/XMLJavaMappingRegistry.java
  
  Index: XMLJavaMappingRegistry.java
  ===================================================================
  RCS file: 
/home/cvs/xml-soap/java/src/org/apache/soap/util/xml/XMLJavaMappingRegistry.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XMLJavaMappingRegistry.java       8 Jan 2003 20:20:44 -0000       1.13
  +++ XMLJavaMappingRegistry.java       7 Feb 2003 04:15:58 -0000       1.14
  @@ -155,28 +155,24 @@
     {
       Maps maps = getMapsForEncoding(encodingStyleURI);
       Object java2XMLKey = "";
  +    if (javaType != null)
  +      java2XMLKey = javaType;
       Object xml2JavaKey = "";
  +    if (elementType != null)
  +      xml2JavaKey = elementType;
   
  -    if (s != null) {
  -      if (javaType != null)
  -        java2XMLKey = javaType;
  +    if (s != null)
         maps.sReg.put(java2XMLKey, s);
  -    }
   
  -    if (ds != null) {
  -      if (elementType != null)
  -        xml2JavaKey = elementType;
  -      maps.dsReg.put(xml2JavaKey , ds);
  -    }
  +    if (ds != null)
  +      maps.dsReg.put(xml2JavaKey, ds);
   
       // Only map types if both types are provided.
  +    // Map regardless of specification of serializer and deserializer,
  +    // since the mapping can be used for null values, too.
       if (elementType != null && javaType != null) {
  -      // Only map Java to XML if a serializer was provided
  -      if (s != null)
  -        maps.java2XMLReg.put(java2XMLKey, elementType);
  -      // Only map XML to Java if a deserializer was provided
  -      if (ds != null)
  -        maps.xml2JavaReg.put(xml2JavaKey, javaType);
  +      maps.java2XMLReg.put(java2XMLKey, elementType);
  +      maps.xml2JavaReg.put(xml2JavaKey, javaType);
       }
     }
   
  
  
  
  1.38      +1 -1      
xml-soap/java/src/org/apache/soap/encoding/SOAPMappingRegistry.java
  
  Index: SOAPMappingRegistry.java
  ===================================================================
  RCS file: 
/home/cvs/xml-soap/java/src/org/apache/soap/encoding/SOAPMappingRegistry.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- SOAPMappingRegistry.java  8 Jan 2003 19:57:24 -0000       1.37
  +++ SOAPMappingRegistry.java  7 Feb 2003 04:15:58 -0000       1.38
  @@ -308,7 +308,7 @@
       null,      // InputStream
       null,      // DataSource
       partSer,   // for null DataHandler
  -    objDeser,
  +    objDeser,  // object
     };
   
     /**
  
  
  


Reply via email to