Search in sources :

Example 6 with StockQuoteSampleClient

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

the class DynamicSequenceTestCase method testSequenceMediatorWithDynamicSequence.

public void testSequenceMediatorWithDynamicSequence() {
    StockQuoteSampleClient client = getStockQuoteClient();
    client.addHttpHeader("Sequence", "sendToStockQuoteServiceSequence");
    SampleClientResult result = client.requestStandardQuote("http://localhost:8280/services/sequenceMediatorDynamicSequenceTestProxy", 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 7 with StockQuoteSampleClient

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

the class Sample352 method testAccessingAPIUsingScripting.

public void testAccessingAPIUsingScripting() {
    String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Accessing Synapse message context API methods using scripting language");
    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 8 with StockQuoteSampleClient

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

the class Sample353 method testScriptMediationWithRuby.

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

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

the class XQueryIntegrationTestCase method testXQueryTransformation.

public void testXQueryTransformation() throws AxisFault {
    StockQuoteSampleClient client = getStockQuoteClient();
    OMElement response = client.sendCustomQuoteRequest("http://localhost:8280/services/xQueryMediatorIntegrationTestProxy", null, null, "WSO2");
    assertNotNull("Response is null", response);
    assertTrue("Invalid response received", response.toString().contains("WSO2"));
}
Also used : StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient) OMElement(org.apache.axiom.om.OMElement)

Example 10 with StockQuoteSampleClient

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

the class FileSystemLocalEntryXsltTransformationTestCase method testFileSystemLocalEntryXsltTransformation.

public void testFileSystemLocalEntryXsltTransformation() throws AxisFault {
    StockQuoteSampleClient client = getStockQuoteClient();
    OMElement response = client.sendCustomQuoteRequest("http://localhost:8280/services/xsltInFileSystemTestProxy", null, null, "IBM");
    assertNotNull("Response is null", response);
    assertTrue("Invalid response received", response.toString().contains("Code"));
    assertTrue("Invalid response received", response.toString().contains("IBM"));
}
Also used : StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient) OMElement(org.apache.axiom.om.OMElement)

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