public int getStatusFromAxisFault(AxisFault fault) { QName faultCode = fault.getFaultCode(); if (SOAP12Constants.QNAME_SENDER_FAULTCODE.equals(faultCode) || SOAP11Constants.QNAME_SENDER_FAULTCODE.equals(faultCode)) { return HttpServletResponse.SC_BAD_REQUEST; } return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; }
public int getStatusFromAxisFault(AxisFault fault) { QName faultCode = fault.getFaultCode(); if (SOAP12Constants.QNAME_SENDER_FAULTCODE.equals(faultCode) || SOAP11Constants.QNAME_SENDER_FAULTCODE.equals(faultCode)) { return HttpServletResponse.SC_BAD_REQUEST; } return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; }
public int getStatusFromAxisFault(AxisFault fault) { QName faultCode = fault.getFaultCode(); if (SOAP12Constants.QNAME_SENDER_FAULTCODE.equals(faultCode) || SOAP11Constants.QNAME_SENDER_FAULTCODE.equals(faultCode)) { return HttpServletResponse.SC_BAD_REQUEST; } return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; }
public BPELFault(Throwable cause) { this(cause.getMessage(), cause); if (cause instanceof AxisFault) { AxisFault f = (AxisFault) cause; setFaultCode(f.getFaultCode()); } }
public void updateRepository(String prevLocation, String prevNickName, String updatedLocation, String updatedNickName) throws Exception { try { repositoryAdminServiceStub.updateRepository(prevLocation, prevNickName, updatedLocation, updatedNickName); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(MessageFormat.format(bundle.getString(e.getFaultCode().getLocalPart()), updatedLocation), e); } else { handleException(MessageFormat.format(bundle.getString("failed.update.repository"), updatedLocation), e); } } }
public void removeRepository(String location) throws Exception { try { repositoryAdminServiceStub.removeRepository(location); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(MessageFormat.format(bundle.getString(e.getFaultCode().getLocalPart()), location), e); } else { handleException(MessageFormat.format(bundle.getString("failed.remove.repository"), location), e); } } }
public RepositoryInfo[] getAllRepositories() throws Exception { RepositoryInfo[] repositoryInfo = null; try { repositoryInfo = repositoryAdminServiceStub.getAllRepositories(); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(bundle.getString(e.getFaultCode().getLocalPart()), e); } else { handleException(bundle.getString("failed.get.repositories"), e); } } return repositoryInfo; }
public RepositoryInfo[] getEnabledRepositories() throws Exception { RepositoryInfo[] repositoryInfo = null; try { return repositoryAdminServiceStub.getEnabledRepositories(); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(bundle.getString(e.getFaultCode().getLocalPart()), e); } else { handleException(bundle.getString("failed.get.repositories"), e); } } return repositoryInfo; }
public LicenseInfo[] getLicensingInformation() throws Exception { LicenseInfo[] licenseInfo = null; try { licenseInfo = provAdminStub.getLicensingInformation(); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(bundle.getString(e.getFaultCode().getLocalPart()), e); } else { handleException(bundle.getString("failed.get.license.info"), e); } } return licenseInfo; }
public void enableRepository(String location, String enabled) throws Exception { try { boolean isEnabled = false; if (ENABLED.equals(enabled)) { isEnabled = true; } repositoryAdminServiceStub.enableRepository(location, isEnabled); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(MessageFormat.format(bundle.getString(e.getFaultCode().getLocalPart()), location), e); } else { handleException(MessageFormat.format(bundle.getString("failed.enable.repository"), location), e); } } }
public FeatureInfo getInstalledFeatureDetails(String featureID, String featureVersion) throws Exception { FeatureInfo featureInfo = null; try { featureInfo = provAdminStub.getInstalledFeatureInfo(featureID, featureVersion); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(MessageFormat.format(bundle.getString(e.getFaultCode().getLocalPart()), featureID, featureVersion), e); } else { handleException(MessageFormat.format(bundle.getString("failed.get.feature.information"), featureID, featureVersion), e); } } return featureInfo; }
public FeatureInfo[] getInstalledFeaturesWithProperty(String key, String value) throws Exception { FeatureInfo[] featureInfos = null; try { featureInfos = provAdminStub.getInstalledFeaturesWithProperty(key, value); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(MessageFormat.format(bundle.getString(e.getFaultCode().getLocalPart()), key, value), e); } else { handleException(MessageFormat.format(bundle.getString("failed.get.installed.feature.with.prop"), key, value), e); } } return featureInfos; }
private void setErrorDetails(MessageContext synapseInMsgCtx, AxisFault fault) { int errorCode = SynapseConstants.BLOCKING_SENDER_OPERATION_FAILED; if (fault.getFaultCode() != null && fault.getFaultCode().getLocalPart() != null && !"".equals(fault.getFaultCode().getLocalPart())) { try { errorCode = Integer.parseInt(fault.getFaultCode().getLocalPart()); } catch (NumberFormatException e) { errorCode = SynapseConstants.BLOCKING_SENDER_OPERATION_FAILED; } } synapseInMsgCtx.setProperty(SynapseConstants.ERROR_CODE, errorCode); synapseInMsgCtx.setProperty(SynapseConstants.ERROR_MESSAGE, fault.getMessage()); synapseInMsgCtx.setProperty(SynapseConstants.ERROR_DETAIL, fault.getDetail() != null ? fault.getDetail().getText() : getStackTrace(fault)); }
public FeatureWrapper[] getInstalledFeatures() throws Exception { FeatureWrapper[] featureWrappers = null; try { Feature[] features = provAdminStub.getAllInstalledFeatures(); featureWrappers = Utils.processFeatureTree(features, 0); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(bundle.getString(e.getFaultCode().getLocalPart()), e); } else { handleException(bundle.getString("failed.get.installed.features"), e); } } return featureWrappers; }
private String getDecision(String request, EntitlementServiceStub stub, Authenticator authenticator) throws Exception { try { return stub.getDecision(request); } catch (AxisFault e) { if (ProxyConstants.SESSION_TIME_OUT.equals(e.getFaultCode().getLocalPart())) { setAuthCookie(true, stub, authenticator); return stub.getDecision(request); } else { throw e; } } }
private String getDecision(String request, EntitlementServiceStub stub, Authenticator authenticator) throws Exception { try { return stub.getDecision(request); } catch (AxisFault e) { if (ProxyConstants.SESSION_TIME_OUT.equals(e.getFaultCode().getLocalPart())) { setAuthCookie(true, stub, authenticator); return stub.getDecision(request); } else { throw e; } } }
public ProvisioningActionResultInfo reviewRevertPlan(String timestampString) throws Exception { ProvisioningActionResultInfo provisioningActionResultInfo = null; try { ProvisioningActionInfo provisioningActionInfo = new ProvisioningActionInfo(); provisioningActionInfo.setTimestamp(Long.parseLong(timestampString)); provisioningActionInfo.setActionType(ProfileModificationActionFactory.REVERT_ACTION); provisioningActionResultInfo = provAdminStub.reviewProvisioningAction(provisioningActionInfo); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(bundle.getString(e.getFaultCode().getLocalPart()), e); } else { handleException(bundle.getString("failed.review.prov.action"), e); } } return provisioningActionResultInfo; }
public ProvisioningActionResultInfo reviewInstallFeaturesAction(FeatureInfo[] features) throws Exception { ProvisioningActionResultInfo provisioningActionResultInfo = null; try { ProvisioningActionInfo provisioningActionInfo = new ProvisioningActionInfo(); provisioningActionInfo.setFeaturesToInstall(features); provisioningActionInfo.setActionType(ProfileModificationActionFactory.INSTALL_ACTION); provisioningActionResultInfo = provAdminStub.reviewProvisioningAction(provisioningActionInfo); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(bundle.getString(e.getFaultCode().getLocalPart()), e); } else { handleException(bundle.getString("failed.review.prov.action"), e); } } return provisioningActionResultInfo; }
public ProvisioningActionResultInfo reviewUninstallFeaturesAction(FeatureInfo[] features) throws Exception { ProvisioningActionResultInfo provisioningActionResultInfo = null; try { ProvisioningActionInfo provisioningActionInfo = new ProvisioningActionInfo(); provisioningActionInfo.setFeaturesToUninstall(features); provisioningActionInfo.setActionType(ProfileModificationActionFactory.UNINSTALL_ACTION); return provAdminStub.reviewProvisioningAction(provisioningActionInfo); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(bundle.getString(e.getFaultCode().getLocalPart()), e); } else { handleException(bundle.getString("failed.review.prov.action"), e); } } return provisioningActionResultInfo; }
public ProfileHistory[] getProfileHistory() throws Exception { try { ServiceClient client = provAdminStub._getServiceClient(); client.engageModule("addressing"); // IMPORTANT Options options = client.getOptions(); options.setUseSeparateListener(true); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); provAdminStub.startgetProfileHistory(callback); handleCallback(); } catch (AxisFault e) { if (e.getFaultCode() != null) { handleException(bundle.getString(e.getFaultCode().getLocalPart()), e); } else { handleException(bundle.getString("failed.get.profile.history"), e); } } return profileHistories; }