You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by sa...@apache.org on 2012/05/21 13:17:54 UTC
svn commit: r1340970 - in /axis/axis2/java/core/trunk/modules:
jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java
metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
Author: sagara
Date: Mon May 21 11:17:54 2012
New Revision: 1340970
URL: http://svn.apache.org/viewvc?rev=1340970&view=rev
Log:
Applied patch for AXIS2-5323.
Modified:
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
Modified: axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java?rev=1340970&r1=1340969&r2=1340970&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java (original)
+++ axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java Mon May 21 11:17:54 2012
@@ -31,7 +31,10 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.xml.ws.WebServiceException;
+
import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
@@ -70,11 +73,17 @@ class LegacyExceptionUtil {
private static Set<String> ignore = new HashSet<String>();
static {
- // Per Chap 3.7 rule 3, ignore these properties on the exception
- ignore.add("localizedMessage");
- ignore.add("stackTrace");
- ignore.add("class");
- ignore.add("cause");
+ // Per Chap 3.7 rule 3, ignore these properties from java.lang.Throwable hierarchy except the message property
+ try {
+ for (PropertyDescriptor pd : Introspector.getBeanInfo(Throwable.class).getPropertyDescriptors()) {
+ if (pd.getName().equals("message")) {
+ continue;
+ }
+ ignore.add(pd.getName());
+ }
+ } catch (IntrospectionException e) {
+ log.error(Messages.getMessage("faultProcessingExcludedExceptionProperties", e.getMessage()), e);
+ }
}
/** Static class. Constructor is intentionally private */
Modified: axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties?rev=1340970&r1=1340969&r2=1340970&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties (original)
+++ axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties Mon May 21 11:17:54 2012
@@ -306,4 +306,5 @@ axisEndpointReferenceFactoryErr2=Cannot
dispatchInvalidTypeWithMode=Unsupported Dispatch Type: Dispatch type javax.xml.soap.SOAPMessage cannot be used with messages in Payload mode.
serviceDelegateConstruct2=An attempt was made to construct the ServiceDelegate object with the {0} service and with WebServicesFeatures, but there are no standard features defined for service creation in the current specification.
MethodRetrieverWarning1=Public method {0} will be exposed as a Web Service operation per JAX-WS 2.2 tooling rules. If you intend to expose only operations that have @WebMethod annotation, set the manifest property ''LegacyWebmethod: true'' or set a JVM property ''jaxws.runtime.legacyWebMethod=true''.
-generateWSDLNonSoap11=This implementation does not contain a WSDL definition and is not a SOAP 1.1 based binding. Per the JAXWS specification, a WSDL definition cannot be generated for this implementation. The implementation class name is {0}
\ No newline at end of file
+generateWSDLNonSoap11=This implementation does not contain a WSDL definition and is not a SOAP 1.1 based binding. Per the JAXWS specification, a WSDL definition cannot be generated for this implementation. The implementation class name is {0}
+faultProcessingExcludedExceptionProperties=Excluded exception properties processing failed. The reported error is: {0}.
\ No newline at end of file