Package org.apache.axis2.clientapi

Examples of org.apache.axis2.clientapi.Call.invokeBlocking()


        args.add(bean);

        ArrayList ret = new ArrayList();
        ret.add(MyBean.class);

        Object [] response = sender.invokeBlocking(new QName("http://rpc.axis2.apache.org", "echoBean", "req"), args.toArray(),
                                                   (Class[])ret.toArray(new Class[ret.size()]));
        MyBean resBean = (MyBean)response[0];
        assertNotNull(resBean);
        assertEquals(resBean.getAge(), 100);
    }
View Full Code Here


        args.add("100");

        ArrayList ret = new ArrayList();
        ret.add(Integer.class);

        Object [] response = sender.invokeBlocking(new QName("http://rpc.axis2.apache.org", "echoInt", "req"), args.toArray(),
                                                   (Class[])ret.toArray(new Class[ret.size()]));
        assertEquals(((Integer)response[0]).intValue(), 100);
    }

//    public void testmultireturn() throws AxisFault {
View Full Code Here

        ArrayList args = new ArrayList();
        String [] values = new String[] { "abc", "cde", "efg" };
        args.add(values);
        ArrayList ret = new ArrayList();
        ret.add(Boolean.class);
        Object [] objs = sender.invokeBlocking(new QName("http://rpc.axis2.apache.org", "handleStringArray", "req"), args.toArray(),
                                               (Class[])ret.toArray(new Class[ret.size()]));
        assertNotNull(objs);
        assertEquals(Boolean.TRUE, Boolean.valueOf(objs[0].toString()));
    }
View Full Code Here

        args.add(values3);
        args.add("10");

        ArrayList ret = new ArrayList();
        ret.add(Integer.class);
        Object [] objs = sender.invokeBlocking(new QName("http://rpc.axis2.apache.org", "multiArrays", "req"), args.toArray(),
                                               (Class[])ret.toArray(new Class[ret.size()]));
        assertNotNull(objs);
        assertEquals(19, Integer.parseInt(objs[0].toString()));
    }
View Full Code Here

        ArrayList args = new ArrayList();
        args.add("foo");


        OMElement element = sender.invokeBlocking(new QName("http://rpc.axis2.apache.org", "mulReturn", "req"), args.toArray());
        System.out.println("element = " + element);
//        assertEquals(response.getFirstElement().getText(), "foo");
    }

View Full Code Here

        EndpointReference targetEPR = new EndpointReference(
                "local://services/AddressBookService");
        options.setTo(targetEPR);
        options.setAction("addEntry");

        Object[] ret = serviceClient.invokeBlocking(opAddEntry, opAddEntryArgs, new Class[]{Integer.class});
        assertEquals(ret[0], new Integer(1));

        QName opFindEntry = new QName("http://rpc.axis2.apache.org", "findEntry");
        String name = "Abby Cadabby";
View Full Code Here

        Options options2 = serviceClient2.getOptions();
        EndpointReference targetEPR2 = new EndpointReference(
                "local://services/AddressBookService");
        options2.setTo(targetEPR2);
        options2.setAction("findEntry");
        Object[] response = serviceClient2.invokeBlocking(opFindEntry,
                opFindEntryArgs, returnTypes);

        Entry result = (Entry) response[0];
        assertNotNull(result);
View Full Code Here

        EndpointReference targetEPR = new EndpointReference(
                "local://services/AddressBookService");
        options.setTo(targetEPR);
        options.setAction("getEntries1");

        Object[] result = serviceClient.invokeBlocking(opAddEntry, opAddEntryArgs, new Class[]{Entry[].class});
        assertNotNull(result);
        Entry[] entries = (Entry[]) result[0];
        assertEquals(entries.length, 2);
    }
View Full Code Here

        EndpointReference targetEPR = new EndpointReference(
                "local://services/AddressBookService");
        options.setTo(targetEPR);
        options.setAction("getEntries2");

        Object[] result = serviceClient.invokeBlocking(opAddEntry, opAddEntryArgs, new Class[]{Entry[].class});
        assertNotNull(result);
        Entry[] entries = (Entry[]) result[0];
        assertEquals(entries.length, 0);
    }
View Full Code Here

        EndpointReference targetEPR = new EndpointReference(
                "local://services/AddressBookService");
        options.setTo(targetEPR);
        options.setAction("getEntries3");

        Object[] result = serviceClient.invokeBlocking(opAddEntry, opAddEntryArgs, new Class[]{Entry[].class});
        assertNotNull(result);
        Entry[] entries = (Entry[]) result[0];
        assertEquals(entries.length, 0);
    }
}
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.