List of usage examples for javax.xml.ws WebServiceException getCause
public synchronized Throwable getCause()
From source file:com.docdoku.client.actions.MainController.java
public DocumentMaster moveDocM(String pParentFolder, DocumentMaster pDocumentMaster) throws Exception { try {//w w w .j a v a 2 s . co m System.out.println("Moving document master " + pDocumentMaster); DocumentMaster newDocumentMaster; newDocumentMaster = Tools.resetParentReferences( mDocumentService.moveDocumentMaster(pParentFolder, pDocumentMaster.getKey())); MainModel.getInstance().updater.moveDocM(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 approve(TaskKey pTaskKey, String pComment) throws Exception { try {//from w w w . j ava 2s. co m System.out.println("Approving task " + pTaskKey); DocumentMaster newDocumentMaster; String workspaceId = MainModel.getInstance().getWorkspace().getId(); newDocumentMaster = Tools .resetParentReferences(mDocumentService.approve(workspaceId, pTaskKey, pComment)); 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 reject(TaskKey pTaskKey, String pComment) throws Exception { try {// ww w. j av a 2 s . c o m System.out.println("Rejecting task " + pTaskKey); DocumentMaster newDocumentMaster; String workspaceId = MainModel.getInstance().getWorkspace().getId(); newDocumentMaster = Tools .resetParentReferences(mDocumentService.reject(workspaceId, pTaskKey, pComment)); 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 void removeFileFromTemplate(BinaryResource pFile) throws Exception { try {// w w w . j ava2 s . c om System.out.println("Removing file " + pFile + " from document template"); //DocumentMasterTemplate newTemplate; //newTemplate = Tools.resetParentReferences(mDocumentService.removeFileFromTemplate(pFile.getFullName())); DocumentMasterTemplate newTemplate = mDocumentService.removeFileFromTemplate(pFile.getFullName()); MainModel.getInstance().updater.updateDocMTemplate(newTemplate); } 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 login(String login, String password, String workspaceId) throws Exception { try {/* w w w . jav a 2 s .co m*/ ((BindingProvider) mDocumentService).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, login); ((BindingProvider) mDocumentService).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password); ((BindingProvider) mWorkflowService).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, login); ((BindingProvider) mWorkflowService).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password); ((BindingProvider) mFileService).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, login); ((BindingProvider) mFileService).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password); mDocumentService.whoAmI(workspaceId); MainModel.init(login, password, workspaceId, mDocumentService, mWorkflowService, mFileService); } 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[] createVersion(DocumentMaster pDocumentMaster, String pTitle, String pDescription, WorkflowModel pWorkflowModel) throws Exception { try {//from w w w . j a va2s .c om System.out.println("Creating new version to document master " + pDocumentMaster + " with title " + pTitle + " and description " + pDescription); //TODO ACL ACLUserEntry[] userEntries = null; ACLUserGroupEntry[] groupEntries = null; DocumentMaster[] originalAndNewDocM = Tools.resetParentReferences( mDocumentService.createVersion(pDocumentMaster.getKey(), pTitle, pDescription, pWorkflowModel == null ? null : pWorkflowModel.getId(), userEntries, groupEntries)); MainModel.getInstance().updater.makeNewVersion(originalAndNewDocM); return originalAndNewDocM; } 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 createDocM(String pParentFolder, String pDocMId, String pTitle, String pDescription, DocumentMasterTemplate pTemplate, WorkflowModel pWorkflowModel) throws Exception { try {/*from w ww .j a v a 2 s.c om*/ System.out.println("Saving document master " + pDocMId + " version " + "A" + " with title " + pTitle + ", template " + pTemplate + " and description " + pDescription + " in " + pParentFolder); DocumentMaster newDocumentMaster; //TODO ACL ACLUserEntry[] userEntries = null; ACLUserGroupEntry[] groupEntries = null; newDocumentMaster = Tools.resetParentReferences(mDocumentService.createDocumentMaster(pParentFolder, pDocMId, pTitle, pDescription, pTemplate == null ? null : pTemplate.getId(), pWorkflowModel == null ? null : pWorkflowModel.getId(), userEntries, groupEntries)); MainModel.getInstance().updater.createDocMInFolder(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 DocumentMasterTemplate updateDocMTemplate(DocumentMasterTemplate pTemplate, String pDocumentType, String pMask, Set<InstanceAttributeTemplate> pAttributeTemplates, boolean pIdGenerated) throws Exception { try {/*from ww w. ja va 2 s . c o m*/ System.out.println("Saving document master template " + pTemplate); //DocumentMasterTemplate newTemplate; //newTemplate = Tools.resetParentReferences(mDocumentService.updateDocumentMasterTemplate(pTemplate.getKey(), pDocumentType, pMask, pAttributeTemplates.toArray(new InstanceAttributeTemplate[pAttributeTemplates.size()]), pIdGenerated)); DocumentMasterTemplate newTemplate = mDocumentService.updateDocumentMasterTemplate(pTemplate.getKey(), pDocumentType, pMask, pAttributeTemplates.toArray(new InstanceAttributeTemplate[pAttributeTemplates.size()]), pIdGenerated); MainModel.getInstance().updater.updateDocMTemplate(newTemplate); return newTemplate; } 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 DocumentMasterTemplate createDocMTemplate(String pId, String pDocumentType, String pMask, Set<InstanceAttributeTemplate> pAttributeTemplates, boolean pIdGenerated) throws Exception { try {/* ww w . j av a2 s . com*/ System.out.println("Saving document master template " + pId + " with mask " + pMask); String workspaceId = MainModel.getInstance().getWorkspace().getId(); //DocumentMasterTemplate newTemplate; // newTemplate = Tools.resetParentReferences(mDocumentService.createDocumentMasterTemplate(workspaceId, pId, pDocumentType, pMask, pAttributeTemplates.toArray(new InstanceAttributeTemplate[pAttributeTemplates.size()]), pIdGenerated)); DocumentMasterTemplate newTemplate = mDocumentService.createDocumentMasterTemplate(workspaceId, pId, pDocumentType, pMask, pAttributeTemplates.toArray(new InstanceAttributeTemplate[pAttributeTemplates.size()]), pIdGenerated); MainModel.getInstance().updater.createDocMTemplate(newTemplate); return newTemplate; } 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 DocumentIteration updateDoc(DocumentIteration pDocument, String pComment, InstanceAttribute[] pAttributes, DocumentLink[] pLinks) throws Exception { try {/*w w w .ja v a 2s .c om*/ System.out.println("Updating document " + pDocument); DocumentMaster newDocM; DocumentIterationKey docKey = pDocument.getKey(); DocumentIterationKey[] linkKeys = new DocumentIterationKey[pLinks.length]; for (int i = 0; i < pLinks.length; i++) { linkKeys[i] = pLinks[i].getTargetDocumentKey(); } newDocM = Tools.resetParentReferences( mDocumentService.updateDocument(docKey, pComment, pAttributes, linkKeys)); MainModel.getInstance().updater.updateDocM(newDocM); return newDocM.getIteration(docKey.getIteration()); } catch (WebServiceException pWSEx) { Throwable t = pWSEx.getCause(); if (t instanceof Exception) { throw (Exception) t; } else { throw pWSEx; } } }