* Testing of StringList (xsd:list of string)
* SEI is mapped to String[] instead of List<String>
*/
public void testEchoStringListAlt() throws Exception {
try{
GorillaInterface proxy = getProxy();
// Test sending Hello World
String[] request1 = new String[] {"Hello", "World"};
String[] response1 = proxy.echoStringListAlt(request1);
assertTrue(response1 != null);
assertTrue(compareArrays(request1, response1));
// Test with empty array
String[] request2 = new String[] {};
String[] response2 = proxy.echoStringListAlt(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.echoStringListAlt(request3);
assertTrue(response3 != null && response3.length == 0);
// Test sending Hello null World
// Note that the null is purged by JAXB. This is expected.
String[] request4 = new String[] {"Hello", null, "World"};
String[] response4 = proxy.echoStringListAlt(request4);
assertTrue(response4!= null);
assertTrue(compareArrays(request1, response4)); // Response 4 should be the same as Request 1
// Test sending "Hello World"
// Note that the Hello World is divided into two items.
// This is due to the xsd:list serialization. This is expected.
String[] request5 = new String[] {"Hello World"};
String[] response5 = proxy.echoStringListAlt(request5);
assertTrue(response5!= null);
assertTrue(compareArrays(request1, response5)); // Response 5 should be the same as Request 1
}catch(Exception e){
e.printStackTrace();
fail("Exception received" + e);