Package org.apache.axis2.rpc.client

Examples of org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking()


    public void testProcessPersonList() throws AxisFault {
        RPCServiceClient sender = getRPCClient("GenericService", "processPersonList");
        ArrayList<PersonArray> args = new ArrayList<PersonArray>();
        args.add(new PersonArray());

        Object[] value = sender.invokeBlocking(new QName("http://generics.axis2.apache.org", "processPersonList", "req"), args.toArray(),
                new Class[]{Person.class});
        Person person = (Person) value[0];
        assertNotNull(person);
        assertEquals(person.getAge(), 10);
    }
View Full Code Here


        Object[] opGetWeatherArgs = new Object[] { };
        Class[] returnTypes = new Class[] { Weather.class };
       
       
        Object[] response = serviceClient.invokeBlocking(opGetWeather,
                opGetWeatherArgs, returnTypes);
       
        Weather result = (Weather) response[0];
       
        // display results
View Full Code Here

        Object[] opGetWeatherArgs = new Object[] { };
        Class[] returnTypes = new Class[] { Weather.class };
       
       
        Object[] response = serviceClient.invokeBlocking(opGetWeather,
                opGetWeatherArgs, returnTypes);
       
        Weather result = (Weather) response[0];
       
        if (result == null) {
View Full Code Here

        Object[] opFindEntryArgs = new Object[] { name };
        Class[] returnTypes = new Class[] { Entry.class };

       
        Object[] response = serviceClient.invokeBlocking(opFindEntry,
                opFindEntryArgs, returnTypes);
       
        Entry result = (Entry) response[0];
       
        if (result == null) {
View Full Code Here

        //Setup an array of only one return object a byte array
        Class[] returnTypes = new Class[] { byte[].class };       
       
           
        //Invoce a blocking call to the service and store the results
        Object[] response = serviceClient.invokeBlocking( opGetResults,
                                                          obInputArgs,
                                                          returnTypes );
       
        //End the code the servlet will need, after this point how the results
        //are displayed are different when using the UI.  Look at print results
View Full Code Here

      // Setup an array of only one return object a byte array
      Class[] returnTypes = new Class[] { byte[].class };

      // Invoke a blocking call to the service and store the results
      Object[] response = serviceClient.invokeBlocking(opGetResults,
          obInputArgs, returnTypes);

      res = (CalculateResults) TransportUtils.getDeserializedResult(
          (byte[]) response[0], res.getClass());
View Full Code Here

    public void testProcessStringList() throws AxisFault {
        RPCServiceClient sender = getRPCClient("GenericService", "processStringList");
        ArrayList<String> args = new ArrayList<String>();      
  args.add("Test1");
  Object[] value = sender.invokeBlocking(
    new QName("http://generics.axis2.apache.org",
      "processStringList", "req"), args.toArray(),
      new Class[] { String.class });
  assertEquals(value[0], "Test1");
    }
View Full Code Here

        resobj.add(String.class);
        resobj.add(String.class);
        resobj.add(String.class);


        Object[] value = sender.invokeBlocking(new QName("http://generics.axis2.apache.org", "getStringList", "req"), args.toArray(),
                (Class[]) resobj.toArray(new Class[resobj.size()]));
        assertEquals(value[0], "test1");
        assertEquals(value[1], "test2");
        assertEquals(value[2], "test3");
    }
View Full Code Here

        RPCServiceClient sender = getRPCClient("GenericService", "processPersonList");
        ArrayList<Person> args = new ArrayList<Person>();
        Person p = new Person();
        p.setAge(10);
        args.add(p);
        Object[] value = sender.invokeBlocking(
          new QName("http://generics.axis2.apache.org",
            "processPersonList", "req"), args.toArray(),
            new Class[] { Person.class });
        Person person = (Person) value[0];
        assertNotNull(person);
View Full Code Here

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

        OMElement response = sender.invokeBlocking(new QName("http://rpc.axis2.apache.org", "editBean", "req"), args.toArray());
        MyBean resBean = (MyBean)BeanUtil.deserialize(MyBean.class, response.getFirstElement(),
                                                      new DefaultObjectSupplier(), null);
        assertNotNull(resBean);
        assertEquals(resBean.getAge(), 159);
    }
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.