Examples of Hello


Examples of org.apache.cxf.jaxws.service.Hello

   
    @Test
    public void testPostConstructCalled() throws Exception {
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setServiceClass(Hello.class);
        Hello bean = new Hello();
        factory.setServiceBean(bean);
        String address = "http://localhost:9001/jaxwstest";
        factory.setAddress(address);
        factory.create();
        assertTrue("PostConstruct is not called", bean.isPostConstructCalled());
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.service.Hello

   
    @Test
    public void testPostConstructBlocked() throws Exception {
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setServiceClass(Hello.class);
        Hello bean = new Hello();
        factory.setServiceBean(bean);
        String address = "http://localhost:9001/jaxwstest";
        factory.setAddress(address);
        factory.setBlockPostConstruct(true);
        factory.create();
        assertFalse("PostConstruct is called", bean.isPostConstructCalled());
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.service.Hello

    }

   
    @Test
    public void testEndpoint() throws Exception {
        Hello service = new Hello();

        EndpointImpl ep = new EndpointImpl(getBus(), service, (String) null);
        ep.setExecutor(new Executor() {
            public void execute(Runnable r) {
                new Thread(r).start();
View Full Code Here

Examples of org.apache.cxf.jaxws.service.Hello

        assertValid("//s:Body/h:getGreetingsResponse/return[2]", res);
    }
   
    @Test
    public void testClient() throws Exception {
        Hello serviceImpl = new Hello();
        EndpointImpl ep = new EndpointImpl(getBus(), serviceImpl, (String) null);
        ep.publish("local://localhost:9090/hello");
        ep.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
        ep.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
        QName serviceName = new QName("http://service.jaxws.cxf.apache.org/", "HelloService");
View Full Code Here

Examples of org.apache.cxf.systest.jaxws.Hello

    public void testHelloService() throws Exception {
        JaxWsProxyFactoryBean cpfb = new JaxWsProxyFactoryBean();
        String address = serviceURL + "Hello";
        cpfb.setServiceClass(Hello.class);
        cpfb.setAddress(address);
        Hello hello = (Hello) cpfb.create();
        String reply = hello.sayHi(" Willem");
        assertEquals("Get the wrongreply ", reply, "get Willem");
    }
View Full Code Here

Examples of org.apache.cxf.systest.jms.Hello

        factory.setBus(bus);
        factory.getFeatures().add(cff);
        factory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICATION_TRANSPORTID);
        factory.setServiceClass(Hello.class);
        factory.setAddress(address);
        Hello client = (Hello)markForClose(factory.create());
        String reply = client.sayHi(" HI");
        Assert.assertEquals("get HI", reply);
    }
View Full Code Here

Examples of org.apache.cxf.systest.mtom_feature.Hello

        ByteArrayOutputStream output = setupOutLogging();

        Holder<byte[]> photo = new Holder<byte[]>("CXF".getBytes());
        Holder<Image> image = new Holder<Image>(getImage("/java.jpg"));

        Hello port = getPort();

        SOAPBinding binding = (SOAPBinding) ((BindingProvider)port).getBinding();
        binding.setMTOMEnabled(true);


        port.detail(photo, image);

        String expected = "<xop:Include ";
        assertTrue(output.toString().indexOf(expected) != -1);
        assertTrue(input.toString().indexOf(expected) != -1);
View Full Code Here

Examples of org.apache.cxf.systest.mtom_feature.Hello

    @org.junit.Ignore
    public void testEcho() throws Exception {
        byte[] bytes = ImageHelper.getImageBytes(getImage("/java.jpg"), "image/jpeg");
        Holder<byte[]> image = new Holder<byte[]>(bytes);

        Hello port = getPort();
        SOAPBinding binding = (SOAPBinding) ((BindingProvider)port).getBinding();
        binding.setMTOMEnabled(true);

        port.echoData(image);
        assertNotNull(image);
    }
View Full Code Here

Examples of org.apache.cxf.systest.mtom_feature.Hello

        URL wsdl = getClass().getResource("/wsdl_systest/mtom.wsdl");
        assertNotNull("WSDL is null", wsdl);

        HelloService service = new HelloService(wsdl, serviceName);
        assertNotNull("Service is null ", service);
        Hello hello = service.getHelloPort();
        try {
            updateAddressPort(hello, PORT);
        } catch (Exception ex) {
            //ignore
        }
View Full Code Here

Examples of org.apache.cxf.systest.mtom_feature.Hello

        ByteArrayOutputStream output = setupOutLogging();

        Holder<byte[]> photo = new Holder<byte[]>("CXF".getBytes());
        Holder<Image> image = new Holder<Image>(getImage("/java.jpg"));

        Hello port = getPort();

        SOAPBinding binding = (SOAPBinding) ((BindingProvider)port).getBinding();
        binding.setMTOMEnabled(true);


        port.detail(photo, image);

        String expected = "<xop:Include xmlns:xop=";
        assertTrue(output.toString().indexOf(expected) != -1);
        assertTrue(input.toString().indexOf(expected) != -1);
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.