Package wssec.saml

Examples of wssec.saml.DoubleItPortType.doubleIt()


       
        ((BindingProvider)saml1Port).getRequestContext().put(
            "ws-security.saml-callback-handler", new SamlCallbackHandler()
        );
        try {
            saml1Port.doubleIt(BigInteger.valueOf(25));
            fail("Expected failure on an invocation with a SAML2 Assertion");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            assert ex.getMessage().contains("Wrong SAML Version");
        }
View Full Code Here


        }

        ((BindingProvider)saml1Port).getRequestContext().put(
            "ws-security.saml-callback-handler", new SamlCallbackHandler(false)
        );
        BigInteger result = saml1Port.doubleIt(BigInteger.valueOf(25));
        assert result.equals(BigInteger.valueOf(50));
    }
   
    @org.junit.Test
    public void testSaml2OverSymmetric() throws Exception {
View Full Code Here

        DoubleItService service = new DoubleItService();
       
        DoubleItPortType saml2Port = service.getDoubleItSaml2SymmetricPort();
      
        try {
            saml2Port.doubleIt(BigInteger.valueOf(25));
            fail("Expected failure on an invocation with no SAML Assertion");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            assert ex.getMessage().contains("No SAML CallbackHandler available");
        }
       
View Full Code Here

       
        ((BindingProvider)saml2Port).getRequestContext().put(
            "ws-security.saml-callback-handler", new SamlCallbackHandler(false)
        );
        try {
            saml2Port.doubleIt(BigInteger.valueOf(25));
            fail("Expected failure on an invocation with a SAML1 Assertion");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            assert ex.getMessage().contains("Wrong SAML Version");
        }
       
View Full Code Here

        }
       
        ((BindingProvider)saml2Port).getRequestContext().put(
            "ws-security.saml-callback-handler", new SamlCallbackHandler()
        );
        BigInteger result = saml2Port.doubleIt(BigInteger.valueOf(25));
        assert result.equals(BigInteger.valueOf(50));
    }
   
    /**
     * Some negative tests. Send a sender-vouches assertion as a SupportingToken...this will
View Full Code Here

        ((BindingProvider)saml2Port).getRequestContext().put(
            "ws-security.saml-callback-handler", new SamlCallbackHandler()
        );
       
        try {
            saml2Port.doubleIt(BigInteger.valueOf(25));
            fail("Expected failure on an invocation with an unsigned SAML SV Assertion");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            assert ex.getMessage().contains("Assertion fails sender-vouches requirements");
        }
    }
View Full Code Here

        DoubleItService service = new DoubleItService();
       
        DoubleItPortType saml2Port = service.getDoubleItSaml2AsymmetricPort();
       
        try {
            saml2Port.doubleIt(BigInteger.valueOf(25));
            fail("Expected failure on an invocation with no SAML Assertion");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            assert ex.getMessage().contains("No SAML CallbackHandler available");
        }
       
View Full Code Here

       
        ((BindingProvider)saml2Port).getRequestContext().put(
            "ws-security.saml-callback-handler", new SamlCallbackHandler(false)
        );
        try {
            saml2Port.doubleIt(BigInteger.valueOf(25));
            fail("Expected failure on an invocation with a SAML1 Assertion");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            assert ex.getMessage().contains("Wrong SAML Version");
        }
       
View Full Code Here

        }
       
        ((BindingProvider)saml2Port).getRequestContext().put(
            "ws-security.saml-callback-handler", new SamlCallbackHandler()
        );
        BigInteger result = saml2Port.doubleIt(BigInteger.valueOf(25));
        assert result.equals(BigInteger.valueOf(50));
    }
   
    @org.junit.Test
    public void testSaml1SelfSignedOverTransport() throws Exception {
View Full Code Here

        DoubleItPortType saml1Port = service.getDoubleItSaml1SelfSignedTransportPort();
       
        ((BindingProvider)saml1Port).getRequestContext().put(
            "ws-security.saml-callback-handler", new SamlCallbackHandler(false)
        );
        BigInteger result = saml1Port.doubleIt(BigInteger.valueOf(25));
        assert result.equals(BigInteger.valueOf(50));
    }
   
    @org.junit.Test
    @org.junit.Ignore
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.