Examples of DoubleItPortType


Examples of org.example.contract.doubleit.DoubleItPortType

        SpringBusFactory.setThreadDefaultBus(bus);

        URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
        Service service = Service.create(wsdl, SERVICE_QNAME);
        QName portQName = new QName(NAMESPACE, "DoubleItSaml2EndorsingTransportPort");
        DoubleItPortType saml2Port =
                service.getPort(portQName, DoubleItPortType.class);
        updateAddressPort(saml2Port, PORT2);
       
        SamlCallbackHandler callbackHandler = new SamlCallbackHandler();
        callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
        callbackHandler.setKeyInfoIdentifier(CERT_IDENTIFIER.KEY_VALUE);
        ((BindingProvider)saml2Port).getRequestContext().put(
            "ws-security.saml-callback-handler", callbackHandler
        );

        int result = saml2Port.doubleIt(25);
        assertTrue(result == 50);
       
        ((java.io.Closeable)saml2Port).close();
        bus.shutdown(true);
    }
View Full Code Here

Examples of org.example.contract.doubleit.DoubleItPortType

        SpringBusFactory.setThreadDefaultBus(bus);

        URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
        Service service = Service.create(wsdl, SERVICE_QNAME);
        QName portQName = new QName(NAMESPACE, "DoubleItSaml2EndorsingTransportSP11Port");
        DoubleItPortType saml2Port =
                service.getPort(portQName, DoubleItPortType.class);
        updateAddressPort(saml2Port, PORT2);
       
        SamlCallbackHandler callbackHandler = new SamlCallbackHandler();
        callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
        ((BindingProvider)saml2Port).getRequestContext().put(
            "ws-security.saml-callback-handler", callbackHandler
        );

        int result = saml2Port.doubleIt(25);
        assertTrue(result == 50);
       
        ((java.io.Closeable)saml2Port).close();
        bus.shutdown(true);
    }
View Full Code Here

Examples of service.DoubleItPortType

        // Use below line for Talend ESB deployment of web service provider
        String endpointAddress = "http://localhost:8040/services/doubleit";
        // Use below instead for servlet deployment
        // String endpointAddress = "http://localhost:8080/doubleit/services/doubleit";
        Service service = Service.create(new URL(endpointAddress +"?wsdl"), SERVICE_NAME);
        DoubleItPortType port = service.getPort(DoubleItPortType.class);

        doubleIt(port, 10);
        doubleIt(port, 0);
        doubleIt(port, -10);
    }
View Full Code Here

Examples of wssec.kerberos.DoubleItPortType

        SpringBusFactory.setDefaultBus(bus);
        SpringBusFactory.setThreadDefaultBus(bus);

        DoubleItService service = new DoubleItService();
       
        DoubleItPortType kerberosPort = service.getDoubleItKerberosTransportPort();
        updateAddressPort(kerberosPort, PORT2);
        BigInteger result = kerberosPort.doubleIt(BigInteger.valueOf(25));
        assertTrue(result.equals(BigInteger.valueOf(50)));
    }
View Full Code Here

Examples of wssec.saml.DoubleItPortType

        SpringBusFactory.setDefaultBus(bus);
        SpringBusFactory.setThreadDefaultBus(bus);

        DoubleItService service = new DoubleItService();
       
        DoubleItPortType saml1Port = service.getDoubleItSaml1TransportPort();
        updateAddressPort(saml1Port, PORT2);
       
        try {
            saml1Port.doubleIt(BigInteger.valueOf(25));
            fail("Expected failure on an invocation with no SAML Assertion");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            assertTrue(ex.getMessage().contains("No SAML CallbackHandler available"));
        }
       
        ((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) {
            assertTrue(ex.getMessage().contains("Wrong SAML Version"));
        }

        ((BindingProvider)saml1Port).getRequestContext().put(
            "ws-security.saml-callback-handler", new SamlCallbackHandler(false)
        );
        BigInteger result = saml1Port.doubleIt(BigInteger.valueOf(25));
        assertTrue(result.equals(BigInteger.valueOf(50)));
    }
View Full Code Here

Examples of wssec.ut.DoubleItPortType

        SpringBusFactory.setDefaultBus(bus);
        SpringBusFactory.setThreadDefaultBus(bus);

        DoubleItService service = new DoubleItService();
       
        DoubleItPortType utPort = service.getDoubleItPlaintextPort();
        updateAddressPort(utPort, PORT);
        utPort.doubleIt(BigInteger.valueOf(25));
    }
View Full Code Here

Examples of wssec.x509.DoubleItPortType

        Bus bus = bf.createBus(busFile.toString());
        SpringBusFactory.setDefaultBus(bus);
        SpringBusFactory.setThreadDefaultBus(bus);

        DoubleItService service = new DoubleItService();
        DoubleItPortType x509Port = service.getDoubleItKeyIdentifierPort();
        updateAddressPort(x509Port, PORT);
        x509Port.doubleIt(BigInteger.valueOf(25));
    }
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.