InteropTestList binding;
try {
if (url == null) {
binding = new InteropTestListServiceLocator().getInteropTestList();
} else {
binding = new InteropTestListServiceLocator().getInteropTestList(url);
}
} catch (javax.xml.rpc.ServiceException jre) {
throw new AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertTrue("binding is null", binding != null);
try {
List node1 = new List();
node1.setVarInt(1);
node1.setVarString("last");
List node2 = new List();
node2.setVarInt(2);
node2.setVarString("middle");
node2.setChild(node1);
List list = new List();
list.setVarInt(3);
list.setVarString("first");
list.setChild(node2);
List value = binding.echoLinkedList(list);
List vnode2 = value.getChild();
List vnode1 = null;
if (vnode2 != null) {
vnode1 = vnode2.getChild();
}
if (value.getVarInt() != list.getVarInt() ||
!value.getVarString().equals(list.getVarString()) ||
vnode2 == null ||
vnode2.getVarInt() != node2.getVarInt() ||
!vnode2.getVarString().equals(node2.getVarString()) ||
vnode1 == null ||
vnode1.getVarInt() != node1.getVarInt() ||
!vnode1.getVarString().equals(node1.getVarString()) ||
vnode1.getChild() != null) {
throw new AssertionFailedError("List echo failed");
}
}
catch (java.rmi.RemoteException re) {
throw new AssertionFailedError("Remote Exception caught: " + re);
}