use of org.apache.hello_world_doc_lit_bare.SOAPService in project cxf by apache.
the class OOBHeaderTest method testBasicConnection.
@Test
public void testBasicConnection() throws Exception {
URL wsdl = getClass().getResource("/wsdl/doc_lit_bare.wsdl");
assertNotNull("WSDL is null", wsdl);
SOAPService service = new SOAPService(wsdl, serviceName);
assertNotNull("Service is null", service);
PutLastTradedPricePortType putLastTradedPrice = service.getPort(portName, PutLastTradedPricePortType.class);
updateAddressPort(putLastTradedPrice, PORT);
TradePriceData priceData = new TradePriceData();
priceData.setTickerPrice(1.0f);
priceData.setTickerSymbol("CELTIX");
assertFalse(check(0, putLastTradedPrice, false, true, priceData));
assertFalse(check(1, putLastTradedPrice, false, true, priceData));
assertTrue(check(2, putLastTradedPrice, false, true, priceData));
assertTrue(check(3, putLastTradedPrice, false, true, priceData));
assertFalse(check(0, putLastTradedPrice, true, true, priceData));
assertFalse(check(1, putLastTradedPrice, true, true, priceData));
assertFalse(check(2, putLastTradedPrice, true, true, priceData));
assertFalse(check(3, putLastTradedPrice, true, true, priceData));
assertTrue(check(0, putLastTradedPrice, false, false, priceData));
assertTrue(check(1, putLastTradedPrice, false, false, priceData));
assertTrue(check(2, putLastTradedPrice, false, false, priceData));
assertTrue(check(4, putLastTradedPrice, false, false, priceData));
assertTrue(check(0, putLastTradedPrice, true, false, priceData));
assertTrue(check(1, putLastTradedPrice, true, false, priceData));
assertTrue(check(2, putLastTradedPrice, true, false, priceData));
assertTrue(check(4, putLastTradedPrice, true, false, priceData));
}
use of org.apache.hello_world_doc_lit_bare.SOAPService in project cxf by apache.
the class DOCBareClientServerTest method testNillableParameter.
@Test
public void testNillableParameter() throws Exception {
URL wsdl = getClass().getResource("/wsdl/doc_lit_bare.wsdl");
assertNotNull("WSDL is null", wsdl);
SOAPService service = new SOAPService(wsdl, serviceName);
assertNotNull("Service is null", service);
PutLastTradedPricePortType port = service.getPort(portName, PutLastTradedPricePortType.class);
updateAddressPort(port, PORT);
String result = port.nillableParameter(null);
assertNull(result);
}
use of org.apache.hello_world_doc_lit_bare.SOAPService in project cxf by apache.
the class DOCBareClientServerTest method testBasicConnection.
@Test
public void testBasicConnection() throws Exception {
URL wsdl = getClass().getResource("/wsdl/doc_lit_bare.wsdl");
assertNotNull("WSDL is null", wsdl);
SOAPService service = new SOAPService(wsdl, serviceName);
assertNotNull("Service is null", service);
PutLastTradedPricePortType putLastTradedPrice = service.getPort(portName, PutLastTradedPricePortType.class);
updateAddressPort(putLastTradedPrice, PORT);
String response = putLastTradedPrice.bareNoParam();
assertEquals("testResponse", response);
TradePriceData priceData = new TradePriceData();
priceData.setTickerPrice(1.0f);
priceData.setTickerSymbol("CELTIX");
Holder<TradePriceData> holder = new Holder<TradePriceData>(priceData);
for (int i = 0; i < 5; i++) {
putLastTradedPrice.sayHi(holder);
assertEquals(4.5f, holder.value.getTickerPrice(), 0.01);
assertEquals("APACHE", holder.value.getTickerSymbol());
putLastTradedPrice.putLastTradedPrice(priceData);
}
}
Aggregations