URI uri = new URI("http://hellonico.net");
switch (type) {
case NOTIFICATION:
return new Notification(id, uri, xml.parseXML("<hello/>"));
case PIPA:
return new PIPATask(id, uri, uri, uri, "initOperationSOAPAction");
case PA:
return new PATask(id, new URI("http://hellonico.net"), "processId",
"soap", xml.parseXML("<hello/>"));
default:
int rand = random.nextInt(3);
switch (rand) {
case 0:
return new PATask(id, new URI("http://hellonico.net"),
"processId", "soap", xml.parseXML("<hello/>"));
case 1:
return new PIPATask(id, uri, uri, uri,
"initOperationSOAPAction");
default:
return new Notification(id, uri, xml.parseXML("<hello/>"));
}
}