Package org.wso2.carbon.dataservices.core

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


          this.endElement(xmlWriter);
      }
     
      return null;
    } catch (XMLStreamException e) {
      throw new DataServiceFault(e, "Error in CallQueryGroup.execute");
    }
  }
View Full Code Here


      throws DataServiceFault {
    Query query;
    String configId = getConfigId(queryEl);
    Config config = dataService.getConfig(configId);
    if (config == null) {
      throw new DataServiceFault("Invalid configId: " + configId + " in :- \n" + queryEl);
    }
    String sourceType = config.getType();
    if (DataSourceTypes.RDBMS.equals(sourceType)
        || DataSourceTypes.JNDI.equals(sourceType)
        || DataSourceTypes.CARBON.equals(sourceType)) {
      query = createSQLQuery(dataService, queryEl);
    } else if (DataSourceTypes.CSV.equals(sourceType)) {
      query = createCSVQuery(dataService, queryEl);
    } else if (DataSourceTypes.EXCEL.equals(sourceType)) {
      query = createExcelQuery(dataService, queryEl);
    } else if (DataSourceTypes.GDATA_SPREADSHEET.equals(sourceType)) {
      query = createGSpreadQuery(dataService, queryEl);
        } else if (DataSourceTypes.RDF.equals(sourceType)) {
          query = createSPARQLQuery(dataService, queryEl);
    else if (DataSourceTypes.WEB.equals(sourceType)) {
      query = createWebQuery(dataService, queryEl);
    } else {
      throw new DataServiceFault("Invalid configType: " +
          sourceType + " in :- \n" + queryEl);
    }   
    return query;
  }
View Full Code Here

        sparql = queryEl.getFirstChildWithName(new QName(DBSFields.SPARQL)).getText();
        eventTriggers = getEventTriggers(dataService, queryEl);
        result = getResultFromQueryElement(dataService, queryEl);
        inputNamespace = extractQueryInputNamespace(dataService, result, queryEl);
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error in parsing SPARQL query element");
    }   
    SPARQLQuery query = new SPARQLQuery(dataService, queryId, configId,
        sparql, getQueryParamsFromQueryElement(queryEl), result,
        eventTriggers[0], eventTriggers[1],
        extractAdvancedProps(queryEl), inputNamespace);
View Full Code Here

          String repeatedDialects = "";
          Iterator<String> it = intersect.iterator();
          while (it.hasNext()) {
            repeatedDialects = repeatedDialects +" "+it.hasNext();
          }
          throw new DataServiceFault("SQL Dialect(s) repeated "+repeatedDialects);
        }
      }
    }
    return dialectList;
  }
View Full Code Here

        }
        keyColumns = extractKeyColumns(queryEl);
        result = getResultFromQueryElement(dataService, queryEl);
        inputNamespace = extractQueryInputNamespace(dataService, result, queryEl);
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error in parsing SQL query element");
   
    Config config = dataService.getConfig(configId);
    SQLQuery query = new SQLQuery(dataService, queryId, configId,
        returnGeneratedKeys, keyColumns, sql, getQueryParamsFromQueryElement(queryEl),
        result, eventTriggers[0], eventTriggers[1],
View Full Code Here

        configId = getConfigId(queryEl);
        eventTriggers = getEventTriggers(dataService, queryEl);
        result = getResultFromQueryElement(dataService, queryEl);
        inputNamespace = extractQueryInputNamespace(dataService, result, queryEl);
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error in parsing CSV query element");
    }
    CSVQuery query = new CSVQuery(dataService, queryId,
        getQueryParamsFromQueryElement(queryEl), configId, result,
        eventTriggers[0], eventTriggers[1],
        extractAdvancedProps(queryEl), inputNamespace);
View Full Code Here

            configId = getConfigId(queryEl);
            eventTriggers = getEventTriggers(dataService, queryEl);
            result = getResultFromQueryElement(dataService, queryEl);
        inputNamespace = extractQueryInputNamespace(dataService, result, queryEl);
        } catch (Exception e) {
            throw new DataServiceFault(e, "Error in passing Web query element");
        }
    WebQuery query = new WebQuery(dataService, queryId,
        getQueryParamsFromQueryElement(queryEl), configId, result,
        eventTriggers[0], eventTriggers[1],
        extractAdvancedProps(queryEl), getQueryVariable(queryEl),
View Full Code Here

      eventTriggers = getEventTriggers(dataService, queryEl);
     
      result = getResultFromQueryElement(dataService, queryEl);
        inputNamespace = extractQueryInputNamespace(dataService, result, queryEl);
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error in parsing GSpread query element");
    }
    ExcelQuery query = new ExcelQuery(dataService, queryId,
        getQueryParamsFromQueryElement(queryEl), configId,
        workbookName, hasHeader, startingRow, maxRowCount, result,
        eventTriggers[0], eventTriggers[1],
View Full Code Here

      eventTriggers = getEventTriggers(dataService, queryEl);
     
      result = getResultFromQueryElement(dataService, queryEl);
        inputNamespace = extractQueryInputNamespace(dataService, result, queryEl);
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error in parsing GSpread query element");
    }
    GSpreadQuery query = new GSpreadQuery(dataService, queryId,
        getQueryParamsFromQueryElement(queryEl), configId,
        worksheetNumber, hasHeader, startingRow, maxRowCount, result,
        eventTriggers[0], eventTriggers[1],
View Full Code Here

    String className = valEl.getAttributeValue(new QName("class"));
    try {
        Class<Validator> clazz = (Class<Validator>) Class.forName(className);
        return clazz.newInstance();
    } catch (Exception e) {
      throw new DataServiceFault(e, "Problem in creating custom validator class: " + className);
    }   
  }
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.