Package org.wso2.carbon.dataservices.core

Examples of org.wso2.carbon.dataservices.core.DataServiceFault


        param = el.getAttributeValue(new QName(paramType));
        if (param == null) {
          paramType = DBSFields.RDF_REF_URI;
          param = el.getAttributeValue(new QName(paramType));
          if (param == null ) {
            throw new DataServiceFault(
                "Invalid param type in output element:-\n " + el);
          }
        }
      }
    } 
View Full Code Here


    if (param == null) {
      paramType = "query-param";
      param = el.getAttributeValue(new QName(paramType));
    }
    if (param == null) {
      throw new DataServiceFault("Invalid param type in with-param element:-\n " + el);
    } else {
      originalParam = param;
      /* 'toLowerCase' - workaround for different character case issues in column names */
      param = param.toLowerCase();
    }   
View Full Code Here

    String driverClass = this.getProperty(RDBMS.DRIVER);
    String jdbcURL = this.getProperty(RDBMS.PROTOCOL)
    String xaDataSourceClass = this.getProperty(RDBMS.XA_DATASOURCE_CLASS);   
    if (DBUtils.isEmptyString(xaDataSourceClass)) {
      if (DBUtils.isEmptyString(driverClass)) {
        throw new DataServiceFault("Driver class cannot be null in config '" +
            this.getConfigId() + "'");
      }
      if (DBUtils.isEmptyString(jdbcURL)) {
        throw new DataServiceFault("JDBC URL cannot be null in config '" +
            this.getConfigId() + "'");
      }
    }
    this.validateDBCPSQLConfig();
  }
View Full Code Here

    super(dataService, DBConstants.EventTriggerLanguages.XPATH,
        triggerId, expression, targetTopic, endpointUrls);
    try {
        this.xPathExpr = new AXIOMXPath(this.getExpression());
    } catch (JaxenException e) {
      throw new DataServiceFault(e,
          "Error in building AXIOMPath instance with expression: " +
          this.getExpression());
    }
  }
View Full Code Here

  @Override
  public boolean evaluate(OMElement input) throws DataServiceFault {
    try {
      return this.getXPathExpr().booleanValueOf(input);
    } catch (JaxenException e) {
      throw new DataServiceFault(e, "Error in XPath evaluation with expression: "  +
          this.getExpression() + " input:" + input);
    }
  }
View Full Code Here

        }
        txManager.begin();
        this.beginTx.set(true);       
      }
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error from transaction manager");
    }
  }
View Full Code Here

      if (log.isDebugEnabled()) {
        log.debug("transactionManager.commit()");
      }
      txManager.commit();     
    } catch (Exception e) {
      throw new DataServiceFault(e,
          "Error from transaction manager when committing");
    } finally {
      this.beginTx.set(false);
    }
  }
View Full Code Here

          log.debug("transactionManager.rollback()");
        }
        txManager.rollback();       
      }
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error from transaction manager when rollbacking");
    } finally {
      this.beginTx.set(false);
    }
  }
View Full Code Here

    } else if (properties.get(DBConstants.CarbonDatasource.NAME) != null) {
        return DataSourceTypes.CARBON;
    } else if (properties.get(DBConstants.WebDatasource.WEB_CONFIG) != null) {
            return DataSourceTypes.WEB;
        }
    throw new DataServiceFault("Cannot create config with properties: " + properties);
  }
View Full Code Here

  private void initXA() throws DataServiceFault {
    try {
      this.xaDataSource = (XADataSource) Class.forName(this.getClassName()).newInstance();
      this.assignProps(this.getXADataSource(), this.getProperties());
    } catch (Exception e) {
      throw new DataServiceFault(e,
          "Cannot create XADataSource instance using the class: "
              + this.getClassName());
    }
  }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.dataservices.core.DataServiceFault

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.