Package org.apache.cxf.systest.ws.saml.client

Examples of org.apache.cxf.systest.ws.saml.client.SamlRoleCallbackHandler


            fail("Failure expected as Assertion doesn't contain Role information");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            // expected
        }
       
        SamlRoleCallbackHandler roleCallbackHandler =
            new SamlRoleCallbackHandler();
        roleCallbackHandler.setRoleName("manager");
        ((BindingProvider)saml2Port).getRequestContext().put(
            "ws-security.saml-callback-handler", roleCallbackHandler
        );
       
        int result = saml2Port.doubleIt(25);
        assertTrue(result == 50);
       
        // Expected failure on incorrect role
        roleCallbackHandler.setRoleName("boss");
        try {
            saml2Port.doubleIt(25);
            fail("Failure expected as Assertion doesn't contain correct role");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            // expected
View Full Code Here

TOP

Related Classes of org.apache.cxf.systest.ws.saml.client.SamlRoleCallbackHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.