Search in sources :

Example 21 with StockQuoteSampleClient

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

the class Sample153 method testsRoutingWithoutProcessingSecurityHeaders.

public void testsRoutingWithoutProcessingSecurityHeaders() {
    String url = "http://localhost:8280/services/StockQuoteProxy";
    String policy = "./repository/conf/sample/resources/policy/client_policy_3.xml";
    log.info("Running test: Routing the messages arrived to a proxy service without " + "processing the security headers");
    StockQuoteSampleClient client = getStockQuoteClient();
    SampleClientResult result = client.requestStandardQuote(null, url, null, "IBM", policy);
    assertTrue("Client did not a response with https ", result.responseReceived());
}
Also used : SampleClientResult(org.apache.synapse.samples.framework.SampleClientResult) StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 22 with StockQuoteSampleClient

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

the class Sample155 method testDualQuote.

public void testDualQuote() {
    String addUrl = "http://localhost:8280/services/StockQuoteProxy";
    log.info("Running test: Dual channel invocation on both client side and server " + "side of Synapse with Proxy Services");
    StockQuoteSampleClient client = getStockQuoteClient();
    SampleClientResult result = client.requestDualQuote(addUrl, null, null, "IBM");
    assertTrue("Client did not get run successfully ", result.responseReceived());
}
Also used : SampleClientResult(org.apache.synapse.samples.framework.SampleClientResult) StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 23 with StockQuoteSampleClient

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

the class Sample101 method testWSRM.

public void testWSRM() {
    String addUrl = "http://localhost:8280/";
    log.info("Running test: Reliable message exchange");
    StockQuoteSampleClient client = getStockQuoteClient();
    result = client.requestStandardQuote(addUrl, null, null, "IBM", null);
    assertTrue("Client did not run successfully ", result.responseReceived());
}
Also used : StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 24 with StockQuoteSampleClient

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

the class Sample12 method testFireAndForget.

public void testFireAndForget() {
    String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: One way messaging / fireAndForget through Synapse");
    SampleClientResult result = client.placeOrder(addUrl, trpUrl, null, "IBM");
    assertResponseReceived(result);
}
Also used : SampleClientResult(org.apache.synapse.samples.framework.SampleClientResult) StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 25 with StockQuoteSampleClient

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

the class Sample2 method testCBR.

public void testCBR() {
    String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
    String trpUrl = "http://localhost:8280";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: CBR with the Switch-case mediator, using message properties");
    SampleClientResult result = client.requestStandardQuote(addUrl, trpUrl, null, "IBM", null);
    assertResponseReceived(result);
    result = client.requestStandardQuote(addUrl, trpUrl, null, "MSFT", 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