Package org.apache.hello_world_soap_http

Examples of org.apache.hello_world_soap_http.Greeter.sayHi()


                        "http://apache.org/hello_world_soap_http",
                        "SOAPServiceWSSecurity"));
        final Greeter greeter = svc.getPort(new javax.xml.namespace.QName(
                "http://apache.org/hello_world_soap_http",
                "TimestampSignEncrypt"), Greeter.class);
        String ret = greeter.sayHi();
        assertEquals(ret, "Bonjour");
        ret = greeter.greetMe("ffang");
        assertEquals(ret, "Hello ffang");
    }
 
View Full Code Here


        service1.addPort(endpoint,
                SOAPBinding.SOAP12HTTP_BINDING, "http://localhost:19000/SoapContext/SoapPort");
        Greeter greeter = service1.getPort(endpoint, Greeter.class);
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        String ret = greeter.sayHi();
        assertEquals(ret, "Bonjour");
        String noSuchCodeFault = "NoSuchCodeLitFault";
        String badRecordFault = "BadRecordLitFault";
        try {
            greeter.testDocLitFault(noSuchCodeFault);
View Full Code Here

                        "http://apache.org/hello_world_soap_http",
                        "SOAPServiceWSSecurity"));
        final Greeter greeter = svc.getPort(new javax.xml.namespace.QName(
                "http://apache.org/hello_world_soap_http",
                "TimestampSignEncrypt"), Greeter.class);
        String ret = greeter.sayHi();
        assertEquals(ret, "Bonjour");
        ret = greeter.greetMe("ffang");
        assertEquals(ret, "Hello ffang");
    }
   
View Full Code Here

        Binding binding = ((BindingProvider)greeter).getBinding();
        TestOutHandler handler = new TestOutHandler();
        handlerChain.add(handler);
        binding.setHandlerChain(handlerChain);

        greeter.sayHi();

        assertTrue("expected Handler.handleMessage() to be called",
                   handler.handleMessageCalledOutbound);
        assertFalse("expected Handler.handleFault() not to be called",
                    handler.handleFaultCalledOutbound);
View Full Code Here

            for (int idx = 0; idx < 2; idx++) {
                String greeting = greeter.greetMe("Milestone-" + idx);
                assertNotNull("no response received from service", greeting);
                assertEquals(response1, greeting);

                String reply = greeter.sayHi();
                assertNotNull("no response received from service", reply);
                assertEquals(response2, reply);
            }
        } catch (UndeclaredThrowableException ex) {
            throw (Exception)ex.getCause();
View Full Code Here

        service1.addPort(endpoint,
                SOAPBinding.SOAP12HTTP_BINDING, "http://localhost:19000/SoapContext/SoapPort");
        Greeter greeter = service1.getPort(endpoint, Greeter.class);
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        String ret = greeter.sayHi();
        assertEquals(ret, "Bonjour");
        String noSuchCodeFault = "NoSuchCodeLitFault";
        String badRecordFault = "BadRecordLitFault";
        try {
            greeter.testDocLitFault(noSuchCodeFault);
View Full Code Here

       
        Client client = new Client(ROUTER_ADDRESS + "?wsdl");
        Greeter proxy = client.getProxy();
       
        String resp;
        resp = proxy.sayHi();
        assertEquals("Get a wrong response", "Bonjour", resp);
      
        resp = proxy.greetMe("Willem");
        assertEquals("Get a wrong response", "Hello Willem", resp);
       
View Full Code Here

       
        Client client = new Client("http://localhost:9091/GreeterContext/GreeterPort");
        Greeter port = client.getProxy();
       
        assertNotNull("The proxy should not be null", port);
        String resp = port.sayHi();
        assertEquals("Get a wrong response ", "Bonjour from EndpointA", resp);       

        resp = port.sayHi();
        assertEquals("Get a wrong response ", "Bonjour from EndpointB", resp)
View Full Code Here

       
        assertNotNull("The proxy should not be null", port);
        String resp = port.sayHi();
        assertEquals("Get a wrong response ", "Bonjour from EndpointA", resp);       

        resp = port.sayHi();
        assertEquals("Get a wrong response ", "Bonjour from EndpointB", resp)

      
        resp = port.greetMe("Mike");
        assertEquals("Get a wrong response ", "Hello Mike from EndpointA", resp);
View Full Code Here

        Greeter greeter = service.getPort(portName, Greeter.class);
        updateAddressPort(greeter, PORT);
        try {
            greeter.greetMe("test");
           
            String reply = greeter.sayHi();
            assertNotNull("no response received from service", reply);
            assertEquals("Bonjour", reply);
        } catch (UndeclaredThrowableException ex) {
            throw (Exception)ex.getCause();
        }
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.