xml-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snic...@apache.org
Subject cvs commit: xml-soap/java/src/org/apache/soap/encoding SOAPMappingRegistry.java
Date Wed, 08 Jan 2003 19:57:25 GMT
snichol     2003/01/08 11:57:24

  Modified:    java/src/org/apache/soap/encoding SOAPMappingRegistry.java
  Log:
  Provide mappings so that null DataHandlers can be serialized and
  de-serialized.
  
  Revision  Changes    Path
  1.37      +44 -20    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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- SOAPMappingRegistry.java	28 Nov 2002 00:32:51 -0000	1.36
  +++ SOAPMappingRegistry.java	8 Jan 2003 19:57:24 -0000	1.37
  @@ -92,6 +92,7 @@
     private static String soapEncURI = Constants.NS_URI_SOAP_ENC;
   
     private static QName arrayQName = new QName(soapEncURI, "Array");
  +  private static QName dataHandlerQName = new QName(Constants.NS_URI_XML_SOAP, "DataHandler");
   
     // create all the standard serializers/deserializers as static vars.
     // these fill into all the various base registries.
  @@ -149,10 +150,10 @@
       Constants.qName1999QName,
       Constants.date1999QName,
       Constants.timeInst1999QName,
  -    Constants.object1999QName,
  -    Constants.object1999QName,
  -    Constants.object1999QName,
  -    Constants.object1999QName,
  +    dataHandlerQName, // for null DataHandler
  +    dataHandlerQName, // for null DataHandler
  +    dataHandlerQName, // for null DataHandler
  +    dataHandlerQName, // for null DataHandler
       Constants.object1999QName,
     };
   
  @@ -177,10 +178,10 @@
       Constants.qName2000QName,
       Constants.date2000QName,
       Constants.timeInst2000QName,
  -    Constants.object2000QName,
  -    Constants.object2000QName,
  -    Constants.object2000QName,
  -    Constants.object2000QName,
  +    dataHandlerQName, // for null DataHandler
  +    dataHandlerQName, // for null DataHandler
  +    dataHandlerQName, // for null DataHandler
  +    dataHandlerQName, // for null DataHandler
       Constants.object2000QName,
     };
   
  @@ -205,10 +206,10 @@
       Constants.qName2001QName,
       Constants.date2001QName,
       Constants.timeInst2001QName,
  -    Constants.object2001QName,
  -    Constants.object2001QName,
  -    Constants.object2001QName,
  -    Constants.object2001QName,
  +    dataHandlerQName, // for null DataHandler
  +    dataHandlerQName, // for null DataHandler
  +    dataHandlerQName, // for null DataHandler
  +    dataHandlerQName, // for null DataHandler
       Constants.object2001QName,
     };
   
  @@ -303,10 +304,10 @@
       qNameSer,
       calSer,
       dateSer,
  -    null,
  -    null,
  -    null,
  -    null,
  +    null,      // MimeBodyPart
  +    null,      // InputStream
  +    null,      // DataSource
  +    partSer,   // for null DataHandler
       objDeser,
     };
   
  @@ -624,12 +625,23 @@
     protected Serializer querySerializer_(Class javaType,
                                           String encodingStyleURI)
     {
  -    Serializer s = super.querySerializer_(javaType, encodingStyleURI);
  +    Serializer s = super.querySerializerNoDefault_(javaType, encodingStyleURI);
       if (s != null) {
         return s;
       }
       if (parent != null) {
  -      s = parent.querySerializer_(javaType, encodingStyleURI);
  +      s = parent.querySerializerNoDefault_(javaType, encodingStyleURI);
  +      if (s != null) {
  +        return s;
  +      }
  +    }
  +
  +    s = super.querySerializerNoDefault_(null, encodingStyleURI);
  +    if (s != null) {
  +      return s;
  +    }
  +    if (parent != null) {
  +      s = parent.querySerializerNoDefault_(null, encodingStyleURI);
         if (s != null) {
           return s;
         }
  @@ -653,16 +665,28 @@
     protected Deserializer queryDeserializer_(QName elementType,
                                               String encodingStyleURI)
     {
  -    Deserializer ds = super.queryDeserializer_(elementType, encodingStyleURI);
  +    Deserializer ds = super.queryDeserializerNoDefault_(elementType, encodingStyleURI);
       if (ds != null) {
         return ds;
       }
       if (parent != null) {
  -      ds = parent.queryDeserializer_(elementType, encodingStyleURI);
  +      ds = parent.queryDeserializerNoDefault_(elementType, encodingStyleURI);
         if (ds != null) {
           return ds;
         }
       }
  +
  +    ds = super.queryDeserializerNoDefault_(null, encodingStyleURI);
  +    if (ds != null) {
  +      return ds;
  +    }
  +    if (parent != null) {
  +      ds = parent.queryDeserializerNoDefault_(null, encodingStyleURI);
  +      if (ds != null) {
  +        return ds;
  +      }
  +    }
  +
       return null;
     }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-dev-help@xml.apache.org>


Mime
View raw message