use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class XsltTransformationFromUrlTestCase method testXsltTransformationFromUrl.
public void testXsltTransformationFromUrl() throws AxisFault {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendCustomQuoteRequest("http://localhost:8280/services/xsltInUrlTestProxy", null, null, "IBM");
assertNotNull("Response is null", response);
assertTrue("Invalid response received", response.toString().contains("Code"));
assertTrue("Invalid response received", response.toString().contains("IBM"));
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class Sample752 method testLoadBalancingWithEndpointTemplates.
public void testLoadBalancingWithEndpointTemplates() {
String trpUrl = "http://localhost:8280/services/LBProxy";
log.info("Running test: Load Balancing with Endpoint Templates");
StockQuoteSampleClient client = getStockQuoteClient();
SampleClientResult result = client.statefulClient(null, trpUrl, 100);
assertTrue("Client did not run successfully ", result.responseReceived());
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class Sample17 method testPayloadFactoryMediator.
public void testPayloadFactoryMediator() {
String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
String trpUrl = "http://localhost:8280/";
StockQuoteSampleClient client = getStockQuoteClient();
log.info("Running test: Transforming message content with Payload Factory mediator");
SampleClientResult result = client.requestCustomQuote(addUrl, trpUrl, null, "IBM");
assertResponseReceived(result);
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class Sample363 method testReusableConnectionPools.
public void testReusableConnectionPools() {
String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
String trpUrl = "http://localhost:8280/";
StockQuoteSampleClient client = getStockQuoteClient();
log.info("Running test: Reusable Database Connection Pools");
SampleClientResult result = client.requestStandardQuote(addUrl, trpUrl, null, "IBM", null);
assertTrue("Client did not get run successfully ", result.responseReceived());
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class Sample57 method testDynamicLB.
public void testDynamicLB() {
final String addUrl = "http://localhost:8280/services/LBService1";
final StockQuoteSampleClient client = getStockQuoteClient();
log.info("Running test: Dynamic load balancing between 3 nodes");
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
}
Thread t = new Thread(new Runnable() {
public void run() {
result = client.sessionlessClient(addUrl, null, 500);
}
});
t.start();
try {
t.join();
} catch (InterruptedException e) {
}
assertResponseReceived(result);
}
Aggregations