Package org.apache.cxf.ws.security.wss4j

Examples of org.apache.cxf.ws.security.wss4j.Echo.echo()


        outConfig.put(ConfigurationConstants.SAML_CALLBACK_REF, new SAML1CallbackHandler());
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
       
        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
   
    @Test
    public void testSaml1SignedSenderVouches() throws Exception {
        // Create + configure service
View Full Code Here


        );
       
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
   
    @Test
    public void testSaml1SignedSenderVouchesConfig() throws Exception {
        // Create + configure service
View Full Code Here

        outConfig.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);

        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
   
    @Test
    public void testSaml2() throws Exception {
        // Create + configure service
View Full Code Here

        properties.setSamlCallbackHandler(new SAML2CallbackHandler());
       
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
   
    @Test
    public void testSaml2Config() throws Exception {
        // Create + configure service
View Full Code Here

        outConfig.put(ConfigurationConstants.SAML_CALLBACK_REF, new SAML2CallbackHandler());
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);

        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
   
    @Test
    public void testSaml2SignedSenderVouches() throws Exception {
        // Create + configure service
View Full Code Here

        );
       
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
   
    @Test
    public void testSaml2SignedSenderVouchesConfig() throws Exception {
        // Create + configure service
View Full Code Here

        outConfig.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);

        client.getOutInterceptors().add(ohandler);

        assertEquals("test", echo.echo("test"));
    }
   
    @Test
    public void testSaml1TokenHOK() throws Exception {
        // Create + configure service
View Full Code Here

       
        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
        client.getOutInterceptors().add(ohandler);
       
        try {
            echo.echo("test");
            fail("Failure expected on receiving sender vouches instead of HOK");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            // expected
        }
View Full Code Here

        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            // expected
        }

        validator.setRequireSenderVouches(false);
        assertEquals("test", echo.echo("test"));
    }
   
    @Test
    public void testSaml1TokenHOKConfig() throws Exception {
        // Create + configure service
View Full Code Here

        WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
       
        client.getOutInterceptors().add(ohandler);
       
        try {
            echo.echo("test");
            fail("Failure expected on receiving sender vouches instead of HOK");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            // expected
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.