Search in sources :

Example 31 with StockQuoteSampleClient

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

the class Sample354 method testScriptMediationWithInLineRuby.

public void testScriptMediationWithInLineRuby() {
    String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Using In-lined Ruby scripts for mediation");
    result = client.requestCustomQuote(addUrl, trpUrl, null, "IBM");
    assertTrue("Client did not get run successfully ", result.responseReceived());
}
Also used : StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 32 with StockQuoteSampleClient

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

the class Sample361 method testDbReport.

public void testDbReport() {
    String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Introduction to dbreport mediator");
    result = client.requestStandardQuote(addUrl, trpUrl, null, "IBM", null);
    assertTrue("Client did not get run successfully ", result.responseReceived());
    log.info("Running test: Introduction to the dblookup mediator");
}
Also used : StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 33 with StockQuoteSampleClient

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

the class Sample390 method testXQuery.

public void testXQuery() {
    String addUrl = "http://localhost:8280/services/StockQuoteProxy";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Introduction to the XQuery mediator");
    result = client.requestCustomQuote(addUrl, null, null, "IBM");
    assertTrue("Client did not get run successfully ", result.responseReceived());
}
Also used : StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 34 with StockQuoteSampleClient

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

the class Sample434 method testCallOutInlineEndpoint.

public void testCallOutInlineEndpoint() {
    log.info("Running test: Callout mediator - Invoke a service using an inline 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 35 with StockQuoteSampleClient

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

the class Sample451 method testURLRewrite.

public void testURLRewrite() {
    log.info("Running test: Conditional URL Rewriting");
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    String addUrl = "jms://localhost:9000/services/SimpleStockQuoteService";
    result = client.requestStandardQuote(addUrl, trpUrl, null, "IBM", null);
    assertTrue("Client did not get run successfully ", result.responseReceived());
    addUrl = "http://localhost:7575/services/SimpleStockQuoteService";
    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)

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