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");
         }

_______________________________________________
Mashup-dev mailing list
Mashup-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to