Package org.apache.axis2.rpc.client

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


            throw new AxisFault(e);
        } catch (FactoryConfigurationError factoryConfigurationError) {
            throw new AxisFault(factoryConfigurationError);
        }
        envelope.getBody().addChild(staxOMBuilder.getDocumentElement());
        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);

        SOAPEnvelope env = call.invokeBlocking("handleArrayList", envelope);
        assertEquals(env.getBody().getFirstElement().getFirstElement().getText(), "abcdefghiklm10");
    }
View Full Code Here


        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);

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

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

        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

        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

        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

        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

        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

        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

        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

        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

TOP

Related Classes of org.apache.axis2.rpc.client.RPCCall

Copyright © 2018 www.massapicom. 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.