axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ngalla...@apache.org
Subject svn commit: r483571 - in /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws: BindingProvider.java client/PropertyValidator.java i18n/resource.properties
Date Thu, 07 Dec 2006 17:50:45 GMT
Author: ngallardo
Date: Thu Dec  7 09:50:44 2006
New Revision: 483571

URL: http://svn.apache.org/viewvc?view=rev&rev=483571
Log:
Added a better error message.

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyValidator.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java?view=diff&rev=483571&r1=483570&r2=483571
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
Thu Dec  7 09:50:44 2006
@@ -170,7 +170,9 @@
                 return super.put(key, value);
             }
             else {
-                throw ExceptionFactory.makeWebServiceException("Bad Property");
+                throw ExceptionFactory.makeWebServiceException(
+                        Messages.getMessage("invalidPropValue", key, value.getClass().getName(),

+                                PropertyValidator.getExpectedValue(key).getName()));
             }
         }
     }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyValidator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyValidator.java?view=diff&rev=483571&r1=483570&r2=483571
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyValidator.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyValidator.java
Thu Dec  7 09:50:44 2006
@@ -55,4 +55,8 @@
         
         return true;
     }
+    
+    public static Class getExpectedValue(String key) {
+        return map.get(key);
+    }
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties?view=diff&rev=483571&r1=483570&r2=483571
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties
Thu Dec  7 09:50:44 2006
@@ -138,4 +138,5 @@
 SchemaReaderErr1=Invlid wsdl Definition provided.
 SchemaReaderErr2=Circular Dependency Found in WSDL Schema Imports, Two Schemas are importing
each other.
 XSDListNotSupported=An attempt was made to marshal or unmarshal an xsd:list with a component
type that is a {0}.  This scenario is not supported for rpc/literal processing.  Please use
document/literal processing
-dispatchBadDOMSource=An invalid DOMSource was encountered during Dispatch.  Please use a
DOMSource that contains a Node.
\ No newline at end of file
+dispatchBadDOMSource=An invalid DOMSource was encountered during Dispatch.  Please use a
DOMSource that contains a Node.
+invalidPropValue=The value of property {0} was invalid.  {1} does not match expected type
{2}.  
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message