Package org.objectweb.hello_world_soap_http_secure.types

Examples of org.objectweb.hello_world_soap_http_secure.types.Result


            endpointInterface = "org.objectweb.hello_world_soap_http_secure.Greeter",
            targetNamespace = "http://objectweb.org/hello_world_soap_http_secure")
public class GreeterImpl implements Greeter {

    public Result greetMeTwoTier(String me, int testIndex) {
        Result ret = new Result();
        if (Matrix.TWO_TIER_TESTS[testIndex].targetData.targetExpectSuccess) {
            ret.setDidPass(Matrix.SUCCEED);
            ret.setReturnString("Hello " + me);
            ret.setFailureReason("");
        } else {
            ret.setDidPass(Matrix.FAIL);
            ret.setReturnString("");
            ret.setFailureReason("Shouldn't have been able to contact GreeterImpl.greetme, testIndex = "
                                 + testIndex)
        }
        return ret;
    }
View Full Code Here


        }
        return ret;
    }

    public Result greetMeThreeTier(String me, int testIndex) {
        Result ret = new Result();
        if (Matrix.THREE_TIER_TESTS[testIndex].targetData.targetExpectSuccess) {
            ret.setDidPass(Matrix.SUCCEED);
            ret.setReturnString("Hello " + me);
            ret.setFailureReason("");
        } else {
            ret.setDidPass(Matrix.FAIL);
            ret.setReturnString("");
            ret.setFailureReason("Shouldn't have been able to contact GreeterImpl.greetme, testIndex = "
                                 + testIndex)
        }
        return ret;
    }
View Full Code Here

    
    private void invokeTwoTier(Greeter greeter, int index) throws Exception {
        String response1 = new String("Hello Milestone-");
        try {      
            for (int idx = 0; idx < REPEAT_NUM_TIMES; idx++) {
                Result ret = greeter.greetMeTwoTier("Milestone-" + idx, index);
                if (!Matrix.TWO_TIER_TESTS[index].clientData.clientExpectSuccess) {
                    fail("Expected to FAIL but didn't, index = " + index);
                }
                assertNotNull("no response received from service", ret.getReturnString());
                String exResponse = response1 + idx;
                assertEquals(exResponse, ret.getReturnString());
               
            }           
        } catch (UndeclaredThrowableException ex) {
            if (Matrix.TWO_TIER_TESTS[index].clientData.clientExpectSuccess) {
                fail("Caught unexpected ex = " + ex
View Full Code Here

    
    private void invokeThreeTier(Greeter greeter, int index) throws Exception {
        String response1 = new String("Hello Milestone-");
        try {      
            for (int idx = 0; idx < REPEAT_NUM_TIMES; idx++) {
                Result ret = greeter.greetMeThreeTier("Milestone-" + idx, index);
                if (!Matrix.THREE_TIER_TESTS[index].clientData.clientExpectSuccess) {
                    fail("Expected to FAIL but didn't");
                } else if (!ret.isDidPass()) {
                    fail("The inter server reported the following error : " + ret.getFailureReason());
                }
                assertNotNull("no response received from service", ret.getReturnString());
                String exResponse = response1 + idx;
                assertEquals(exResponse, ret.getReturnString());
               
            }           
        } catch (UndeclaredThrowableException ex) {
            if (Matrix.THREE_TIER_TESTS[index].clientData.clientExpectSuccess) {
                fail("Caught unexpected exception for test index, " + index + ",ex = " + ex);
View Full Code Here

            targetNamespace = "http://objectweb.org/hello_world_soap_http_secure")
public class InterGreeterImpl implements Greeter {

    public Result greetMeTwoTier(String me, int testIndex) {
       
        Result ret = new Result();
        ret.setDidPass(Matrix.FAIL);
        ret.setReturnString("");
        ret.setFailureReason("Should only be called as part of three tier test");
        return ret;
    }
View Full Code Here

       
        QName portName = new QName("http://objectweb.org/hello_world_soap_http_secure",
                                   Matrix.THREE_TIER_TESTS[testIndex].interData.interPortName);
        Greeter greeter = service.getPort(portName, Greeter.class);
        try {      
            Result res = greeter.greetMeThreeTier("Milestone-" + testIndex, testIndex);
            if (!Matrix.THREE_TIER_TESTS[testIndex].interData.interExpectSuccess) {
                return Matrix.fail("Expected to fail but didn't");
            }
            String exResponse = response1 + testIndex;
            Result failResult = Matrix.dealWithResponse(exResponse, res);
            if (failResult != null) {
                return failResult;
            }
              

        } catch (UndeclaredThrowableException ex) {
            if (Matrix.THREE_TIER_TESTS[testIndex].interData.interExpectSuccess) {
                ex.printStackTrace();
                return Matrix.fail("Caught unexpected ex = " + ex.getMessage());
            }
           
           
        }
        Result ret = new Result();
        ret.setDidPass(Matrix.SUCCEED);
        ret.setReturnString("Hello " + me);
        ret.setFailureReason("");
        return ret;
    }
View Full Code Here

    }
   
    private void invoke(Greeter greeter) throws Exception {

        try {      
            Result ret = greeter.greetMeTwoTier("Milestone", 0);
            if (ret.isDidPass()) {
                fail("Should not have succeeded, client properties not setup");
            }
        } catch (UndeclaredThrowableException ex) {
            assertTrue("Failed to catch expected exception, instead caught ex.getClass() = "
                       + ex.getClass(), ex != null);
View Full Code Here

    private void invoke(Greeter greeter) throws Exception {
        String response1 = new String("Hello Milestone-");
        try {      
            for (int idx = 0; idx < 2; idx++) {
                Result ret = greeter.greetMeTwoTier("Milestone-" + idx, 0);
                if (!ret.isDidPass()) {
                    fail("Sould have succeeded but instead gor error message = "
                         + ret.getFailureReason());
                }
                assertNotNull("no response received from service", ret.getReturnString());
                String exResponse = response1 + idx;
                assertEquals(exResponse, ret.getReturnString());

            }           
        } catch (UndeclaredThrowableException ex) {
            fail("Caught unexpected ex = " + ex);
            throw (Exception)ex.getCause();
View Full Code Here

        t();
    }
   
   
    protected static Result fail(String reason) {
        Result ret = new Result();
        ret.setDidPass(Matrix.FAIL);
        ret.setReturnString("");
        ret.setFailureReason(reason);
        return ret;
    }
View Full Code Here

TOP

Related Classes of org.objectweb.hello_world_soap_http_secure.types.Result

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.