Search in sources :

Example 56 with StockQuoteSampleClient

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

the class PropertyIntegrationAxis2ClientScopeTestCase method testShortVal.

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

Example 57 with StockQuoteSampleClient

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

the class InlineFunctionTestCase method testInlineFunction.

public void testInlineFunction() throws Exception {
    StockQuoteSampleClient client = getStockQuoteClient();
    OMElement response = client.sendCustomQuoteRequest("http://localhost:8280/services/scriptMediatorJSInlineTestProxy", null, null, "wso2");
    assertNotNull("Response message null", response);
    assertEquals("Local Name does not match", "Code", response.getFirstElement().getLocalName().toString());
    assertEquals("Local Part does not match", "CheckPriceResponse", response.getQName().getLocalPart().toString());
    assertEquals("Text does not match", "wso2", response.getFirstChildWithName(new QName("http://services.samples/xsd", "Code")).getText());
    assertEquals("Local Name does not match", "Price", response.getFirstChildWithName(new QName("http://services.samples/xsd", "Price")).getLocalName());
    assertNotNull("Text does not exist", response.getFirstChildWithName(new QName("http://services.samples/xsd", "Price")).getText());
}
Also used : QName(javax.xml.namespace.QName) StockQuoteSampleClient(org.apache.synapse.samples.framework.clients.StockQuoteSampleClient) OMElement(org.apache.axiom.om.OMElement)

Example 58 with StockQuoteSampleClient

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

the class PropertyIntegrationAxis2ScopeTestCase method testLongVal.

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

Example 59 with StockQuoteSampleClient

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

the class PropertyIntegrationAxis2ScopeTestCase method testIntVal.

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

Example 60 with StockQuoteSampleClient

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

the class PropertyIntegrationAxis2ScopeTestCase method testFloatVal.

public void testFloatVal() throws Exception {
    StockQuoteSampleClient client = getStockQuoteClient();
    OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/propertyFloatAxis2TestProxy", null, null, "Random Symbol", null);
    assertTrue("Float Property Not Set in the Axis2 scope!", response.toString().contains("123.123"));
}
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