Example usage for javax.xml.ws WebServiceException getCause

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

Introduction

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

Prototype

public synchronized Throwable getCause() 

Source Link

Document

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

Usage

From source file:com.docdoku.client.actions.MainController.java

public void delWorkflowModel(WorkflowModel pWorkflowModel) throws Exception {
    try {// ww  w .  j av a 2  s .  c  o  m
        System.out.println("Deleting workflow model " + pWorkflowModel);
        mWorkflowService.deleteWorkflowModel(pWorkflowModel.getKey());
        MainModel.getInstance().updater.delWorkflowModel(pWorkflowModel);
    } catch (WebServiceException pWSEx) {
        Throwable t = pWSEx.getCause();
        if (t instanceof Exception) {
            throw (Exception) t;
        } else {
            throw pWSEx;
        }
    }
}

From source file:com.docdoku.client.actions.MainController.java

public void renameFolder(String pCompletePath, String pNewName) throws Exception {
    try {/*www.  j a  v  a  2s  . c o  m*/
        System.out.println("Renaming folder " + pCompletePath);
        Folder folder = new Folder(pCompletePath);
        mDocumentService.moveFolder(pCompletePath, folder.getParentFolder().getCompletePath(), pNewName);
        MainModel.getInstance().updater.renameFolder(pCompletePath, pNewName);
    } catch (WebServiceException pWSEx) {
        Throwable t = pWSEx.getCause();
        if (t instanceof Exception) {
            throw (Exception) t;
        } else {
            throw pWSEx;
        }
    }
}

From source file:com.docdoku.client.actions.MainController.java

public DocumentMasterKey[] delFolder(String pFolder) throws Exception {
    try {//w w  w . jav  a  2 s .  c  o  m
        System.out.println("Deleting folder " + pFolder);
        DocumentMasterKey[] pks = mDocumentService.deleteFolder(pFolder);
        MainModel.getInstance().updater.delFolder(pFolder);
        return pks;
    } catch (WebServiceException pWSEx) {
        Throwable t = pWSEx.getCause();
        if (t instanceof Exception) {
            throw (Exception) t;
        } else {
            throw pWSEx;
        }
    }
}

From source file:com.docdoku.client.actions.MainController.java

public void delTag(String pTag) throws Exception {
    try {/*from  w w w.j av  a2s  .c  o  m*/
        System.out.println("Deleting tag " + pTag);
        String workspaceId = MainModel.getInstance().getWorkspace().getId();
        mDocumentService.deleteTag(new TagKey(workspaceId, pTag));
        MainModel.getInstance().updater.delTag(pTag);
    } catch (WebServiceException pWSEx) {
        Throwable t = pWSEx.getCause();
        if (t instanceof Exception) {
            throw (Exception) t;
        } else {
            throw pWSEx;
        }
    }
}

From source file:com.docdoku.client.actions.MainController.java

public void removeFileFromDocument(BinaryResource pFile) throws Exception {
    try {//from ww w  .  j ava 2s. c  om
        System.out.println("Removing file " + pFile + " from document");
        DocumentMaster newDocM;
        newDocM = Tools.resetParentReferences(mDocumentService.removeFileFromDocument(pFile.getFullName()));
        MainModel.getInstance().updater.updateDocM(newDocM);
    } catch (WebServiceException pWSEx) {
        Throwable t = pWSEx.getCause();
        if (t instanceof Exception) {
            throw (Exception) t;
        } else {
            throw pWSEx;
        }
    }
}

From source file:com.docdoku.client.actions.MainController.java

public User savePersonalInfo(String pName, String pEmail, String pLanguage) throws Exception {
    try {/*from w w  w  .j  a  v a 2  s.c  om*/
        System.out.println("Saving personnal informations");
        String workspaceId = MainModel.getInstance().getWorkspace().getId();
        User user = mDocumentService.savePersonalInfo(workspaceId, pName, pEmail, pLanguage);
        MainModel.getInstance().updater.updateUser(user);
        return user;
    } catch (WebServiceException pWSEx) {
        Throwable t = pWSEx.getCause();
        if (t instanceof Exception) {
            throw (Exception) t;
        } else {
            throw pWSEx;
        }
    }
}

From source file:com.docdoku.client.actions.MainController.java

public DocumentMaster saveTags(DocumentMaster pDocumentMaster, String[] pTags) throws Exception {
    try {/*from   w  w w . j a v  a 2 s. co  m*/
        System.out.println("Saving tags of document master " + pDocumentMaster);
        DocumentMaster newDocumentMaster;
        newDocumentMaster = Tools
                .resetParentReferences(mDocumentService.saveTags(pDocumentMaster.getKey(), pTags));
        MainModel.getInstance().updater.updateDocM(newDocumentMaster);
        return newDocumentMaster;
    } catch (WebServiceException pWSEx) {
        Throwable t = pWSEx.getCause();
        if (t instanceof Exception) {
            throw (Exception) t;
        } else {
            throw pWSEx;
        }
    }
}

From source file:com.docdoku.client.actions.MainController.java

public DocumentMaster checkInDocument(DocumentMaster pDocumentMaster) throws Exception {
    try {/*from  ww  w  .  j ava  2  s . c  om*/
        System.out.println("Checking In document master " + pDocumentMaster);
        DocumentMaster newDocumentMaster;
        newDocumentMaster = Tools
                .resetParentReferences(mDocumentService.checkInDocument(pDocumentMaster.getKey()));
        MainModel.getInstance().updater.checkIn(newDocumentMaster);
        return newDocumentMaster;
    } catch (WebServiceException pWSEx) {
        Throwable t = pWSEx.getCause();
        if (t instanceof Exception) {
            throw (Exception) t;
        } else {
            throw pWSEx;
        }
    }
}

From source file:com.docdoku.client.actions.MainController.java

public DocumentMaster checkOutDocument(DocumentMaster pDocumentMaster) throws Exception {
    try {/*from   w w  w  . ja  v  a2s .com*/
        System.out.println("Checking Out document master " + pDocumentMaster);
        DocumentMaster newDocumentMaster;
        newDocumentMaster = Tools
                .resetParentReferences(mDocumentService.checkOutDocument(pDocumentMaster.getKey()));
        MainModel.getInstance().updater.checkOut(newDocumentMaster);
        return newDocumentMaster;
    } catch (WebServiceException pWSEx) {
        Throwable t = pWSEx.getCause();
        if (t instanceof Exception) {
            throw (Exception) t;
        } else {
            throw pWSEx;
        }
    }
}

From source file:com.docdoku.client.actions.MainController.java

public DocumentMaster undoCheckOutDocument(DocumentMaster pDocumentMaster) throws Exception {
    try {// ww  w . j a  va  2  s  .c om
        System.out.println("Undoing Check Out document master " + pDocumentMaster);
        DocumentMaster newDocumentMaster;
        newDocumentMaster = Tools
                .resetParentReferences(mDocumentService.undoCheckOutDocument(pDocumentMaster.getKey()));
        MainModel.getInstance().updater.undoCheckOut(newDocumentMaster);
        return newDocumentMaster;
    } catch (WebServiceException pWSEx) {
        Throwable t = pWSEx.getCause();
        if (t instanceof Exception) {
            throw (Exception) t;
        } else {
            throw pWSEx;
        }
    }
}