Search in sources :

Example 61 with StockQuoteSampleClient

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

the class PropertyIntegrationAxis2ScopeTestCase method testShortVal.

public void testShortVal() throws Exception {
    StockQuoteSampleClient client = getStockQuoteClient();
    OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/propertyShortAxis2TestProxy", null, null, "Random Symbol", null);
    assertTrue("Short Property Not Set in the Axis2 scope!", response.toString().contains("12"));
}
Also used : StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient) OMElement(org.apache.axiom.om.OMElement)

Example 62 with StockQuoteSampleClient

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

the class LogMediatorAfterSendMediatorTestCase method testLogMediatorAfterSendMediator.

public void testLogMediatorAfterSendMediator() {
    StockQuoteSampleClient client = getStockQuoteClient();
    SampleClientResult result = client.requestStandardQuote("http://localhost:8280/services/sendMediatorWithLogAfterwardsTestProxy", null, null, "WSO2", null);
    assertTrue("Response not received", result.responseReceived());
}
Also used : SampleClientResult(org.apache.synapse.samples.framework.SampleClientResult) StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 63 with StockQuoteSampleClient

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

the class Sample350 method testScriptMediationWithJS.

public void testScriptMediationWithJS() {
    String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Introduction to the script mediator using js scripts ");
    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 64 with StockQuoteSampleClient

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

the class Sample351 method testScriptMediationInLineJS.

public void testScriptMediationInLineJS() {
    String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Introduction to the script mediator using js scripts ");
    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 65 with StockQuoteSampleClient

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

the class Sample360 method testDbLookup.

public void testDbLookup() {
    String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Introduction to dblookup 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)

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