use of com.amalto.workbench.webservices.WSServicesList in project tmdm-studio-se by Talend.
the class ServiceConfigrationMainPage method setForServiceNameCombo.
protected void setForServiceNameCombo() {
try {
service = Util.getMDMService(getXObject());
// $NON-NLS-1$
WSServicesList list = service.getServicesList(new WSGetServicesList(""));
List<WSServicesListItem> items = list.getItem();
if (items != null) {
String[] sortedList = new String[items.size()];
for (int i = 0; i < items.size(); i++) {
sortedList[i] = items.get(i).getJndiName();
}
Arrays.sort(sortedList);
for (String element : sortedList) {
WSServiceGetDocument doc = service.getServiceDocument(new WSString(element.trim()));
if (doc.getConfigureSchema() == null || doc.getConfigureSchema().length() == 0) {
continue;
}
serviceNameCombo.add(element);
}
}
} catch (Exception e) {
if (!Util.handleConnectionException(getSite().getShell(), e, Messages.EditXObjectAction_ErrorMsg2)) {
MessageDialog.openError(getSite().getShell(), Messages._Error, Messages.bind(Messages.EditXObjectAction_ErrorMsg2, e.getLocalizedMessage()));
}
}
}
use of com.amalto.workbench.webservices.WSServicesList in project tmdm-studio-se by Talend.
the class RoutingRuleMainPage method initServiceNameCombo.
/**
* DOC hbhong Comment method "initServiceNameCombo".
*
* @throws XtentisException
*/
protected void initServiceNameCombo() throws XtentisException {
// $NON-NLS-1$
WSServicesList list = Util.getMDMService(getXObject()).getServicesList(new WSGetServicesList(""));
List<WSServicesListItem> items = list.getItem();
if (items != null) {
String[] sortedList = new String[items.size()];
for (int i = 0; i < items.size(); i++) {
sortedList[i] = items.get(i).getJndiName();
}
Arrays.sort(sortedList);
for (String element : sortedList) {
serviceNameCombo.add(element);
}
// serviceNameCombo.add("");
}
}
Aggregations