ua.start();
System.out.println("Started: "+ua.activityName()+"\n");
ContextManager contextManager = new ContextManager();
Context[] contexts = contextManager.contexts();
Context theContext1 = null;
Context theContext2 = null;
int numContexts = (contexts != null ? contexts.length : 0);
for (int i = 0; i < numContexts; i++) {
if (contexts[i] != null) {
if (theContext1 == null) {
theContext1 = contexts[i];
} else {
theContext2 = contexts[i];
break;
}
}
}
if (theContext1 == null || theContext2 == null) {
fail("Demo contexts not found");
}
if (!(theContext1 instanceof DemoSOAPContextImple) ||
!(theContext1 instanceof DemoSOAPContextImple)) {
fail("Demo contexts not found");
}
((SOAPContext)theContext1).serialiseToElement(root);
((SOAPContext)theContext2).serialiseToElement(root);
System.out.println("Context is " + root.getTextContent());
ua.end();
System.out.println("\nFinished child activity.\n");
contexts = contextManager.contexts();
theContext1 = null;
theContext2 = null;
numContexts = (contexts != null ? contexts.length : 0);
for (int i = 0; i < numContexts; i++) {