Package org.codehaus.xfire.test

Examples of org.codehaus.xfire.test.Echo.echo()


        // Create a client proxy
        XFireProxyFactory proxyFactory = new XFireProxyFactory();
        Echo echo = (Echo) proxyFactory.create(serviceModel, "http://localhost:8191/Echo");
       
        System.out.println(echo.echo("Hello World"));
       
        starter.stop();
        // END SNIPPET: service
    }
}
View Full Code Here


        // Since JMS doesn't really have a concept of anonymous endpoints, we need
        // need to let xfire know what JMS endpoint we should use
        ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient().setEndpointUri("jms://Peer1");
       
        // run the client!
        String resString = echo.echo("hello");
        assertEquals("hello", resString);
    }
}
// END SNIPPET: jms
View Full Code Here

        // Since JMS doesn't really have a concept of anonymous endpoints, we need
        // need to let xfire know what JMS endpoint we should use
        ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient().setEndpointUri("jms://Peer1");
       
        // run the client!
        String resString = echo.echo("hello");
        assertEquals("hello", resString);
    }
}
// END SNIPPET: jms
View Full Code Here

        // Since JMS doesn't really have a concept of anonymous endpoints, we need
        // need to let xfire know what JMS endpoint we should use
        ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient().setEndpointUri("jms://GenericTopic?topic=Echo");
       
        // run the client!
        String resString = echo.echo("hello");
        assertEquals("hello", resString);
    }
}
// END SNIPPET: jms
View Full Code Here

    {
        Object client = getContext().getBean("echoClient");
        assertNotNull(client);

        Echo echo = (Echo) client;
        String response = echo.echo("bleh");
        assertNotNull(response);
        assertEquals("bleh", response);
    }
   
    protected ApplicationContext createContext()
View Full Code Here

        factory.setServiceInterface(Echo.class);
        factory.setWsdlDocumentUrl("http://localhost:8191/Echo?wsdl");
        factory.afterPropertiesSet();
       
        Echo echo = (Echo) factory.getObject();
        assertEquals("hi", echo.echo("hi"));
       
        server.stop();
    }

    public void testSetWSDLPropertiesClasspath()
View Full Code Here

        factory.setServiceInterface(Echo.class);
        factory.setWsdlDocumentUrl("http://localhost:8191/Echo?wsdl");
        factory.afterPropertiesSet();
       
        Echo echo = (Echo) factory.getObject();
        assertEquals("hi", echo.echo("hi"));
       
        server.stop();
    }
   
    public void testServerClass()
View Full Code Here

        throws Exception
    {
        XFireProxyFactory xpf = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) xpf.create(service, "xfire.local://Echo");
       
        assertEquals("hi", echo.echo("hi"));
    }

    public void testEchoWSDL()
            throws Exception
    {
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.