Author: azeez Date: Thu Jun 4 10:45:36 2009 New Revision: 37801 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=37801
Log: Updates to suit that changes to the security component Modified: trunk/wsas/java/modules/samples/CommodityQuote/src/org/wso2/wsas/sample/commodityquote/client/Client.java Modified: trunk/wsas/java/modules/samples/CommodityQuote/src/org/wso2/wsas/sample/commodityquote/client/Client.java URL: http://wso2.org/svn/browse/wso2/trunk/wsas/java/modules/samples/CommodityQuote/src/org/wso2/wsas/sample/commodityquote/client/Client.java?rev=37801&r1=37800&r2=37801&view=diff ============================================================================== --- trunk/wsas/java/modules/samples/CommodityQuote/src/org/wso2/wsas/sample/commodityquote/client/Client.java (original) +++ trunk/wsas/java/modules/samples/CommodityQuote/src/org/wso2/wsas/sample/commodityquote/client/Client.java Thu Jun 4 10:45:36 2009 @@ -384,6 +384,21 @@ while (true) { System.out.println("Enter security scenario number [1 - 15]..."); + System.out.println(" 1. UsernameToken\n" + + " 2. Non-repudiation\n" + + " 3. Integrity \t\n" + + " 4. Confidentiality \n" + + " 5. Sign and encrypt - X509 Authentication\n" + + " 6. Sign and Encrypt - Anonymous clients \n" + + " 7. Encrypt only - Username Token Authentication \n" + + " 8. Sign and Encrypt - Username Token Authentication\n" + + " 9. SecureConversation - Sign only - Service as STS - Bootstrap policy - Sign and Encrypt , X509 Authentication\n" + + "10. SecureConversation - Encrypt only - Service as STS - Bootstrap policy - Sign and Encrypt , X509 Authentication\n" + + "11. SecureConversation - Sign and Encrypt - Service as STS - Bootstrap policy - Sign and Encrypt , X509 Authentication \n" + + "12. SecureConversation - Sign Only - Service as STS - Bootstrap policy - Sign and Encrypt , Anonymous clients \t\n" + + "13. SecureConversation - Encrypt Only - Service as STS - Bootstrap policy - Sign and Encrypt , Anonymous clients \t\n" + + "14. SecureConversation - Encrypt Only - Service as STS - Bootstrap policy - Sign and Encrypt , Username Token Authentication \t\n" + + "15. SecureConversation - Sign and Encrypt - Service as STS - Bootstrap policy - Sign and Encrypt , Username Token Authentication \n"); String temp = readOption(); scenarioNumber = Integer.parseInt(temp); try { @@ -394,7 +409,7 @@ } } catch (NumberFormatException e) { System.out.println( - "Invalid value has been entered. Please select a value between [1 16]"); + "Invalid value has been entered. Please select a value between [1 - 15]"); } } @@ -405,12 +420,12 @@ epr.setAddress(serviceEPR); stub._getServiceClient().getOptions().setTo(epr); configureUtSec(stub, scenarioNumber); - } else if (scenarioNumber == 7 || scenarioNumber == 8 || scenarioNumber == 14 ||scenarioNumber == 15){ - // Use HTTP EPR WITH USER + } else if (scenarioNumber == 6 || scenarioNumber == 7 || scenarioNumber == 9 ||scenarioNumber == 13){ + // Use HTTP EPR WITH USER + Keystore config configureUtKeystoreSec(stub, scenarioNumber); } else { - // Use HTTP EPR - configurekeystoreSec(stub, scenarioNumber); + // Use HTTP EPR with Keystore config + configureKeystoreSec(stub, scenarioNumber); } return scenarioNumber; } @@ -451,7 +466,7 @@ } - private void configurekeystoreSec(Stub stub, int scenario) throws FileNotFoundException, + private void configureKeystoreSec(Stub stub, int scenario) throws FileNotFoundException, XMLStreamException { System.out.println( "In this demonstration, client will use client.jks and server should use\n" + _______________________________________________ Wsas-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev
