Search in sources :

Example 91 with StockQuoteSampleClient

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

the class Sample430 method testCallOut.

public void testCallOut() {
    String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
    String trpUrl = "http://localhost:8280/";
    StockQuoteSampleClient client = getStockQuoteClient();
    log.info("Running test: Simple Callout Mediator for synchronizing web service invocation");
    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 92 with StockQuoteSampleClient

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

the class Sample432 method testCallOutSecurityWithDifferentPoliciesForInboundAndOutbound.

public void testCallOutSecurityWithDifferentPoliciesForInboundAndOutbound() {
    log.info("Running test: Callout mediator security sample with different policies " + "for inbound and outbound flows");
    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 93 with StockQuoteSampleClient

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

the class Sample268 method testLocalTransport.

public void testLocalTransport() throws Exception {
    String addUrl = "http://localhost:8280/services/LocalTransportProxy";
    StockQuoteSampleClient client = getStockQuoteClient();
    SampleClientResult result = client.placeOrder(addUrl, null, null, "IBM");
    assertResponseReceived(result);
}
Also used : SampleClientResult(org.apache.synapse.samples.framework.SampleClientResult) StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient)

Example 94 with StockQuoteSampleClient

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

the class Sample100 method testWSSecurity.

public void testWSSecurity() {
    String trpUrl = "http://localhost:8280/";
    log.info("Running test: Using WS-Security for outgoing messages");
    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 95 with StockQuoteSampleClient

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

the class Sample266 method testTCPtoHTTP.

public void testTCPtoHTTP() throws Exception {
    String trpUrl = "tcp://localhost:6060/services/StockQuoteProxy";
    StockQuoteSampleClient client = getStockQuoteClient();
    SampleClientResult result = client.placeOrder(trpUrl, trpUrl, null, "IBM");
    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