WSDLInteropTestDocLitPortType binding;
try {
if (url != null) {
binding = new WSDLInteropTestDocLitServiceLocator().getWSDLInteropTestDocLitPort(url);
} else {
binding = new WSDLInteropTestDocLitServiceLocator().getWSDLInteropTestDocLitPort();
}
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
String str = "Hello there!";
String [] strArray = new String [] { "1", "two", "trois" };
ArrayOfstring_literal param = new ArrayOfstring_literal();
param.setString(strArray);
assertEquals("echoString results differ", binding.echoString(str), str);
String [] resArray = binding.echoStringArray(param).getString();
assertEquals("String array lengths differ",
strArray.length,
resArray.length);
for (int i = 0; i < strArray.length; i++) {
assertEquals("Array members at index " + i + " differ",
strArray[i],
resArray[i]);
}
SOAPStruct struct = new SOAPStruct();
struct.setVarFloat(3.14159F);
struct.setVarInt(69);
struct.setVarString("Struct-o-rama");
assertTrue("Structs weren't equal",
struct.equals(binding.echoStruct(struct)));
// test echoVoid
binding.echoVoid();