Examples of responseReceived()


Examples of org.apache.synapse.samples.framework.SampleClientResult.responseReceived()

        log.info("Running test: Introduction to error handling");
        SampleClientResult result = client.requestStandardQuote(addUrl, trpUrl, null, "IBM" ,null);
        assertResponseReceived(result);

        result = client.requestStandardQuote(addUrl, trpUrl, null, "MSFT" ,null);
        assertFalse("Must not get a response", result.responseReceived());
        Exception resultEx = result.getException();
        assertNotNull("Did not receive expected error" , resultEx);
        log.info("Got an error as expected: " + resultEx.getMessage());
        assertTrue("Did not receive expected error", resultEx instanceof AxisFault);
View Full Code Here

Examples of org.apache.synapse.samples.framework.SampleClientResult.responseReceived()

        assertNotNull("Did not receive expected error" , resultEx);
        log.info("Got an error as expected: " + resultEx.getMessage());
        assertTrue("Did not receive expected error", resultEx instanceof AxisFault);

        result = client.requestStandardQuote(addUrl, trpUrl, null, "SUN" ,null);
        assertFalse("Must not get a response", result.responseReceived());
        Exception resultEx2 = result.getException();
        assertNotNull("Did not receive expected error" , resultEx);
        log.info("Got an error as expected: " + resultEx.getMessage());
        assertTrue("Did not receive expected error", resultEx2 instanceof AxisFault);
    }
View Full Code Here

Examples of org.apache.synapse.samples.framework.SampleClientResult.responseReceived()

        String expectedError_MSFT = "bogus";
        String expectedError_SUN = "Connection refused";

        log.info("Running test: Creating SOAP fault messages and changing the direction of a message");
        SampleClientResult result = client.requestStandardQuote(addUrl, trpUrl, null, "MSFT" ,null);
        assertFalse("Must not get a response", result.responseReceived());
        Exception resultEx = result.getException();
        assertNotNull("Did not receive expected error", resultEx);
        log.info("Got an error as expected: " + resultEx.getMessage());
        assertTrue("Did not receive expected error", resultEx instanceof AxisFault);
        assertTrue("Did not receive expected error", resultEx.getMessage().indexOf(expectedError_MSFT)!=-1);
View Full Code Here

Examples of org.apache.synapse.samples.framework.SampleClientResult.responseReceived()

        log.info("Got an error as expected: " + resultEx.getMessage());
        assertTrue("Did not receive expected error", resultEx instanceof AxisFault);
        assertTrue("Did not receive expected error", resultEx.getMessage().indexOf(expectedError_MSFT)!=-1);

        result = client.requestStandardQuote(addUrl, trpUrl, null, "SUN" ,null);
        assertFalse("Must not get a response", result.responseReceived());
        resultEx = result.getException();
        assertNotNull("Did not receive expected error", resultEx);
        log.info("Got an error as expected: " + resultEx.getMessage());
        assertTrue("Did not receive expected error", resultEx instanceof AxisFault);
        assertTrue("Did not receive expected error", resultEx.getMessage().indexOf(expectedError_SUN)!=-1);
View Full Code Here

Examples of org.apache.synapse.samples.framework.SampleClientResult.responseReceived()

        log.info("Got an error as expected: " + resultEx.getMessage());
        assertTrue("Did not receive expected error", resultEx instanceof AxisFault);
        assertTrue("Did not receive expected error", resultEx.getMessage().indexOf(expectedError_SUN)!=-1);

        result = client.requestStandardQuote(addUrl, trpUrl, null, "IBM" ,null);
        assertFalse("Must not get a response", result.responseReceived());
        resultEx = result.getException();
        assertNotNull("Did not receive expected error", resultEx);
        log.info("Got an error as expected: " + resultEx.getMessage());
        assertTrue("Did not receive expected error", resultEx instanceof AxisFault);
    }
View Full Code Here

Examples of org.apache.synapse.samples.framework.SampleClientResult.responseReceived()

        String trpUrl = "http://localhost:8280";
        String expectedError = "Invalid custom quote request";

        log.info("Running test: Creating SOAP fault messages and changing the direction of a message");
        SampleClientResult result = client.requestStandardQuote(addUrl, trpUrl, null, "IBM",null);
        assertFalse("Should not get a response", result.responseReceived());
        Exception resultEx = result.getException();
        assertNotNull("Did not receive expected error", resultEx);
        log.info("Got an error as expected: " + resultEx.getMessage());
        assertTrue("Did not receive expected error", resultEx instanceof AxisFault);
        assertTrue("Did not receive expected error", resultEx.getMessage().indexOf(expectedError)!=-1);
View Full Code Here

Examples of org.apache.synapse.samples.framework.SampleClientResult.responseReceived()

        String addUrl = "http://localhost:8280/services/StockQuoteProxy1";
        String addUrl2 = "http://localhost:8280/services/StockQuoteProxy2";

        log.info("Running test: Custom sequences and endpoints with proxy services");
        SampleClientResult result1 = client.requestStandardQuote(addUrl, null, null, "IBM" ,null);
        assertTrue("Client did not get run successfully ", result1.responseReceived());
        SampleClientResult result2 = client.requestStandardQuote(addUrl2, null, null, "IBM" ,null);
        assertTrue("Client did not get run successfully ", result2.responseReceived());
    }

}
View Full Code Here

Examples of org.apache.synapse.samples.framework.SampleClientResult.responseReceived()

        log.info("Running test: Custom sequences and endpoints with proxy services");
        SampleClientResult result1 = client.requestStandardQuote(addUrl, null, null, "IBM" ,null);
        assertTrue("Client did not get run successfully ", result1.responseReceived());
        SampleClientResult result2 = client.requestStandardQuote(addUrl2, null, null, "IBM" ,null);
        assertTrue("Client did not get run successfully ", result2.responseReceived());
    }

}
View Full Code Here

Examples of org.apache.synapse.samples.framework.SampleClientResult.responseReceived()

    public void testSessionFullLB() {
        String trpUrl = "http://localhost:8280/services/LBProxy";
        log.info("Running test: Load Balancing with Proxy Services ");
        SampleClientResult result = client.statefulClient(null, trpUrl, 100);
        assertTrue("Client did not run successfully ", result.responseReceived());
    }
}
View Full Code Here

Examples of org.apache.synapse.samples.framework.SampleClientResult.responseReceived()

    public void testBasicProxy() {
        String addUrl = "http://localhost:8280/services/StockQuoteProxy";
        log.info("Running test: Introduction to proxy services");
        SampleClientResult result = client.requestStandardQuote(addUrl, null, null, "IBM" ,null);
        assertTrue("Client did not get run successfully ", result.responseReceived());
    }

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