tomj        02/03/20 08:53:07

  Modified:    java/src/org/apache/axis/utils resources.properties
               java/src/org/apache/axis/encoding/ser
                        BaseSerializerFactory.java
  Log:
  Preserve error information if we fail to get a serializer.
  
  Revision  Changes    Path
  1.79      +1 -0      xml-axis/java/src/org/apache/axis/utils/resources.properties
  
  Index: resources.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- resources.properties      20 Mar 2002 13:36:47 -0000      1.78
  +++ resources.properties      20 Mar 2002 16:53:07 -0000      1.79
  @@ -777,3 +777,4 @@
   
   # NOTE:  in noUse, do no translate "soap:operation", "binding operation", "use".
   noUse=The soap:operation for binding operation {0} must have a "use" attribute.
  +CantGetSerializer=unable to get serializer for class {0}
  \ No newline at end of file
  
  
  
  1.3       +8 -4      
xml-axis/java/src/org/apache/axis/encoding/ser/BaseSerializerFactory.java
  
  Index: BaseSerializerFactory.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BaseSerializerFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BaseSerializerFactory.java        8 Mar 2002 05:04:54 -0000       1.2
  +++ BaseSerializerFactory.java        20 Mar 2002 16:53:07 -0000      1.3
  @@ -66,6 +66,7 @@
   import java.util.Iterator;
   
   import org.apache.axis.Constants;
  +import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.encoding.Serializer;
   import org.apache.axis.encoding.SerializerFactory;
   import org.apache.axis.encoding.SerializationContext;
  @@ -128,18 +129,21 @@
                   ser = (Serializer) 
                       serClassConstructor.newInstance(new Object[] {javaType, 
xmlType});
               } catch (Exception e) {
  +                // ignore this error and continue
               }
           }
  -        // If not successfull, try newInstance
  +        // If not successfull, try newInstance with no arguments
           if (ser == null) {
               try {
                   ser = (Serializer) serClass.newInstance();
               } catch (Exception e) {
  +                throw new JAXRPCException(
  +                        JavaUtils.getMessage("CantGetSerializer", 
  +                                             serClass.getName()),
  +                        e);
               }
           }
  -        if (ser == null) {
  -            throw new JAXRPCException();
  -        }
  +
           return ser;
       }
   
  
  
  


Reply via email to