You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by ks...@apache.org on 2010/03/16 19:44:40 UTC

svn commit: r923930 - /webservices/juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/DispositionReportFaultMessage.java

Author: kstam
Date: Tue Mar 16 18:44:40 2010
New Revision: 923930

URL: http://svn.apache.org/viewvc?rev=923930&view=rev
Log:
JUDDI-370, handling DispositionReportFaultMessage

Modified:
    webservices/juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/DispositionReportFaultMessage.java

Modified: webservices/juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/DispositionReportFaultMessage.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/DispositionReportFaultMessage.java?rev=923930&r1=923929&r2=923930&view=diff
==============================================================================
--- webservices/juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/DispositionReportFaultMessage.java (original)
+++ webservices/juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/DispositionReportFaultMessage.java Tue Mar 16 18:44:40 2010
@@ -18,6 +18,7 @@
 
 package org.uddi.v3_service;
 
+import java.lang.reflect.UndeclaredThrowableException;
 import java.rmi.RemoteException;
 
 import javax.xml.bind.JAXBException;
@@ -25,6 +26,7 @@ import javax.xml.soap.Detail;
 import javax.xml.ws.WebFault;
 import javax.xml.ws.soap.SOAPFaultException;
 
+import org.apache.juddi.v3.error.InvalidKeyPassedException;
 import org.apache.log4j.Logger;
 import org.uddi.api_v3.DispositionReport;
 
@@ -79,12 +81,10 @@ public class DispositionReportFaultMessa
     
     /** 
      * Convenience method to figure out if the Exception at hand contains a
-     * DispositionReport.
+     * DispositionReport. Disposition report will be null if none can be found.
      * 
      * @param e the Exception at hang
-     * @return DispositionReport if one can be found.
-     * @throws Exception, throws exception passed in back out if no DispositionReport is
-     * found.
+     * @return DispositionReport if one can be found, or null if it is not.
      */
     public static DispositionReport getDispositionReport(Exception e) {
     	DispositionReport report = null;
@@ -101,7 +101,16 @@ public class DispositionReportFaultMessa
     				log.error("Could not unmarshall detail to a DispositionReport");
     			}
     		}
-    	} //We might have to catch yet another type of Exception for RMI transport.
+    	} else if (e instanceof UndeclaredThrowableException) {
+    		UndeclaredThrowableException ute =(UndeclaredThrowableException) e;
+    		if (ute.getUndeclaredThrowable().getCause() instanceof InvalidKeyPassedException) {
+	    		InvalidKeyPassedException ike = (InvalidKeyPassedException) ute.getUndeclaredThrowable().getCause();
+	    		report = ike.getFaultInfo();
+    		}
+    	} else {
+    		log.error("Unsupported Exception: " + e.getClass());
+    	}
+    	//We might have to catch yet another type of Exception for RMI transport.
     	return report;
     }
 }



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