Package org.jabsorb.client

Examples of org.jabsorb.client.Client.invoke()


        Session session = TransportRegistry.i().createSession(uri);
        Client client = new Client(session);
        Object proxy = client.openProxy("", method.getDeclaringClass());

        try {
            Object result = client.invoke(proxy, method, (Object[])msg.getBody());
            msg.setBody(result);
        } catch (Exception e) {
            msg.setFaultBody(e);
        } finally {
            client.closeProxy(proxy);
View Full Code Here


    @Test
    public void testService() throws Exception {
        final Session s = TransportRegistry.i().createSession("http://localhost:8080/python");
        final Client c = new Client(s);
        final Object px = c.openProxy("", EchoTest.class);
        final Object r = c.invoke(px, EchoTest.class.getMethod("echo", String.class, String.class), new Object[] {"Hey", "There"});
        c.closeProxy(px);
        s.close();
        assertEquals("Hey There", r);
    }
View Full Code Here

    @Test
    public void testReference() throws Exception {
        final Session s = TransportRegistry.i().createSession("http://localhost:8080/client");
        final Client c = new Client(s);
        final Object px = c.openProxy("", EchoTest.class);
        final Object r = c.invoke(px, EchoTest.class.getMethod("echo", String.class, String.class), new Object[] {"Hey", "There"});
        c.closeProxy(px);
        s.close();
        assertEquals("Hey There", r);
    }
View Full Code Here

    @Test
    public void testLocal() throws Exception {
        final Session s = TransportRegistry.i().createSession("http://localhost:8080/java-client");
        final Client c = new Client(s);
        final Object px = c.openProxy("", EchoTest.class);
        final Object r = c.invoke(px, EchoTest.class.getMethod("echo", String.class, String.class), new Object[] {"Hey", "There"});
        c.closeProxy(px);
        s.close();
        assertEquals("Hey There", r);
    }
View Full Code Here

        Session session = TransportRegistry.i().createSession(uri);
        Client client = new Client(session);
        Object proxy = client.openProxy("", method.getDeclaringClass());

        try {
            Object result = client.invoke(proxy, method, (Object[])msg.getBody());
            msg.setBody(result);
        } catch (Exception e) {
            msg.setFaultBody(e);
        } finally {
            client.closeProxy(proxy);
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.