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

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


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

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


        properties.put(WSHandlerConstants.SIG_PROP_FILE, "alice.properties");
       
        WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties);
        client.getOutInterceptors().add(ohandler);

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

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

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

        properties.put(WSHandlerConstants.SIG_PROP_FILE, "alice.properties");
       
        WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties);
        client.getOutInterceptors().add(ohandler);

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

       
        WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(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 testSaml2TokenHOK() throws Exception {
        // Create + configure service
View Full Code Here

       
        WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(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
        }
        validator.setRequireSenderVouches(false);
View Full Code Here

            // expected
        }
        validator.setRequireSenderVouches(false);
       
        try {
            echo.echo("test");
            fail("Failure expected on receiving a SAML 1.1 Token instead of SAML 2.0");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            // expected
        }
        validator.setRequireSAML1Assertion(false);
View Full Code Here

        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            // expected
        }
        validator.setRequireSAML1Assertion(false);

        assertEquals("test", echo.echo("test"));
    }
   
   
    private Service createService() {
        // Create the Service
View Full Code Here

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

        assertEquals("test", echo.echo("test"));
    }
   
    @Test
    public void testSaml1Config() throws Exception {
        // Create + configure service
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.