_testEchoStringArrayAlt();
_testEchoStringArrayAlt();
}
public void _testEchoStringArrayAlt() throws Exception {
try{
GorillaInterface proxy = getProxy();
// Test sending Hello World
String[] request1 = new String[] {"Hello", "World"};
String[] response1 = proxy.echoStringArrayAlt(request1);
assertTrue(response1 != null);
assertTrue(compareArrays(request1, response1));
// Test with empty list
String[] request2 = new String[] {};
String[] response2 = proxy.echoStringArrayAlt(request2);
assertTrue(response2 != null);
assertTrue(compareArrays(request2, response2));
// Test with null
// Note that the response will be an empty array because
// the JAXB bean will never represent List<String> as a null. This is expected.
String[] request3 = null;
String[] response3 = proxy.echoStringArrayAlt(request3);
assertTrue(response3 != null && response3.length == 0);
// Test sending Hello null World
// Note that the null is preserved and the request and response
// are the same..note that this is different than the xsd:list processing (see testStringList above)
// This is expected.
String[] request4 = new String[] {"Hello", null, "World"};
String[] response4 = proxy.echoStringArrayAlt(request4);
assertTrue(response4!= null);
assertTrue(compareArrays(request4, response4)); // Response 4 should be the same as Request 1
// Test sending "Hello World"
// Note that the Hello World remains one item.
String[] request5 = new String[] {"Hello World"};
String[] response5 = proxy.echoStringArrayAlt(request5);
assertTrue(response5!= null);
assertTrue(compareArrays(request5, response5)); // Response 5 should be the same as Request 1
}catch(Exception e){
e.printStackTrace();
fail("Exception received" + e);