Examples of IPingService


Examples of simple.client.IPingService

public class PingServiceClientMS {
   
    public static void main (String[] args) {
           
            SymmetricFederatedService service = new SymmetricFederatedService();
            IPingService stub = service.getScenario6IssuedTokenForCertificateSecureConversationMutualCertificate11();
                   
            // use static stubs to override endpoint property of WSDL      
            String serviceURL = System.getProperty("service.url");

            System.out.println("Service URL=" + serviceURL);
     
            ((BindingProvider)stub).getRequestContext().
                put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL);

            stub.ping(new Holder("1"), new Holder("sun"), new Holder("Passed!"));
           
    }
View Full Code Here

Examples of simple.client.IPingService

public class PingServiceClientMS {
   
    public static void main (String[] args) {
           
            SymmetricFederatedService service = new SymmetricFederatedService();
            IPingService stub = service.getScenario5IssuedTokenForCertificateMutualCertificate11();
                   
            // use static stubs to override endpoint property of WSDL      
            String serviceURL = System.getProperty("service.url");

            System.out.println("Service URL=" + serviceURL);
     
            ((BindingProvider)stub).getRequestContext().
                put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL);

            stub.ping(new Holder("1"), new Holder("sun"), new Holder("Passed!"));
           
    }
View Full Code Here

Examples of simple.client.IPingService

public class PingServiceClient {
   
    public static void main (String[] args) {
           
            SymmetricFederatedService service = new SymmetricFederatedService();
            IPingService stub = service.getScenario5IssuedTokenForCertificateMutualCertificate11();
                   
            // use static stubs to override endpoint property of WSDL      
            String serviceURL = System.getProperty("service.url");

            System.out.println("Service URL=" + serviceURL);
     
            ((BindingProvider)stub).getRequestContext().
                put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL);

            stub.ping(new Holder("1"), new Holder("sun"), new Holder("Passed!"));
           
    }
View Full Code Here

Examples of simple.client.IPingService

public class PingServiceClient {
   
    public static void main (String[] args) {
           
            SymmetricFederatedService service = new SymmetricFederatedService();
            IPingService stub = service.getScenario6IssuedTokenForCertificateSecureConversationMutualCertificate11();
                   
            // use static stubs to override endpoint property of WSDL      
            String serviceURL = System.getProperty("service.url");

            System.out.println("Service URL=" + serviceURL);
     
            ((BindingProvider)stub).getRequestContext().
                put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL);

            stub.ping(new Holder("1"), new Holder("sun"), new Holder("Passed!"));
           
    }
View Full Code Here

Examples of simple.client.IPingService

    }

    private void ping(){
        PingService service = new PingService();

        IPingService stub = service.getCustomBindingIPingService();
        ((BindingProvider)stub).getRequestContext().put("userSAMLAssertion", getSAMLAssertion());
        stub.ping(new Holder("1"), new Holder("sun"), new Holder("Passed!"));
    }
View Full Code Here

Examples of wssec.wssc.IPingService

        BusFactory.setDefaultBus(bus);
        BusFactory.setThreadDefaultBus(bus);
       
        PingService svc = new PingService();
        for (String portPrefix : argv) {
            final IPingService port =
                svc.getPort(
                    new QName(
                        "http://WSSec/wssc",
                        portPrefix
                    ),
                    IPingService.class
                );
          
            ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                                            "http://localhost:9001/" + portPrefix);
            if (portPrefix.charAt(0) == '_') {
                //MS would like the _ versions to send a cancel
                ((BindingProvider)port).getRequestContext()
                    .put(SecurityConstants.STS_TOKEN_DO_CANCEL, Boolean.TRUE);
            }
            PingRequest params = new PingRequest();
            Ping ping = new Ping();
            ping.setOrigin("CXF");
            ping.setScenario("Scenario5");
            ping.setText("ping");
            params.setPing(ping);
            try {
                PingResponse output = port.ping(params);
                assertEquals(OUT, output.getPingResponse().getText());
            } catch (Exception ex) {
                throw new Exception("Error doing " + portPrefix, ex);
            }
        }
View Full Code Here

Examples of wssec.wssec10.IPingService

        URL wsdlLocation = null;
        for (String portPrefix : argv) {
            PingService svc = null;
            wsdlLocation = getWsdlLocation(portPrefix);
            svc = new PingService(wsdlLocation);
            final IPingService port =
                svc.getPort(
                    new QName(
                        "http://WSSec/wssec10",
                        portPrefix + "_IPingService"
                    ),
                    IPingService.class
                );
           
            final String output = port.echo(INPUT);
            assertEquals(INPUT, output);
        }
    }
View Full Code Here

Examples of wssec.wssec10.IPingService

        URL wsdlLocation = null;
        for (String portPrefix : argv) {
            PingService svc = null;
            wsdlLocation = getWsdlLocation(portPrefix);
            svc = new PingService(wsdlLocation);
            final IPingService port =
                svc.getPort(
                    new QName(
                        "http://WSSec/wssec10",
                        portPrefix + "_IPingService"
                    ),
                    IPingService.class
                );
           
            final String output = port.echo(INPUT);
            assertEquals(INPUT, output);
        }
    }
View Full Code Here

Examples of wssec.wssec10.IPingService

    }

    @Test
    public void testClientServerUTOnlyAuthorized() {

        IPingService port = getUTOnlyPort(
            "org/apache/cxf/systest/ws/wssec10/client/client_restricted.xml", false);
       
        final String output = port.echo(INPUT);
        assertEquals(INPUT, output);
    }
View Full Code Here

Examples of wssec.wssec10.IPingService

    }
   
    @Test
    public void testClientServerUTOnlyUnauthorized() {

        IPingService port = getUTOnlyPort(
            "org/apache/cxf/systest/ws/wssec10/client/client_restricted_unauthorized.xml", true);
       
        try {
            port.echo(INPUT);
            fail("Frank is unauthorized");
        } catch (Exception ex) {
            assertEquals("Unauthorized", ex.getMessage());
        }
    }
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.