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);