[Mashup-dev] svn commit r18809 -
trunk/mashup/java/modules/admin/service/src/org/wso2/mashup/admin/service
keith at wso2.com
keith at wso2.com
Wed Jul 2 22:32:11 PDT 2008
Author: keith
Date: Wed Jul 2 22:32:10 2008
New Revision: 18809
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=18809
Log:
Getting rid of the deprecated method and using the new one
Modified:
trunk/mashup/java/modules/admin/service/src/org/wso2/mashup/admin/service/MashupLoginServiceUT.java
Modified: trunk/mashup/java/modules/admin/service/src/org/wso2/mashup/admin/service/MashupLoginServiceUT.java
URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/admin/service/src/org/wso2/mashup/admin/service/MashupLoginServiceUT.java?rev=18809&r1=18808&r2=18809&view=diff
==============================================================================
--- trunk/mashup/java/modules/admin/service/src/org/wso2/mashup/admin/service/MashupLoginServiceUT.java (original)
+++ trunk/mashup/java/modules/admin/service/src/org/wso2/mashup/admin/service/MashupLoginServiceUT.java Wed Jul 2 22:32:10 2008
@@ -25,6 +25,7 @@
import org.wso2.mashup.MashupFault;
import java.util.Vector;
+import java.security.Principal;
public class MashupLoginServiceUT {
@@ -57,7 +58,12 @@
throw new MashupFault("Username not present in the request results");
}
- String username = ((WSSecurityEngineResult)((WSHandlerResult)results.get(0)).getResults().get(1)).getPrincipal().getName();
+ WSHandlerResult result = (WSHandlerResult) results.get(0);
+ WSSecurityEngineResult wsSecurityEngineResult =
+ (WSSecurityEngineResult) result.getResults().get(1);
+ String username =
+ ((Principal) wsSecurityEngineResult.get(WSSecurityEngineResult.TAG_PRINCIPAL))
+ .getName();
if (username == null) {
throw new MashupFault("Username not present in the request results");
}
More information about the Mashup-dev
mailing list