Search in sources :

Example 1 with WSServicesList

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()));
        }
    }
}
Also used : WSServicesListItem(com.amalto.workbench.webservices.WSServicesListItem) WSServiceGetDocument(com.amalto.workbench.webservices.WSServiceGetDocument) WSString(com.amalto.workbench.webservices.WSString) WSServicesList(com.amalto.workbench.webservices.WSServicesList) WSString(com.amalto.workbench.webservices.WSString) WSGetServicesList(com.amalto.workbench.webservices.WSGetServicesList) DocumentException(org.dom4j.DocumentException) IOException(java.io.IOException) WebServiceException(javax.xml.ws.WebServiceException)

Example 2 with WSServicesList

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("");
    }
}
Also used : WSServicesListItem(com.amalto.workbench.webservices.WSServicesListItem) WSServicesList(com.amalto.workbench.webservices.WSServicesList) WSString(com.amalto.workbench.webservices.WSString) WSGetServicesList(com.amalto.workbench.webservices.WSGetServicesList) Point(org.eclipse.swt.graphics.Point)

Aggregations

WSGetServicesList (com.amalto.workbench.webservices.WSGetServicesList)2 WSServicesList (com.amalto.workbench.webservices.WSServicesList)2 WSServicesListItem (com.amalto.workbench.webservices.WSServicesListItem)2 WSString (com.amalto.workbench.webservices.WSString)2 WSServiceGetDocument (com.amalto.workbench.webservices.WSServiceGetDocument)1 IOException (java.io.IOException)1 WebServiceException (javax.xml.ws.WebServiceException)1 DocumentException (org.dom4j.DocumentException)1 Point (org.eclipse.swt.graphics.Point)1