Package org.objectweb.hello_world_xml_http.bare

Examples of org.objectweb.hello_world_xml_http.bare.Greeter


            wsdlURL = new URL(args[0]);
        }

        System.out.println(wsdlURL);
        XMLService service = new XMLService(wsdlURL, SERVICE_NAME);
        Greeter greeter = (Greeter)service.getPort(PORT_NAME, Greeter.class);

        System.out.println("Invoking sayHi...");
        System.out.println("server responded with: " + greeter.sayHi());
        System.out.println();

        System.out.println("Invoking greetMe...");
        System.out.println("server responded with: " + greeter.greetMe(System.getProperty("user.name")));
        System.out.println();
       
        MyComplexStruct argument = new MyComplexStruct();
        MyComplexStruct retVal = null;

        String str1 = "this is element 1";
        String str2 = "this is element 2";
        int int1 = 42;

        argument.setElem1(str1);
        argument.setElem2(str2);
        argument.setElem3(int1);
        System.out.println("Invoking sendReceiveData...");

        retVal = greeter.sendReceiveData(argument);

        System.out.println("Response from sendReceiveData operation :");
        System.out.println("Element-1 : " + retVal.getElem1());
        System.out.println("Element-2 : " + retVal.getElem2());
        System.out.println("Element-3 : " + retVal.getElem3());
View Full Code Here


        assertNotNull(wsdl);
       
        XMLService service = new XMLService(wsdl, serviceName);
        assertNotNull(service);
       
        Greeter greeter = service.getPort(portName, Greeter.class);
       
        String response1 = new String("Hello Milestone-");
        String response2 = new String("Bonjour");
        MyComplexStruct argument = new MyComplexStruct();
        MyComplexStruct retVal = null;
       
        try {      
            for (int idx = 0; idx < 5; idx++) {
                String greeting = greeter.greetMe("Milestone-" + idx);
                assertNotNull("no response received from service", greeting);
                String exResponse = response1 + idx;
                assertEquals(exResponse, greeting);
               
                String reply = greeter.sayHi();
                assertNotNull("no response received from service", reply);
                assertEquals(response2, reply);

                argument.setElem1("Hello Milestone-" + idx);
                argument.setElem2("Bonjour-" + idx);
                argument.setElem3(idx);
               
                retVal = null;
                retVal = greeter.sendReceiveData(argument);
               
                assertNotNull("no response received from service", retVal);
                assertTrue(argument.getElem1().equals(retVal.getElem1()));
                assertTrue(argument.getElem2().equals(retVal.getElem2()));
                assertTrue(argument.getElem3() == retVal.getElem3());
View Full Code Here

TOP

Related Classes of org.objectweb.hello_world_xml_http.bare.Greeter

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.