Search in sources :

Example 1 with WSString

use of com.amalto.workbench.webservices.WSString 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 WSString

use of com.amalto.workbench.webservices.WSString in project tmdm-studio-se by Talend.

the class ServiceConfigrationMainPage method setForConfigureContent.

protected void setForConfigureContent(String serviceName) {
    if (serviceName != null && !"".equals(serviceName)) {
        // $NON-NLS-1$
        document = service.getServiceDocument(new WSString(serviceName.trim()));
        String documentConfigure = ServiceConfigrationMainPage.formartXml(document.getConfigure());
        serviceConfigurationsText.setText(documentConfigure);
        // $NON-NLS-1$
        errorLabel.setText("");
    }
}
Also used : WSString(com.amalto.workbench.webservices.WSString) WSString(com.amalto.workbench.webservices.WSString)

Aggregations

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