Return-Path: Delivered-To: apmail-ws-juddi-cvs-archive@www.apache.org Received: (qmail 35251 invoked from network); 16 Mar 2010 18:45:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Mar 2010 18:45:05 -0000 Received: (qmail 62085 invoked by uid 500); 16 Mar 2010 18:45:02 -0000 Delivered-To: apmail-ws-juddi-cvs-archive@ws.apache.org Received: (qmail 61903 invoked by uid 500); 16 Mar 2010 18:45:02 -0000 Mailing-List: contact juddi-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list juddi-cvs@ws.apache.org Received: (qmail 61797 invoked by uid 99); 16 Mar 2010 18:45:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Mar 2010 18:45:02 +0000 X-ASF-Spam-Status: No, hits=-1022.1 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Mar 2010 18:45:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D78162388A32; Tue, 16 Mar 2010 18:44:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r923930 - /webservices/juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/DispositionReportFaultMessage.java Date: Tue, 16 Mar 2010 18:44:40 -0000 To: juddi-cvs@ws.apache.org From: kstam@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100316184440.D78162388A32@eris.apache.org> 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