Package org.apache.hello_world_soap_http

Examples of org.apache.hello_world_soap_http.GreeterImpl


   
    public static class Server extends AbstractBusTestServerBase {       
        Endpoint ep;
       
        protected void run() {
            Object implementor = new GreeterImpl();
            String address = "http://localhost:"
                + TestUtil.getPortNumber(DispatchClientServerWithHugeResponseTest.class)
                + "/SOAPDispatchService/SoapDispatchPort";
            ep = Endpoint.publish(address, implementor);
        }
View Full Code Here


        implementor = new DocLitBareGreeterMultiPort();
        address = "http://localhost:" + PORT + "/MultiPort/DocBarePort";
        eps.add(Endpoint.publish(address, implementor));
       
        implementor = new GreeterImpl();
        address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
        Endpoint ep = Endpoint.publish(address, implementor);
        ((EndpointImpl)ep).getService().getInInterceptors().add(new URIMappingInterceptor());
        eps.add(ep);
       
        implementor = new GreeterImpl();
        address = "http://localhost:" + PORT + "/SoapContext/SoapPortWithGzip";
        Endpoint ep2 = Endpoint.publish(address, implementor);
        ((EndpointImpl)ep2).getService().getInInterceptors().add(new GZIPInInterceptor());
        ((EndpointImpl)ep2).getService().getOutInterceptors().add(new GZIPOutInterceptor());
        eps.add(ep2);
View Full Code Here

    @Test
    public void testEndpoint() throws Exception {
        String address = "http://localhost:8080/test";
       
        GreeterImpl greeter = new GreeterImpl();
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter, (String)null);
        WebServiceContext ctx = greeter.getContext();
        assertNull(ctx);
        try {
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
            assertTrue(ex.getCause() instanceof BusException);
            assertEquals("BINDING_INCOMPATIBLE_ADDRESS_EXC", ((BusException)ex.getCause()).getCode());
        }
        ctx = greeter.getContext();
       
        assertNotNull(ctx);
       
        // Test that we can't change settings through the JAX-WS API after publishing
       
View Full Code Here

   
    @Test
    public void testEndpointStop() throws Exception {  
        String address = "http://localhost:8080/test";
       
        GreeterImpl greeter = new GreeterImpl();
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter, (String)null);
        WebServiceContext ctx = greeter.getContext();
        assertNull(ctx);
        try {
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
            assertTrue(ex.getCause() instanceof BusException);
            assertEquals("BINDING_INCOMPATIBLE_ADDRESS_EXC", ((BusException)ex.getCause()).getCode());
        }
        ctx = greeter.getContext();
       
        assertNotNull(ctx);
       
        // Test that calling stop on the Endpoint works
        assertTrue(endpoint.isPublished());
View Full Code Here

    }
   

    @Test
    public void testEndpointServiceConstructor() throws Exception {  
        GreeterImpl greeter = new GreeterImpl();
        JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
        serviceFactory.setBus(getBus());
        serviceFactory.setInvoker(new BeanInvoker(greeter));
        serviceFactory.setServiceClass(GreeterImpl.class);
       
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter,
                                                 new JaxWsServerFactoryBean(serviceFactory));
        WebServiceContext ctx = greeter.getContext();
        assertNull(ctx);
        try {
            String address = "http://localhost:8080/test";
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
            assertTrue(ex.getCause() instanceof BusException);
            assertEquals("BINDING_INCOMPATIBLE_ADDRESS_EXC", ((BusException)ex.getCause()).getCode());
        }
        ctx = greeter.getContext();
       
        assertNotNull(ctx);
    }
View Full Code Here

        ep.publish("local://localhost:9090/hello");
    }

    @Test
    public void testAddWSAFeature() throws Exception {
        GreeterImpl greeter = new GreeterImpl();
        JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
        serviceFactory.setBus(getBus());
        serviceFactory.setInvoker(new BeanInvoker(greeter));
        serviceFactory.setServiceClass(GreeterImpl.class);
       
View Full Code Here

    }


    @BeforeClass
    public static void startService() {
        Object implementor = new GreeterImpl();
        String address = "http://localhost:" + getPort1() + "/CXFGreeterEnrichTest/SoapContext/SoapPort";
        endpoint = Endpoint.publish(address, implementor);
    }
View Full Code Here

            httpServer.start();

            Bus bus = cxf.getBus();
            setBus(bus);
            BusFactory.setDefaultBus(bus);
            GreeterImpl impl = new GreeterImpl();
            Endpoint.publish("/Greeter", impl);
            HelloImpl helloImpl = new HelloImpl();
            Endpoint.publish("/Hello", helloImpl);

        } catch (Exception e) {
View Full Code Here

        doTestDefaultServerEndpoint();
    }
    
    private void doTestDefaultServerEndpoint() {
       
        Object implementor = new GreeterImpl();
        EndpointImpl ei = (EndpointImpl)(javax.xml.ws.Endpoint.create(implementor));
        ei.publish("http://localhost/greeter");
       
        JaxWsEndpointImpl endpoint = (JaxWsEndpointImpl)ei.getEndpoint();
        assertEquals("Unexpected bean name", PORT_NAME.toString() + ".endpoint", endpoint.getBeanName());
View Full Code Here

        doTestConfiguredServerEndpoint();
    }
   
    private void doTestConfiguredServerEndpoint() {
       
        Object implementor = new GreeterImpl();
        EndpointImpl ei = (EndpointImpl)(javax.xml.ws.Endpoint.create(implementor));
        ei.publish("http://localhost/greeter");
       
        JaxWsEndpointImpl endpoint = (JaxWsEndpointImpl)ei.getEndpoint();
        assertEquals("Unexpected bean name", PORT_NAME.toString() + ".endpoint", endpoint.getBeanName());
View Full Code Here

TOP

Related Classes of org.apache.hello_world_soap_http.GreeterImpl

Copyright © 2018 www.massapicom. 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.