Example usage for javax.xml.ws WebServiceException getMessage

List of usage examples for javax.xml.ws WebServiceException getMessage

Introduction

In this page you can find the example usage for javax.xml.ws WebServiceException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:com.omertron.thetvdbapi.TheTVDBApi.java

/**
 * Get the series information/*  www .j av a  2 s .  com*/
 *
 * @param id
 * @param language
 * @return
 */
public Series getSeries(String id, String language) {
    StringBuilder urlBuilder = new StringBuilder();
    try {
        urlBuilder.append(getXmlMirror(apiKey));
        urlBuilder.append(apiKey);
        urlBuilder.append(SERIES_URL);
        urlBuilder.append(id);
        urlBuilder.append("/");
        if (language != null) {
            urlBuilder.append(language).append(XML_EXTENSION);
        }
    } catch (WebServiceException ex) {
        LOG.warn(ex.getMessage(), ex);
        return null;
    }

    LOG.trace(URL, urlBuilder.toString());
    List<Series> seriesList = TvdbParser.getSeriesList(urlBuilder.toString(), getBannerMirror(apiKey));
    if (seriesList.isEmpty()) {
        return null;
    } else {
        return seriesList.get(0);
    }
}

From source file:com.amalto.workbench.editors.DataClusterDialog.java

private void showInTextWidget(LineItem lineItem) {
    if (lineItem == null) {
        textViewer.setText(""); //$NON-NLS-1$
        recordContent = ""; //$NON-NLS-1$
        return;/*from w  w w  .j  ava2 s. c o m*/
    }

    try {
        final TMDMService service = Util.getMDMService(model);
        final WSItem wsItem = service.getItem(new WSGetItem(new WSItemPK(lineItem.getConcept().trim(),
                Arrays.asList(lineItem.getIds()), (WSDataClusterPK) model.getWsKey())));
        recordContent = Util.formatXsdSource(wsItem.getContent());
        textViewer.setText(recordContent);
    } catch (WebServiceException e) {
        log.error(e.getMessage(), e);
    } catch (XtentisException e) {
        log.error(e.getMessage(), e);
        MessageDialog.openError(getShell(), Messages._Error,
                Messages.bind(Messages.DataClusterBrowserMainPage_36, e.getLocalizedMessage()));
    }
}

From source file:com.omertron.thetvdbapi.TheTVDBApi.java

/**
 * Get all the episodes for a series. Note: This could be a lot of records
 *
 * @param id//from  w  w  w .  j a  va 2s .  c om
 * @param language
 * @return
 */
public List<Episode> getAllEpisodes(String id, String language) {
    List<Episode> episodeList = Collections.emptyList();

    if (isValidNumber(id)) {
        StringBuilder urlBuilder = new StringBuilder();
        try {
            urlBuilder.append(getXmlMirror(apiKey));
        } catch (WebServiceException ex) {
            LOG.warn(ex.getMessage(), ex);
            urlBuilder.append("http://thetvdb.com/api/");
        }
        urlBuilder.append(apiKey);
        urlBuilder.append(SERIES_URL);
        urlBuilder.append(id);
        urlBuilder.append(ALL_URL);
        if (StringUtils.isNotBlank(language)) {
            urlBuilder.append(language).append(XML_EXTENSION);
        }

        LOG.trace(URL, urlBuilder.toString());
        episodeList = TvdbParser.getAllEpisodes(urlBuilder.toString(), -1, getBannerMirror(apiKey));
    }
    return episodeList;
}

From source file:com.omertron.thetvdbapi.TheTVDBApi.java

/**
 * Generic function to get either the standard TV episode list or the DVD
 * list//from www.j  av  a2  s .c  o  m
 *
 * @param seriesId
 * @param seasonNbr
 * @param episodeNbr
 * @param language
 * @param episodeType
 * @return
 */
private Episode getTVEpisode(String seriesId, int seasonNbr, int episodeNbr, String language,
        String episodeType) {
    if (!isValidNumber(seriesId) || !isValidNumber(seasonNbr) || !isValidNumber(episodeNbr)) {
        // Invalid number passed
        return new Episode();
    }

    StringBuilder urlBuilder = new StringBuilder();
    try {
        urlBuilder.append(getXmlMirror(apiKey));
        urlBuilder.append(apiKey);
        urlBuilder.append(SERIES_URL);
        urlBuilder.append(seriesId);
        urlBuilder.append(episodeType);
        urlBuilder.append(seasonNbr);
        urlBuilder.append("/");
        urlBuilder.append(episodeNbr);
        urlBuilder.append("/");
        if (language != null) {
            urlBuilder.append(language).append(XML_EXTENSION);
        }
    } catch (WebServiceException ex) {
        LOG.warn(ex.getMessage(), ex);
        return new Episode();
    }

    LOG.trace(URL, urlBuilder.toString());
    return TvdbParser.getEpisode(urlBuilder.toString(), getBannerMirror(apiKey));
}

From source file:com.clustercontrol.jmx.dialog.JmxCreateDialog.java

private List<JmxMasterInfo> getJmxMasterInfoList(String managerName)
        throws com.clustercontrol.ws.jmxmaster.HinemosUnknown_Exception,
        com.clustercontrol.ws.jmxmaster.InvalidRole_Exception,
        com.clustercontrol.ws.jmxmaster.InvalidUserPass_Exception {
    WebServiceException wse = null;
    EndpointUnit endpointUnit = EndpointManager.get(managerName);
    for (EndpointSetting<JmxMasterEndpoint> endpointSetting : endpointUnit
            .getEndpoint(JmxMasterEndpointService.class, JmxMasterEndpoint.class)) {
        try {//from  w w  w  .ja va  2  s . c  om
            JmxMasterEndpoint endpoint = endpointSetting.getEndpoint();
            return endpoint.getJmxMasterInfoList();
        } catch (WebServiceException e) {
            wse = e;
            m_log.warn("getJmxMasterInfoList(), " + e.getMessage(), e);
            endpointUnit.changeEndpoint();
        }
    }
    throw wse;
}

From source file:com.docdoku.client.data.MainModel.java

public WorkflowModel[] getWorkflowModels() {
    WorkflowModel[] models = mCache.getWorkflowModels();

    if (models == null) {
        try {/*from   w ww. j  a v  a  2  s . c o m*/
            System.out.println("Retrieving workflow models");
            models = Tools.resetParentReferences(mWorkflowService.getWorkflowModels(getWorkspace().getId()));
            mCache.cacheWorkflowModels(models);
        } catch (WebServiceException pWSEx) {
            String message;
            Throwable t = pWSEx.getCause();
            if (t != null) {
                message = t.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown") : t.getMessage();
            } else {
                message = pWSEx.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown")
                        : pWSEx.getMessage();
            }

            showContinueOrExitDialog(message);
        } catch (Exception pEx) {
            String message = pEx.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown")
                    : pEx.getMessage();
            showContinueOrExitDialog(message);
        }
    }
    return models;
}

From source file:com.docdoku.client.data.MainModel.java

public DocumentMasterKey[] getStateChangeEventSubscriptions() {
    DocumentMasterKey[] subKeys = mCache.getStateSubscriptions();

    if (subKeys == null) {
        try {//from www  .ja  v a 2  s.  c  o m
            System.out.println("Retrieving state subscriptions");
            subKeys = mDocumentService.getStateChangeEventSubscriptions(getWorkspace().getId());
            mCache.cacheStateSubscriptions(subKeys);
        } catch (WebServiceException pWSEx) {
            String message;
            Throwable t = pWSEx.getCause();
            if (t != null) {
                message = t.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown") : t.getMessage();
            } else {
                message = pWSEx.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown")
                        : pWSEx.getMessage();
            }

            showContinueOrExitDialog(message);
        } catch (Exception pEx) {
            String message = pEx.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown")
                    : pEx.getMessage();
            showContinueOrExitDialog(message);
        }
    }
    return subKeys;
}

From source file:com.docdoku.client.data.MainModel.java

public DocumentMasterKey[] getIterationChangeEventSubscriptions() {
    DocumentMasterKey[] subKeys = mCache.getIterationSubscriptions();

    if (subKeys == null) {
        try {//  w  w w  .ja v a 2 s .co m
            System.out.println("Retrieving iteration subscriptions");
            subKeys = mDocumentService.getIterationChangeEventSubscriptions(getWorkspace().getId());
            mCache.cacheIterationSubscriptions(subKeys);
        } catch (WebServiceException pWSEx) {
            String message;
            Throwable t = pWSEx.getCause();
            if (t != null) {
                message = t.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown") : t.getMessage();
            } else {
                message = pWSEx.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown")
                        : pWSEx.getMessage();
            }

            showContinueOrExitDialog(message);
        } catch (Exception pEx) {
            String message = pEx.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown")
                    : pEx.getMessage();
            showContinueOrExitDialog(message);
        }
    }
    return subKeys;
}

From source file:com.docdoku.client.data.MainModel.java

public DocumentMaster[] findDocMsByFolder(String pCompletePath) {
    DocumentMaster[] docMs = mCache.findDocMsByFolder(pCompletePath);

    if (docMs == null) {
        try {//from w  ww.j av  a2  s  .  co  m
            System.out.println("Searching document masters by folder " + pCompletePath);
            docMs = Tools.resetParentReferences(mDocumentService.findDocumentMastersByFolder(pCompletePath));
            mCache.cacheDocMsByFolder(pCompletePath, docMs);
        } catch (WebServiceException pWSEx) {
            String message;
            Throwable t = pWSEx.getCause();
            if (t != null) {
                message = t.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown") : t.getMessage();
            } else {
                message = pWSEx.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown")
                        : pWSEx.getMessage();
            }

            showContinueOrExitDialog(message);
        } catch (Exception pEx) {
            String message = pEx.getMessage() == null ? I18N.BUNDLE.getString("Error_unknown")
                    : pEx.getMessage();
            showContinueOrExitDialog(message);
        }
    }
    return docMs;
}