Example usage for java.rmi RemoteException getMessage

List of usage examples for java.rmi RemoteException getMessage

Introduction

In this page you can find the example usage for java.rmi RemoteException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message, including the message from the cause, if any, of this exception.

Usage

From source file:org.wso2.carbon.um.ws.api.WSClaimManager.java

@Override
public org.wso2.carbon.user.api.ClaimMapping[] getAllRequiredClaimMappings()
        throws org.wso2.carbon.user.api.UserStoreException {
    try {// w  w w  .j  ava 2s.co m
        return WSRealmUtil.convertToClaimMappings(stub.getAllRequiredClaimMappings());
    } catch (RemoteException e) {
        this.handleException(e.getMessage(), e);
    } catch (RemoteClaimManagerServiceUserStoreExceptionException e) {
        this.handleException(e.getMessage(), e);
    }
    return new ClaimMapping[0];
}

From source file:org.wso2.das.integration.common.clients.TemplateManagerAdminServiceClient.java

public String[] editConfiguration(ScenarioConfigurationDTO scenarioConfigurationDTO) throws RemoteException {
    try {/* w ww .jav  a2 s . c  o m*/
        return templateManagerAdminServiceStub.editConfiguration(scenarioConfigurationDTO);
    } catch (RemoteException e) {
        log.error("RemoteException", e);
        throw new RemoteException(e.getMessage(), e);
    }
}

From source file:org.wso2.dss.integration.test.jira.issues.CARBON15379XMLExternalEntityAttacksTestCase.java

@Test(groups = { "wso2.dss" }, description = "Do XML External entity attack on ndatasource admin service add "
        + "datasource call and see whether it rejects the requests", alwaysRun = true)
public void xmlExternalEntityAttackOnAddDataSourceTest() throws Exception {

    NDataSourceAdminServiceClient nDataSourceAdminServiceClient = new NDataSourceAdminServiceClient(
            dssContext.getContextUrls().getBackEndUrl(), sessionCookie);

    WSDataSourceMetaInfo dataSourceWithoutAttack = createWSDataSourceMetaInfo("TestDatasource3",
            xmlWithoutAttack, "RDBMS");
    try {// w w w.  j  av a2  s.c o m
        nDataSourceAdminServiceClient.addDataSource(dataSourceWithoutAttack);
    } catch (RemoteException e) {
        Assert.fail(
                "Adding datasource with correct XML should have been successful, Error - " + e.getMessage());
    } catch (Exception e) {
        Assert.fail(
                "Adding datasource with correct XML should have been successful, Error - " + e.getMessage());
    }

    WSDataSourceMetaInfo dataSourceWithAttack = createWSDataSourceMetaInfo("TestDatasource4", xmlWithAttack,
            "RDBMS");
    try {
        nDataSourceAdminServiceClient.addDataSource(dataSourceWithAttack); //this fails, but it doesn't throw an exception, needs to check the reason.
        //            Assert.fail("Adding datasource with incorrect XML should have been Failed, but it's passed");
    } catch (RemoteException e) {

    } catch (Exception e) {

    }
}

From source file:org.wso2.es.integration.common.clients.ActivityAdminServiceClient.java

public ActivityBean getActivities(String sessionCookie, String userName, String resourcePath, String fromDate,
        String toDate, String filter, int page) throws RemoteException, RegistryExceptionException {
    try {/* www.j a va 2  s.  c  o m*/
        return activityAdminServiceStub.getActivities(userName, resourcePath, fromDate, toDate, filter,
                page + "", sessionCookie);
    } catch (RemoteException e) {
        String msg = "Fails to get activities";
        log.error(msg + " " + e.getMessage());
        throw new RemoteException(msg, e);
    } catch (RegistryExceptionException e) {
        String msg = "Fails to get activities";
        log.error(msg + " " + e.getMessage());
        throw new RegistryExceptionException(msg, e);
    }
}

From source file:org.wso2.es.integration.common.clients.HandlerManagementServiceClient.java

public String[] getHandlerList() throws RemoteException, ExceptionException {

    try {//from w  w  w.j av a  2s  . c o  m
        return handlerManagementServiceStub.getHandlerList();

    } catch (RemoteException e) {
        String msg = "Fails to get Handler List";
        log.error(msg + " " + e.getMessage());
        throw new RemoteException(msg, e);
    } catch (ExceptionException e) {
        String msg = "Fails to get Handler List";
        log.error(msg + " " + e.getMessage());
        throw new ExceptionException(msg, e);
    }

}

From source file:org.wso2.es.integration.common.clients.HandlerManagementServiceClient.java

public boolean createHandler(String payload) throws RemoteException, ExceptionException {

    try {/*from w w  w. j av a  2 s  .  c om*/
        return handlerManagementServiceStub.createHandler(payload);
    } catch (RemoteException e) {
        String msg = "Fails to create Handler";
        log.error(msg + " " + e.getMessage());
        throw new RemoteException(msg, e);
    } catch (ExceptionException e) {
        String msg = "Fails to create Handler";
        log.error(msg + " " + e.getMessage());
        throw new ExceptionException(msg, e);
    }
}

From source file:org.wso2.es.integration.common.clients.HandlerManagementServiceClient.java

public boolean updateHandler(String oldName, String payload) throws RemoteException, ExceptionException {

    try {// w  w  w.j ava2s . c o  m
        return handlerManagementServiceStub.updateHandler(oldName, payload);
    } catch (RemoteException e) {
        String msg = "Fails to update Handler";
        log.error(msg + " " + e.getMessage());
        throw new RemoteException(msg, e);
    } catch (ExceptionException e) {
        String msg = "Fails to update Handler";
        log.error(msg + " " + e.getMessage());
        throw new ExceptionException(msg, e);
    }
}

From source file:org.wso2.es.integration.common.clients.HandlerManagementServiceClient.java

public boolean deleteHandler(String name) throws RemoteException, ExceptionException {

    try {/*  ww  w. j  a v  a  2s. c o  m*/
        return handlerManagementServiceStub.deleteHandler(name);
    } catch (RemoteException e) {
        String msg = "Fails to delete Handler";
        log.error(msg + " " + e.getMessage());
        throw new RemoteException(msg, e);
    } catch (ExceptionException e) {
        String msg = "Fails to delete Handler";
        log.error(msg + " " + e.getMessage());
        throw new ExceptionException(msg, e);
    }
}

From source file:org.wso2.es.integration.common.clients.HandlerManagementServiceClient.java

public String getHandlerConfiguration(String name) throws RemoteException, ExceptionException {

    try {//  ww w .  ja  v a2s .c  om
        return handlerManagementServiceStub.getHandlerConfiguration(name);
    } catch (RemoteException e) {
        String msg = "Fails to get Handler Configuration";
        log.error(msg + " " + e.getMessage());
        throw new RemoteException(msg, e);
    } catch (ExceptionException e) {
        String msg = "Fails to get Handler Configuration";
        log.error(msg + " " + e.getMessage());
        throw new ExceptionException(msg, e);
    }
}

From source file:org.wso2.es.integration.common.clients.HandlerManagementServiceClient.java

public String getHandlerCollectionLocation() throws RemoteException, ExceptionException {

    try {// w ww .j a v a  2 s. c om
        return handlerManagementServiceStub.getHandlerCollectionLocation();
    } catch (RemoteException e) {
        String msg = "Fails to get Handler Collection Location";
        log.error(msg + " " + e.getMessage());
        throw new RemoteException(msg, e);
    } catch (ExceptionException e) {
        String msg = "Fails to get Handler Collection Location";
        log.error(msg + " " + e.getMessage());
        throw new ExceptionException(msg, e);
    }

}