Search in sources :

Example 81 with StockQuoteSampleClient

use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.

the class Sample433 method testCallOutDefinedEndpoint.

public void testCallOutDefinedEndpoint() {
    log.info("Running test: Callout mediator - Invoke a service using a defined Endpoint");
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    result = client.requestStandardQuote(null, trpUrl, null, "IBM", null);
    assertTrue("Client did not run successfully", result.responseReceived());
}
Also used : StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 82 with StockQuoteSampleClient

use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.

the class Sample450 method testURLRewrite.

public void testURLRewrite() {
    // String repo = getConfiguration().getClientConfig().getClientRepo();
    String addUrl = "http://localhost:9000/soap/SimpleStockQuoteService";
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Introduction to the URL Rewrite Mediator");
    result = client.requestStandardQuote(addUrl, trpUrl, null, "IBM", null);
    assertTrue("Client did not get run successfully ", result.responseReceived());
}
Also used : StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 83 with StockQuoteSampleClient

use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.

the class Sample50 method testRestToPox.

public void testRestToPox() {
    String trpUrl = "http://localhost:8280/services/StockQuote";
    log.info("Running test: HTTP REST request ");
    StockQuoteSampleClient client = getStockQuoteClient();
    SampleClientResult result = client.requestRestQuote(null, trpUrl, null, "IBM");
    assertResponseReceived(result);
}
Also used : SampleClientResult(org.apache.synapse.samples.framework.SampleClientResult) StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 84 with StockQuoteSampleClient

use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.

the class Sample52 method testSessionLessLB.

public void testSessionLessLB() {
    String addUrl = "http://localhost:8280/services/LBService1";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Session-less load balancing between 3 endpoints");
    SampleClientResult result = client.sessionlessClient(addUrl, null, 100);
    assertResponseReceived(result);
}
Also used : SampleClientResult(org.apache.synapse.samples.framework.SampleClientResult) StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 85 with StockQuoteSampleClient

use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.

the class Sample10 method testDynamicEndPoints.

public void testDynamicEndPoints() {
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Dynamic EndPoints with Registry");
    SampleClientResult result = client.requestStandardQuote(null, trpUrl, null, "IBM", null);
    assertResponseReceived(result);
}
Also used : SampleClientResult(org.apache.synapse.samples.framework.SampleClientResult) StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Aggregations

StockQuoteSampleClient (org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)99 SampleClientResult (org.apache.synapse.samples.framework.SampleClientResult)45 OMElement (org.apache.axiom.om.OMElement)23 AxisFault (org.apache.axis2.AxisFault)5 QName (javax.xml.namespace.QName)4 Axis2BackEndServerController (org.apache.synapse.samples.framework.Axis2BackEndServerController)1