Author: nandana Date: Fri Oct 3 01:57:05 2008 New Revision: 22209 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=22209
Log: we want provide xkms url and the pass phrase when running the xkms sample Modified: trunk/wsas/java/modules/samples/XKMS/src/org/wso2/wsas/sample/xkms/recover/RecoverServiceDemo.java Modified: trunk/wsas/java/modules/samples/XKMS/src/org/wso2/wsas/sample/xkms/recover/RecoverServiceDemo.java URL: http://wso2.org/svn/browse/wso2/trunk/wsas/java/modules/samples/XKMS/src/org/wso2/wsas/sample/xkms/recover/RecoverServiceDemo.java?rev=22209&r1=22208&r2=22209&view=diff ============================================================================== --- trunk/wsas/java/modules/samples/XKMS/src/org/wso2/wsas/sample/xkms/recover/RecoverServiceDemo.java (original) +++ trunk/wsas/java/modules/samples/XKMS/src/org/wso2/wsas/sample/xkms/recover/RecoverServiceDemo.java Fri Oct 3 01:57:05 2008 @@ -28,6 +28,7 @@ import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.impl.dom.DOOMAbstractFactory; import org.apache.xml.security.keys.KeyInfo; +import org.wso2.wsas.sample.xkms.demo.XKMSServiceDemo; import org.wso2.wsas.sample.xkms.utils.Utils; import org.wso2.xkms2.Authentication; import org.wso2.xkms2.KeyBinding; @@ -44,9 +45,6 @@ import org.wso2.xkms2.util.XKMSKeyUtil; public class RecoverServiceDemo { - - private static String XKMS_SERVICE_URL = "http://127.0.0.1:9762/services/xkms"; - private static String PASS_PHRASE = "secret"; static { org.apache.xml.security.Init.init(); @@ -55,10 +53,10 @@ public static void main(String[] args) throws Exception { RecoverRequest request = Utils.createRecoverRequest(); - request.setServiceURI(XKMS_SERVICE_URL); + request.setServiceURI(XKMSServiceDemo.XKMS_SERVICE_URL); Authentication authentication = new Authentication(); - Key authenKey = XKMSKeyUtil.getAuthenticationKey(PASS_PHRASE); + Key authenKey = XKMSKeyUtil.getAuthenticationKey(XKMSServiceDemo.PASS_PHRASE); authentication.setKeyBindingAuthenticationKey(authenKey); request.setAuthentication(authentication); @@ -76,7 +74,7 @@ request.addRespondWith(RespondWith.PRIVATE_KEY); OMElement element = getAsOMElement(request); - OMElement result = Utils.sendReceive(element, XKMS_SERVICE_URL); + OMElement result = Utils.sendReceive(element, XKMSServiceDemo.XKMS_SERVICE_URL); result = Utils.buildElement(result); RecoverResult recoverResult = getRecoverResult(result); _______________________________________________ Wsas-java-dev mailing list [email protected] http://mailman.wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev
