axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject cvs commit: xml-axis/java/test/utils TestSrcContent.java
Date Wed, 19 Jun 2002 16:13:19 GMT
glyn        2002/06/19 09:13:19

  Modified:    java/src/org/apache/axis MessageContext.java
               java/src/org/apache/axis/client Call.java Service.java
                        Stub.java
               java/src/org/apache/axis/description TypeDesc.java
               java/src/org/apache/axis/encoding
                        DefaultTypeMappingImpl.java
                        TypeMappingDelegate.java TypeMappingImpl.java
                        TypeMappingRegistryImpl.java
               java/src/org/apache/axis/providers/java RPCProvider.java
               java/src/org/apache/axis/utils Admin.java
                        BeanPropertyDescriptor.java JavaUtils.java
                        axisNLS.properties
               java/src/org/apache/axis/wsdl/toJava
                        JavaGeneratorFactory.java JavaSkelWriter.java
               java/test/utils TestSrcContent.java
  Log:
  Fix bugzilla bug 9952 by supplying message text whenever exceptions
  are created. Ensure this doesn't creep in again by instituting source
  check. Also police the use of new NullPointerException. The only
  exception to the latter is in TypeDesc and this is the subject of
  bugzilla bug 9987.
  
  Revision  Changes    Path
  1.103     +2 -1      xml-axis/java/src/org/apache/axis/MessageContext.java
  
  Index: MessageContext.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- MessageContext.java	17 Jun 2002 00:33:48 -0000	1.102
  +++ MessageContext.java	19 Jun 2002 16:13:16 -0000	1.103
  @@ -685,7 +685,8 @@
       public void setProperty(String name, Object value) {
           if (name == null || value == null) {
               return;
  -            // Is this right?  Shouldn't we throw an exception like: throw new IllegalArgumentException();
  +            // Is this right?  Shouldn't we throw an exception like: 
  +            // throw new IllegalArgumentException(msg);
           }
           else if (name.equals(Call.USERNAME_PROPERTY)) {
               if (!(value instanceof String)) {
  
  
  
  1.142     +14 -7     xml-axis/java/src/org/apache/axis/client/Call.java
  
  Index: Call.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Call.java,v
  retrieving revision 1.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- Call.java	18 Jun 2002 13:04:22 -0000	1.141
  +++ Call.java	19 Jun 2002 16:13:16 -0000	1.142
  @@ -259,7 +259,9 @@
        */
       public void setProperty(String name, Object value) {
           if (name == null || value == null) {
  -            throw new IllegalArgumentException();
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage(name == null ?
  +                                         "badProp03" : "badProp04"));
           }
           else if (name.equals(USERNAME_PROPERTY)) {
               if (!(value instanceof String)) {
  @@ -346,7 +348,8 @@
                   transport.setTransportName((String) value);
           }
           else {
  -            throw new IllegalArgumentException();
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage("badProp05", name));
           }
           callProperties.put(name, value);
       } // setProperty
  @@ -359,7 +362,9 @@
        */
       public Object getProperty(String name) {
           if (name == null || !isPropertySupported(name))
  -            throw new IllegalArgumentException();
  +            throw new IllegalArgumentException(name == null ?
  +                  JavaUtils.getMessage("badProp03") :
  +                  JavaUtils.getMessage("badProp05", name));
           return callProperties.get(name);
       } // getProperty
   
  @@ -375,7 +380,9 @@
   
       public void setScopedProperty(String name, Object value) {
           if (name == null || value == null) {
  -            throw new IllegalArgumentException();
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage(name == null ?
  +                                         "badProp03" : "badProp04"));
           }
           scopedProperties.put(name, value);
       } // setScopedProperty
  @@ -705,7 +712,7 @@
               operation.addParameter(param);
           }
           else {
  -            throw new JAXRPCException();
  +            throw new JAXRPCException(JavaUtils.getMessage("noParmAndRetReq"));
           }
       }
   
  @@ -788,7 +795,7 @@
               operation.setReturnClass(tm.getClassForQName(type));
           }
           else {
  -            throw new JAXRPCException();
  +            throw new JAXRPCException(JavaUtils.getMessage("noParmAndRetReq"));
           }
       }
   
  @@ -847,7 +854,7 @@
               operation = new OperationDesc();
           }
           else {
  -            throw new JAXRPCException();
  +            throw new JAXRPCException(JavaUtils.getMessage("noParmAndRetReq"));
           }
       }
   
  
  
  
  1.57      +3 -2      xml-axis/java/src/org/apache/axis/client/Service.java
  
  Index: Service.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Service.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- Service.java	13 Jun 2002 17:14:53 -0000	1.56
  +++ Service.java	19 Jun 2002 16:13:16 -0000	1.57
  @@ -509,7 +509,7 @@
        */
       public javax.xml.rpc.Call[] getCalls(QName portName) throws ServiceException {
           if (wsdlLocation == null) {
  -            throw new ServiceException();
  +            throw new ServiceException(JavaUtils.getMessage("wsdlMissing00"));
           }
           else {
               return new javax.xml.rpc.Call[0];
  @@ -530,7 +530,8 @@
        *         HandlerRegistry.
        */
       public HandlerRegistry getHandlerRegistry() {
  -        throw new UnsupportedOperationException();
  +        throw new UnsupportedOperationException(
  +                JavaUtils.getMessage("handlerRegistryConfig"));
       }
   
       /**
  
  
  
  1.12      +3 -1      xml-axis/java/src/org/apache/axis/client/Stub.java
  
  Index: Stub.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Stub.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Stub.java	14 Jun 2002 19:46:59 -0000	1.11
  +++ Stub.java	19 Jun 2002 16:13:16 -0000	1.12
  @@ -120,7 +120,9 @@
        */
       public void _setProperty(String name, Object value) {
           if (name == null || value == null) {
  -            throw new IllegalArgumentException();
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage(name == null ?
  +                                         "badProp03" : "badProp04"));
           }
           else if (name.equals(Call.USERNAME_PROPERTY)) {
               if (!(value instanceof String)) {
  
  
  
  1.14      +10 -2     xml-axis/java/src/org/apache/axis/description/TypeDesc.java
  
  Index: TypeDesc.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/description/TypeDesc.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TypeDesc.java	11 Jun 2002 14:53:54 -0000	1.13
  +++ TypeDesc.java	19 Jun 2002 16:13:16 -0000	1.14
  @@ -55,6 +55,8 @@
   
   package org.apache.axis.description;
   
  +import org.apache.axis.utils.JavaUtils;
  +
   import javax.xml.namespace.QName;
   import java.lang.reflect.Method;
   import java.util.HashMap;
  @@ -177,8 +179,14 @@
        */
       public void addFieldDesc(FieldDesc field)
       {
  -        if (field == null)
  -            throw new NullPointerException();
  +        if (field == null) {
  +            //XXX TypeDesc is published and should not throw NPEs
  +            // An exception has been coded in the source code checks
  +            // in test.utils.TestSrcContent which should be removed
  +            // when this NPE is removed.
  +            throw new NullPointerException(
  +                    JavaUtils.getMessage("nullFieldDesc"));
  +        }
           
           int numFields = 0;
           if (fields != null) {
  
  
  
  1.32      +4 -3      xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java
  
  Index: DefaultTypeMappingImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- DefaultTypeMappingImpl.java	18 Jun 2002 15:33:21 -0000	1.31
  +++ DefaultTypeMappingImpl.java	19 Jun 2002 16:13:17 -0000	1.32
  @@ -57,6 +57,7 @@
   
   import org.apache.axis.Constants;
   import org.apache.axis.encoding.ser.*;
  +import org.apache.axis.utils.JavaUtils;
   
   import javax.xml.namespace.QName;
   import javax.xml.rpc.JAXRPCException;
  @@ -429,15 +430,15 @@
                            javax.xml.rpc.encoding.DeserializerFactory dsf)
           throws JAXRPCException {
   
  -        throw new JAXRPCException();
  +        throw new JAXRPCException(JavaUtils.getMessage("fixedTypeMapping"));
       }
       public void removeSerializer(Class javaType, QName xmlType)
           throws JAXRPCException {
  -        throw new JAXRPCException();
  +        throw new JAXRPCException(JavaUtils.getMessage("fixedTypeMapping"));
       }
       public void removeDeserializer(Class javaType, QName xmlType)
           throws JAXRPCException {
  -        throw new JAXRPCException();
  +        throw new JAXRPCException(JavaUtils.getMessage("fixedTypeMapping"));
       }
       public void setSupportedEncodings(String[] namespaceURIs) {
       }
  
  
  
  1.5       +7 -3      xml-axis/java/src/org/apache/axis/encoding/TypeMappingDelegate.java
  
  Index: TypeMappingDelegate.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/TypeMappingDelegate.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TypeMappingDelegate.java	11 Jun 2002 14:53:54 -0000	1.4
  +++ TypeMappingDelegate.java	19 Jun 2002 16:13:17 -0000	1.5
  @@ -56,6 +56,7 @@
   package org.apache.axis.encoding;
   
   import org.apache.axis.Constants;
  +import org.apache.axis.utils.JavaUtils;
   
   import javax.xml.namespace.QName;
   import javax.xml.rpc.JAXRPCException;
  @@ -101,7 +102,8 @@
                            javax.xml.rpc.encoding.DeserializerFactory dsf)
           throws JAXRPCException {        
   
  -        throw new JAXRPCException();
  +        throw new JAXRPCException(
  +                JavaUtils.getMessage("delegatedTypeMapping"));
       }
       
       public javax.xml.rpc.encoding.SerializerFactory 
  @@ -138,12 +140,14 @@
   
       public void removeSerializer(Class javaType, QName xmlType)
           throws JAXRPCException {
  -        throw new JAXRPCException();
  +        throw new JAXRPCException(
  +                JavaUtils.getMessage("delegatedTypeMapping"));
       }
   
       public void removeDeserializer(Class javaType, QName xmlType)
           throws JAXRPCException {
  -        throw new JAXRPCException();
  +        throw new JAXRPCException(
  +                JavaUtils.getMessage("delegatedTypeMapping"));
       }
   
      public boolean isRegistered(Class javaType, QName xmlType) {
  
  
  
  1.18      +24 -10    xml-axis/java/src/org/apache/axis/encoding/TypeMappingImpl.java
  
  Index: TypeMappingImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/TypeMappingImpl.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- TypeMappingImpl.java	17 Jun 2002 20:14:04 -0000	1.17
  +++ TypeMappingImpl.java	19 Jun 2002 16:13:17 -0000	1.18
  @@ -56,6 +56,7 @@
   package org.apache.axis.encoding;
   
   import org.apache.axis.Constants;
  +import org.apache.axis.utils.JavaUtils;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -202,7 +203,9 @@
           if (javaType == null || xmlType == null) {
               // REMOVED_FOR_TCK
               // return false;
  -            throw new JAXRPCException();
  +            throw new JAXRPCException(
  +                    JavaUtils.getMessage(javaType == null ?
  +                                         "badJavaType" : "badXmlType"));
           }
           if (pair2SF.keySet().contains(new Pair(javaType, xmlType))) {
               return true;
  @@ -229,21 +232,28 @@
                            javax.xml.rpc.encoding.DeserializerFactory dsf)
           throws JAXRPCException {
   
  -        // Both javaType and xmlType must be specified, and
  -        // at least a serializer or deserializer factory must be specified.
  -        if (javaType == null || xmlType == null ||
  -            (sf == null && dsf == null)) {
  -            throw new JAXRPCException();
  +        // Both javaType and xmlType must be specified.
  +        if (javaType == null || xmlType == null) {
  +            throw new JAXRPCException(
  +                    JavaUtils.getMessage(javaType == null ?
  +                                         "badJavaType" : "badXmlType"));
  +        }
  +
  +        // At least a serializer or deserializer factory must be specified.
  +        if (sf == null && dsf == null) {
  +            throw new JAXRPCException(
  +                    JavaUtils.getMessage(sf == null ?
  +                                         "badSerFac" : "badDeserFac"));
           }
   
           //REMOVED_FOR_TCK
           //if (sf != null &&
           //    !(sf instanceof javax.xml.rpc.encoding.SerializerFactory)) {
  -        //    throw new JAXRPCException();
  +        //    throw new JAXRPCException(message text);
           //}
           //if (dsf != null &&
           //    !(dsf instanceof javax.xml.rpc.encoding.DeserializerFactory)) {
  -        //    throw new JAXRPCException();
  +        //    throw new JAXRPCException(message text);
           //}
   
           Pair pair = new Pair(javaType, xmlType);
  @@ -350,7 +360,9 @@
       public void removeSerializer(Class javaType, QName xmlType)
           throws JAXRPCException {
           if (javaType == null || xmlType == null) {
  -            throw new JAXRPCException();
  +            throw new JAXRPCException(
  +                    JavaUtils.getMessage(javaType == null ?
  +                                         "badJavaType" : "badXmlType"));
           }
   
           Pair pair = new Pair(javaType, xmlType);
  @@ -370,7 +382,9 @@
       public void removeDeserializer(Class javaType, QName xmlType)
           throws JAXRPCException {
           if (javaType == null || xmlType == null) {
  -            throw new JAXRPCException();
  +            throw new JAXRPCException(
  +                    JavaUtils.getMessage(javaType == null ?
  +                                         "badJavaType" : "badXmlType"));
           }
           Pair pair = new Pair(javaType, xmlType);
           pair2DF.remove(pair);
  
  
  
  1.13      +18 -9     xml-axis/java/src/org/apache/axis/encoding/TypeMappingRegistryImpl.java
  
  Index: TypeMappingRegistryImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/TypeMappingRegistryImpl.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TypeMappingRegistryImpl.java	11 Jun 2002 14:53:54 -0000	1.12
  +++ TypeMappingRegistryImpl.java	19 Jun 2002 16:13:17 -0000	1.13
  @@ -249,10 +249,12 @@
   //        namespaceURI = "";
           if (mapping == null || 
               !(mapping instanceof TypeMapping)) {
  -            throw new IllegalArgumentException();
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage("badTypeMapping"));
           } 
           if (namespaceURI == null) {
  -            throw new java.lang.IllegalArgumentException();
  +            throw new java.lang.IllegalArgumentException(
  +                    JavaUtils.getMessage("nullNamespaceURI"));
           }
           // Get or create a TypeMappingDelegate and set it to 
           // delegate to the new mapping.
  @@ -274,17 +276,24 @@
        * @param mapping - TypeMapping for specific type namespaces
        *
        * java.lang.IllegalArgumentException - 
  -     * if an invalid namespace URI is specified
  +     * if an invalid type mapping is specified or the delegate is already set
        */
       public void registerDefault(javax.xml.rpc.encoding.TypeMapping mapping) {
           if (mapping == null || 
  -            !(mapping instanceof TypeMapping) ||
  -            // Don't allow this call after the delegate() method since
  -            // the TMR's TypeMappings will be using the default type mapping
  -            // of the secondary TMR.
  -            defaultDelTM.getDelegate() instanceof TypeMappingDelegate) {
  -            throw new IllegalArgumentException();
  +            !(mapping instanceof TypeMapping)) {
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage("badTypeMapping"));
           }
  +
  +        /* Don't allow this call after the delegate() method since
  +         * the TMR's TypeMappings will be using the default type mapping
  +         * of the secondary TMR.
  +         */
  +        if (defaultDelTM.getDelegate() instanceof TypeMappingDelegate) {
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage("defaultTypeMappingSet"));
  +        }
  +
           defaultDelTM.setDelegate((TypeMapping) mapping);
       }
           
  
  
  
  1.66      +1 -1      xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java
  
  Index: RPCProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- RPCProvider.java	17 Jun 2002 12:28:11 -0000	1.65
  +++ RPCProvider.java	19 Jun 2002 16:13:17 -0000	1.66
  @@ -155,7 +155,7 @@
   
           if (body == null) {
               // throw something
  -            throw new Exception();
  +            throw new Exception(JavaUtils.getMessage("noBody00"));
           }
           String methodName = body.getMethodName();
           Vector args = body.getParams();
  
  
  
  1.114     +5 -3      xml-axis/java/src/org/apache/axis/utils/Admin.java
  
  Index: Admin.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Admin.java,v
  retrieving revision 1.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- Admin.java	10 Jun 2002 23:45:55 -0000	1.113
  +++ Admin.java	19 Jun 2002 16:13:17 -0000	1.114
  @@ -290,9 +290,11 @@
               log.error( "<list/>" );
   
   
  -            // throw an Exception which will go uncaught!  this way, a test suite
  -            // can invoke main() and detect the exception
  -            throw new IllegalArgumentException();
  +            // throw an Exception which will go uncaught!  this way, a test
  +            // suite can invoke main() and detect the exception
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage("usage00", 
  +                                         "Admin client|server <xml-file>"));
               // System.exit( 1 );
           }
   
  
  
  
  1.4       +11 -3     xml-axis/java/src/org/apache/axis/utils/BeanPropertyDescriptor.java
  
  Index: BeanPropertyDescriptor.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/BeanPropertyDescriptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BeanPropertyDescriptor.java	17 Jun 2002 19:25:40 -0000	1.3
  +++ BeanPropertyDescriptor.java	19 Jun 2002 16:13:18 -0000	1.4
  @@ -101,7 +101,11 @@
           getter = _getter;
           setter = _setter;
           if (_getter == null || _setter == null || _name == null) {
  -            throw new IllegalArgumentException();
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage(_getter == null ?
  +                                         "badGetter00" :
  +                                         (_setter == null ?
  +                                         "badSetter00" : "badProp03")));
           }
       }
   
  @@ -123,7 +127,9 @@
           getterIndexed = _getterIndexed;
           setterIndexed = _setterIndexed;
           if (_getterIndexed == null || _setterIndexed == null) {
  -            throw new IllegalArgumentException();
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage(_getterIndexed == null ?
  +                                         "badAccessor00" : "badModifier00"));
           }
       }
   
  @@ -138,7 +144,9 @@
           name = _name;
           field = _field;
           if (_field == null || _name == null) {
  -            throw new IllegalArgumentException();
  +            throw new IllegalArgumentException(
  +                    JavaUtils.getMessage(_field == null ?
  +                                         "badField00" : "badProp03"));
           }
       }
       
  
  
  
  1.49      +6 -5      xml-axis/java/src/org/apache/axis/utils/JavaUtils.java
  
  Index: JavaUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/JavaUtils.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- JavaUtils.java	14 Jun 2002 18:36:15 -0000	1.48
  +++ JavaUtils.java	19 Jun 2002 16:13:18 -0000	1.49
  @@ -809,13 +809,13 @@
        */
       public static Object getHolderValue(Object holder) throws HolderException {
           if (!(holder instanceof javax.xml.rpc.holders.Holder)) {
  -            throw new HolderException();
  +            throw new HolderException(getMessage("badHolder00"));
           }
           try {
               Field valueField = holder.getClass().getField("value");
               return valueField.get(holder);
           } catch (Exception e) {
  -            throw new HolderException();
  +          throw new HolderException(getMessage("exception01", e.getMessage()));
           }
       }
   
  @@ -826,7 +826,7 @@
        */
       public static void setHolderValue(Object holder, Object value) throws HolderException
{
           if (!(holder instanceof javax.xml.rpc.holders.Holder)) {
  -            throw new HolderException();
  +            throw new HolderException(getMessage("badHolder00"));
           }
           try {
               Field valueField = holder.getClass().getField("value");
  @@ -839,12 +839,13 @@
                   valueField.set(holder, value);
               }
           } catch (Exception e) {
  -            throw new HolderException();
  +          throw new HolderException(getMessage("exception01", e.getMessage()));
           }
       }
       public static class HolderException extends Exception
       {
  -        public HolderException () {}
  +        private HolderException () {}
  +        public HolderException(String msg) { super(msg); }
       };
   
   
  
  
  
  1.10      +29 -0     xml-axis/java/src/org/apache/axis/utils/axisNLS.properties
  
  Index: axisNLS.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/axisNLS.properties,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- axisNLS.properties	18 Jun 2002 21:26:38 -0000	1.9
  +++ axisNLS.properties	19 Jun 2002 16:13:18 -0000	1.10
  @@ -43,6 +43,7 @@
   badDateTime00=Invalid date/time
   badElem00=Invalid element in {0} - {1}
   badHandlerClass00=Class ''{0}'' is not a Handler (can't be used in HandlerProvider)!
  +badHolder00=Holder of wrong type.
   badInteger00=Explicit array length is not a valid integer ''{0}''.
   
   # NOTE:  in badMsgCtx00, do not translate "--messageContext", "--skeleton"
  @@ -52,6 +53,8 @@
   badNamespace00=Bad envelope namespace:  {0}
   badOffset00=Malformed offset attribute ''{0}''.
   badpackage00=Error: --NStoPKG and --package switch can't be used together
  +# NOTE:  in badParmMode00, do not translate "Parameter".
  +badParmMode00=Invalid Parameter mode {0}.
   badPosition00=Malformed position attribute ''{0}''.
   badProxy00=Proxy port number, "{0}", incorrectly formatted
   
  @@ -222,6 +225,7 @@
   gotResponse00=Got response message
   gotType00={0} got type {1}
   gotValue00={0} got value {1}
  +handlerRegistryConfig=Service does not support configuration of a HandlerRegistry 
   headers00=headers
   headerPresent=Header already present
   
  @@ -275,6 +279,9 @@
   # NOTE:  in noBeanHome00, do not translate "EJBProvider"
   noBeanHome00=EJBProvider cannot get Bean Home
   
  +# NOTE:  in noBody00, do not translate "Body"
  +noBody00=Body not found.
  +
   noChains00=Services must use targeted chains
   noClass00=Could not create class {0}
   
  @@ -434,6 +441,7 @@
   nullEJBUser00=Null user in EJBProvider
   
   nullHandler00={0}:  Null handler;
  +nullNamespaceURI=Null namespace URI specified.
   nullParent00=null parent!
   
   nullProvider00=Null provider type passed to WSDDProvider!
  @@ -685,6 +693,19 @@
   badProp00=Bad property.  The value for {0} should be of type {1}, but it is of type {2}.
   badProp01=Bad property.  {0} should be {1}; but it is {2}.
   badProp02=Cannot set {0} property when {1} property is not {2}.
  +badProp03=Null property name specified.
  +badProp04=Null property value specified.
  +badProp05=Property name {0} not supported.
  +badGetter00=Null getter method specified.
  +badAccessor00=Null accessor method specified.
  +badSetter00=Null setter method specified.
  +badModifier00=Null modifier method specified.
  +badField00=Null public instance field specified.
  +
  +badJavaType=Null java class specified.
  +badXmlType=Null qualified name specified.
  +badSerFac=Null serializer factory specified.
  +badDeserFac=Null deserializer factory specified.
   
   literalTypePart00=Error: Message part {0} of operation or fault {1} is specified as a type
and the soap:body use of binding "{2}" is literal.  This WSDL is not currently supported.
   BadServiceName00=Error: Empty or missing service name
  @@ -707,7 +728,9 @@
   noCompiler00=Compiler found in your classpath.  Make sure you added 'tools.jar'
   compilerFail00=Please ensure that you have your JDK's rt.jar listed in your classpath.
Jikes needs it to operate.
   
  +nullFieldDesc=Null FieldDesc specified
   exception00=Exception:
  +exception01=Exception: {0}
   axisConfigurationException00=ConfigurationException:
   parserConfigurationException00=ParserConfigurationException:
   SAXException00=SAXException:
  @@ -787,6 +810,8 @@
   noMoreTokens=no more tokens - could not parse error message:  {0}
   cantParse=could not parse error message:  {0}
   
  +noParmAndRetReq=Parameter or return type inferred from WSDL and may not be updated.
  +
   # NOTE:  in sunJavac, do not translate "Sun Javac"
   sunJavac=Sun Javac Compiler
   
  @@ -813,6 +838,10 @@
   # NOTE:  in noUse, do no translate "soap:operation", "binding operation", "use".
   noUse=The soap:operation for binding operation {0} must have a "use" attribute.
   
  +fixedTypeMapping=Default type mapping cannot be modified.
  +delegatedTypeMapping=Type mapping cannot be modified via delegate.
  +badTypeMapping=Invalid TypeMapping specified: wrong type or null.
  +defaultTypeMappingSet=Default type mapping from secondary type mapping registry is already
in use.
   getPortDoc00=For the given interface, get the stub implementation.
   getPortDoc01=If this service has no port for the given interface,
   getPortDoc02=then ServiceException is thrown.
  
  
  
  1.9       +2 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java
  
  Index: JavaGeneratorFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JavaGeneratorFactory.java	11 Jun 2002 14:54:01 -0000	1.8
  +++ JavaGeneratorFactory.java	19 Jun 2002 16:13:18 -0000	1.9
  @@ -303,7 +303,8 @@
                       gen = (Generator) ctor.newInstance(actualArgs);
                   }
                   catch (Throwable t) {
  -                    throw new IOException();
  +                    throw new IOException(
  +                        JavaUtils.getMessage("exception01", t.getMessage()));
                   }
                   gen.generate();
               }
  
  
  
  1.31      +5 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java
  
  Index: JavaSkelWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- JavaSkelWriter.java	11 Jun 2002 14:54:01 -0000	1.30
  +++ JavaSkelWriter.java	19 Jun 2002 16:13:18 -0000	1.31
  @@ -81,6 +81,8 @@
   import org.apache.axis.wsdl.symbolTable.SymbolTable;
   import org.apache.axis.wsdl.symbolTable.TypeEntry;
   
  +import org.apache.axis.utils.JavaUtils;
  +
   /**
   * This is Wsdl2java's skeleton writer.  It writes the <BindingName>Skeleton.java
   * file which contains the <bindingName>Skeleton class.
  @@ -171,7 +173,9 @@
                               modeStr = "org.apache.axis.description.ParameterDesc.INOUT";
                               break;
                           default:
  -                            throw new IOException();
  +                            throw new IOException(
  +                                JavaUtils.getMessage("badParmMode00", 
  +                                        (new Byte(p.getMode())).toString()));
                       }
                       // Construct a parameter with the parameter name, mode, type qname
                       // a type javaType.
  
  
  
  1.7       +24 -0     xml-axis/java/test/utils/TestSrcContent.java
  
  Index: TestSrcContent.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/utils/TestSrcContent.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestSrcContent.java	19 Mar 2002 15:42:02 -0000	1.6
  +++ TestSrcContent.java	19 Jun 2002 16:13:19 -0000	1.7
  @@ -37,6 +37,8 @@
    * - Verify that log.info(), log.warn(), log.error(), and log.fatal()
    *   use JavaUtils.getMessage() (i18n).
    *
  + * - Verify that exceptions are created with JavaUtils.getMessage() (i18n).
  + *
    * To add new patterns, search for and append to the
    * private attribute 'avoidPatterns'.
    *
  @@ -185,6 +187,28 @@
                                          "log\\.(info|warn|error|fatal)"
                                          + "[ \\t]*\\("
                                          + "(?![ \\t]*JavaUtils\\.getMessage)",
  +                                       false),
  +
  +            // Verify that exceptions are built with messages.
  +
  +            new FileNameContentPattern(".+([\\\\/])"
  +                                       + "java\\1src\\1org\\1apache\\1axis\\1"
  +                                       + "([a-zA-Z0-9_]+\\1)*"
  +                                       + "[^\\\\/]+\\.java",
  +                                       "new[ \\t]+[a-zA-Z0-9_]*"
  +                                       + "Exception\\(\\)",
  +                                       false),
  +
  +            // Verify that we don't explicitly create NPEs.
  +            // NPE in TypeDesc needs removing.
  +
  +            new FileNameContentPattern(".+([\\\\/])"
  +                                       + "java\\1src\\1org\\1apache\\1axis\\1"
  +                                       + "(?!description\\1TypeDesc\\.java)"
  +                                       + "([a-zA-Z0-9_]+\\1)*"
  +                                       + "[^\\\\/]+\\.java",
  +                                       "new[ \\t]+"
  +                                       + "NullPointerException",
                                          false),
   
           };
  
  
  

Mime
View raw message