Examples of RPCCall


Examples of org.apache.axis2.rpc.client.RPCCall

        options.setTo(targetEPR);
        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                Constants.TRANSPORT_HTTP,
                false);

        RPCCall call =
                new RPCCall("target/test-resources/intregrationRepo");
        call.setClientOptions(options);

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

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

        Object [] response = call.invokeBlocking(operationName, args.toArray(), ret.toArray());
        assertEquals(((Integer) response[0]).intValue(), 100);
        call.close();
    }
View Full Code Here

Examples of org.apache.axis2.rpc.client.RPCCall

        options.setTo(targetEPR);
        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                Constants.TRANSPORT_HTTP,
                false);

        RPCCall call =
                new RPCCall("target/test-resources/intregrationRepo");
        call.setClientOptions(options);

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

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

        Object [] response = call.invokeBlocking(operationName, args.toArray(), ret.toArray());
        assertEquals(((Integer) response[0]).intValue(), 10);
        assertEquals(response[1], "foo");
//        assertEquals(Byte.parseByte(response.getFirstElement().getText()),1);
        call.close();
    }
View Full Code Here

Examples of org.apache.axis2.rpc.client.RPCCall

        options.setTo(targetEPR);
        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                Constants.TRANSPORT_HTTP,
                false);

        RPCCall call =
                new RPCCall("target/test-resources/intregrationRepo");
        call.setClientOptions(options);

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


        OMElement response = call.invokeBlocking(operationName, args.toArray());
//        assertEquals(response.getFirstElement().getText(), "foo");
        call.close();
    }
View Full Code Here

Examples of org.apache.axis2.rpc.client.RPCCall

        options.setTo(targetEPR);
        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                Constants.TRANSPORT_HTTP,
                false);

        RPCCall call =
                new RPCCall("target/test-resources/intregrationRepo");
        call.setClientOptions(options);

        OMElement elem = call.invokeBlocking("handleArrayList", getpayLoad());
        assertEquals(elem.getFirstElement().getText(), "abcdefghiklm10");
        call.close();
    }
View Full Code Here

Examples of org.apache.axis2.rpc.client.RPCCall

        options.setTo(targetEPR);
        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                Constants.TRANSPORT_HTTP,
                false);

        RPCCall call = new RPCCall(clientHome);
        call.setClientOptions(options);

        MyBean bean = new MyBean();
        bean.setAge(100);
        bean.setName("Deepal");
        bean.setValue(false);
        AddressBean ab = new AddressBean();
        ab.setNumber(1010);
        ab.setTown("Colombo3");
        bean.setAddress(ab);


        ArrayList args = new ArrayList();
        args.add(bean);
        args.add("159");

        OMElement response = call.invokeBlocking(operationName, args.toArray());
//        MyBean resBean =(MyBean) new  BeanSerializer(MyBean.class,response).deserilze();
        MyBean resBean = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, response.getFirstElement());
        assertNotNull(resBean);
        assertEquals(resBean.getAge(), 159);
        call.close();
    }
View Full Code Here

Examples of org.apache.axis2.rpc.client.RPCCall

        options.setTo(targetEPR);
        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                Constants.TRANSPORT_HTTP,
                false);

        RPCCall call =
                new RPCCall("target/test-resources/intregrationRepo");
        call.setClientOptions(options);

        MyBean bean = new MyBean();
        bean.setAge(100);
        bean.setName("Deepal");
        bean.setValue(false);
        AddressBean ab = new AddressBean();
        ab.setNumber(1010);
        ab.setTown("Colombo3");
        bean.setAddress(ab);

        ArrayList args = new ArrayList();
        args.add(bean);


        OMElement response = call.invokeBlocking(operationName, args.toArray());
        MyBean resBean = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, response.getFirstElement());
//        MyBean resBean =(MyBean) new  BeanSerializer(MyBean.class,response).deserilze();
        assertNotNull(resBean);
        assertEquals(resBean.getAge(), 100);
        call.close();
    }
View Full Code Here

Examples of org.apache.axis2.rpc.client.RPCCall

        options.setTo(targetEPR);
        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                Constants.TRANSPORT_HTTP,
                false);

        RPCCall call =
                new RPCCall("target/test-resources/intregrationRepo");
        call.setClientOptions(options);

        ArrayList args = new ArrayList();
        args.add("foo");
        OMElement response = call.invokeBlocking(operationName, args.toArray());
        assertEquals(response.getFirstElement().getText(), "foo");
        call.close();
    }
View Full Code Here

Examples of org.apache.axis2.rpc.client.RPCCall

        options.setTo(targetEPR);
        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                Constants.TRANSPORT_HTTP,
                false);

        RPCCall call =
                new RPCCall("target/test-resources/intregrationRepo");
        call.setClientOptions(options);

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

        OMElement response = call.invokeBlocking(operationName, args.toArray());
        assertEquals(Integer.parseInt(response.getFirstElement().getText()), 100);
        call.close();
    }
View Full Code Here

Examples of org.apache.axis2.rpc.client.RPCCall

        call.close();
    }

    public void testAdd() throws AxisFault {
        configureSystem("add");
        RPCCall call =
                new RPCCall("target/test-resources/intregrationRepo");

        Options options = new Options();
        options.setTo(targetEPR);
        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                Constants.TRANSPORT_HTTP,
                false);
        call.setClientOptions(options);
        ArrayList args = new ArrayList();
        args.add("100");
        args.add("200");

        OMElement response = call.invokeBlocking(operationName, args.toArray());
        assertEquals(Integer.parseInt(response.getFirstElement().getText()), 300);
        call.close();
    }
View Full Code Here

Examples of org.apache.axis2.rpc.client.RPCCall

        call.close();
    }

    public void testDivide() throws AxisFault {
        configureSystem("divide");
        RPCCall call =
                new RPCCall("target/test-resources/intregrationRepo");

        Options options = new Options();
        call.setClientOptions(options);
        options.setTo(targetEPR);
        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                Constants.TRANSPORT_HTTP,
                false);

        ArrayList args = new ArrayList();
        args.add("10");
        args.add("0");
        OMElement response = call.invokeBlocking(operationName, args.toArray());
        assertEquals(response.getFirstElement().getText(), "INF");
        call.close();
    }
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.