use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class IterateSOAPActionTestCase method testSOAPAction.
public void testSOAPAction() throws Exception {
String addUrl = "http://localhost:8280/services/iterateWithSOAPActionTestProxy";
StockQuoteSampleClient client = getStockQuoteClient();
SampleClientResult result = client.requestStandardQuote(addUrl, null, null, "WSO2", null);
assertTrue("Client didn't get response", result.responseReceived());
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class HTTPHeaderCaseSensitivityTestCase method testHttpHeaderUpperCase.
/**
* Test by adding a http header with name "TEST_HEADER" where all the letters are in uppercase
* @throws AxisFault
*/
public void testHttpHeaderUpperCase() throws AxisFault {
StockQuoteSampleClient client = getStockQuoteClient();
client.addHttpHeader("TEST_HEADER", "uppercase");
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/httpHeaderTestProxy", null, null, "WSO2", null);
assertNotNull("Response message null", response);
OMElement returnElement = response.getFirstElement();
OMElement symbolElement = returnElement.getFirstChildWithName(new QName("http://services.samples/xsd", "symbol"));
assertEquals("Fault, invalid response", "uppercase", symbolElement.getText());
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class HTTPHeaderCaseSensitivityTestCase method testHttpHeaderCombined.
/**
* Add a http header with name "test_header" where the letters are in both upper & lower case
* @throws AxisFault
*/
public void testHttpHeaderCombined() throws AxisFault {
StockQuoteSampleClient client = getStockQuoteClient();
client.addHttpHeader("Test_Header", "mixed");
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/httpHeaderTestProxy", null, null, "WSO2", null);
assertNotNull("Response message null", response);
OMElement returnElement = response.getFirstElement();
OMElement symbolElement = returnElement.getFirstChildWithName(new QName("http://services.samples/xsd", "symbol"));
assertEquals("Fault, invalid response", "mixed", symbolElement.getText());
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class InLineLocalEntryXsltTransformationTestCase method testXsltTransformationInlineLocalEntry.
public void testXsltTransformationInlineLocalEntry() throws AxisFault {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendCustomQuoteRequest("http://localhost:8280/services/xsltLocalEntryTestProxy", null, null, "IBM");
assertNotNull("Response is null", response);
assertTrue("Invalid response received", response.toString().contains("Code"));
assertTrue("Invalid response received", response.toString().contains("IBM"));
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class XsltTransformationWithPropertyTestCase method testXsltTransformationWithProperty.
public void testXsltTransformationWithProperty() throws AxisFault {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendCustomQuoteRequest("http://localhost:8280/services/xsltTransformPropertyTestProxy", null, null, "IBM");
assertNotNull("Response is null", response);
assertTrue("Response does not contain Code", response.toString().contains("Code"));
assertTrue("Response does not contain WSO2", response.toString().contains("WSO2"));
}
Aggregations