Package org.apache.axis.client

Examples of org.apache.axis.client.Call.invoke()


        Vector v = new Vector();
        v.addElement("Hi there!");
        v.addElement("This'll be a SOAP Array and then a LinkedList!");
        call.setOperationName(new QName(SERVICE_NAME, "echoLinkedList"));
        Object ret = call.invoke(new Object[]{v});
        if (!equals(v, ret)) assertEquals("Echo LinkedList mangled the result.  Result is underneath.\n" + ret, v, ret);
    }

    public void testLinkedListConversion() throws Exception {
        Call call = new Call(new Service());
View Full Code Here


        l.add("Linked list item #1");
        l.add("Second linked list item");
        l.add("This will be a SOAP Array then a Vector!");

        call.setOperationName(new QName(SERVICE_NAME, "echoVector"));
        Object ret = call.invoke(new Object[]{l});
        if (!equals(l, ret)) assertEquals("Echo Vector mangled the result.  Result is underneath.\n" + ret, l, ret);
    }

    public void testArrayConversion() throws Exception {
        Call call = new Call(new Service());
View Full Code Here

        Vector v = new Vector();
        v.addElement("Hi there!");
        v.addElement("This'll be a SOAP Array");

        call.setOperationName(new QName(SERVICE_NAME, "echoArray"));
        Object ret = call.invoke(new Object[]{v});
        if (!equals(v, ret)) assertEquals("Echo Array mangled the result.  Result is underneath\n" + ret, v, ret);
    }

    /**
     * Test the setReturnClass() API on Call by asking the runtime to
View Full Code Here

        l.add("Second linked list item");
        l.add("This will be a SOAP Array then a Vector!");

        call.setOperationName(new QName(SERVICE_NAME, "echoArray"));
        call.setReturnClass(Vector.class);
        Object ret = call.invoke(new Object[]{l});
        assertEquals("Return wasn't a Vector!", Vector.class, ret.getClass());
        Vector v = (Vector)ret;
        assertEquals("Sizes were different", l.size(), v.size());
        for (int i = 0; i < l.size(); i++) {
            String s = (String)l.get(i);
View Full Code Here

    }

  public void testCircularVectors() throws Exception {
        try {
            Call call = getCall();
            Object result = call.invoke("getCircle", null);
        } catch (AxisFault af){
            return;
        }
        fail("Expected a fault");
        // This just tests that we don't get exceptions during deserialization
View Full Code Here

        Service S_service = new Service();
        Call call = (Call) S_service.createCall();
        call.setTransport(new LocalTransport(server));
        call.setReturnType(XMLType.XSD_DOUBLE);
       
        Object result = call.invoke("TestService",
                                    "serviceMethod",
                                    new Object [] {});
       
        assertTrue("Return value (" + result.getClass().getName() +
                   ") was not the expected type (Double)!",
View Full Code Here

    public void testInheritance() throws Exception {
        Call call = new Call(new Service());
        call.setTransport(transport);

        String ret = (String)call.invoke("inherited", null);
        assertEquals("Inherited method returned bad result",
                Parent.HELLO_MSG, ret);

        ret = (String)call.invoke("normal", null);
        assertEquals("Child method returned bad result",
View Full Code Here

        String ret = (String)call.invoke("inherited", null);
        assertEquals("Inherited method returned bad result",
                Parent.HELLO_MSG, ret);

        ret = (String)call.invoke("normal", null);
        assertEquals("Child method returned bad result",
                Child.HELLO_MSG, ret);

        ret = (String)call.invoke("overloaded", new Object [] { "test" });
        assertTrue("Overloaded (String) method returned bad result",
View Full Code Here

        ret = (String)call.invoke("normal", null);
        assertEquals("Child method returned bad result",
                Child.HELLO_MSG, ret);

        ret = (String)call.invoke("overloaded", new Object [] { "test" });
        assertTrue("Overloaded (String) method returned bad result",
                ret.startsWith(Parent.OVERLOAD_MSG));
        ret = (String)call.invoke("overloaded",
                                  new Object [] { new Integer(5) });
        assertTrue("Overloaded (int) method returned bad result",
View Full Code Here

                Child.HELLO_MSG, ret);

        ret = (String)call.invoke("overloaded", new Object [] { "test" });
        assertTrue("Overloaded (String) method returned bad result",
                ret.startsWith(Parent.OVERLOAD_MSG));
        ret = (String)call.invoke("overloaded",
                                  new Object [] { new Integer(5) });
        assertTrue("Overloaded (int) method returned bad result",
                ret.startsWith(Child.OVERLOAD_MSG));

    }
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.