Vector listInvokers = new Vector();
SSDObjectArray ssdListInvokers = parameters.getArray(HPIDialogueConstants.LIST_INVOKERS);
for (int i = 0; i < ssdListInvokers.getSize(); i ++) {
SSDObjectNode ssdInvoker = ssdListInvokers.getNode(i);
Invoker invoker = new Invoker();
invoker.setId(ssdInvoker.getLeaf(HPIDialogueConstants.ID).getValue());
invoker.setDescription(ssdInvoker.getLeaf(HPIDialogueConstants.DESCRIPTION).getValue());
SSDObjectArray ssdExecutables = ssdInvoker.getArray(HPIDialogueConstants.EXECUTABLES);
for (int e = 0; e < ssdExecutables.getSize(); e ++) {
SSDObjectNode ssdExecutable = ssdExecutables.getNode(e);
Executable executable = new Executable();
executable.setCanonicalPath(ssdExecutable.getLeaf(HPIDialogueConstants.CANONICAL_PATH).getValue());
SSDObjectArray ssdParameters = ssdExecutable.getArray(HPIDialogueConstants.PARAMETERS);
for (int p = 0; p < ssdParameters.getSize(); p ++) {
SSDObjectNode ssdParameter = ssdParameters.getNode(p);
Parameter parameter = new Parameter();
parameter.setKey(ssdParameter.getLeaf(HPIDialogueConstants.KEY).getValue());
parameter.setValue(ssdParameter.getLeaf(HPIDialogueConstants.VALUE).getValue());
executable.getParameters().addElement(parameter);
}
invoker.getExecutables().addElement(executable);
}
listInvokers.addElement(invoker);
}
return new ListInvokersResponse(listInvokers, responseMessage, responseStatus);
} else if (serviceName.equals(HPIDialogueConstants.DESCRIBE_INVOKER_SERVICE)) {
SSDObjectNode ssdInvoker = parameters.getNode(HPIDialogueConstants.INVOKER);
Invoker invoker = new Invoker();
invoker.setId(ssdInvoker.getLeaf(HPIDialogueConstants.ID).getValue());
invoker.setDescription(ssdInvoker.getLeaf(HPIDialogueConstants.DESCRIPTION).getValue());
SSDObjectArray ssdExecutables = ssdInvoker.getArray(HPIDialogueConstants.EXECUTABLES);
for (int e = 0; e < ssdExecutables.getSize(); e ++) {
SSDObjectNode ssdExecutable = ssdExecutables.getNode(e);
Executable executable = new Executable();
executable.setCanonicalPath(ssdExecutable.getLeaf(HPIDialogueConstants.CANONICAL_PATH).getValue());
SSDObjectArray ssdParameters = ssdExecutable.getArray(HPIDialogueConstants.PARAMETERS);
for (int p = 0; p < ssdParameters.getSize(); p ++) {
SSDObjectNode ssdParameter = ssdParameters.getNode(p);
Parameter parameter = new Parameter();
parameter.setKey(ssdParameter.getLeaf(HPIDialogueConstants.KEY).getValue());
parameter.setValue(ssdParameter.getLeaf(HPIDialogueConstants.VALUE).getValue());
executable.getParameters().addElement(parameter);
}
invoker.getExecutables().addElement(executable);
}
return new DescribeInvokerResponse(invoker, responseMessage, responseStatus);
} else if (serviceName.equals(HPIDialogueConstants.LOGOFF_SERVICE)) {
return new LogoffResponse(responseMessage, responseStatus);