Package org.wso2.carbon.dataservices.core

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


    this.query = query;
    try {
      this.config = (RDFConfig) this.getDataService().getConfig(
          this.getConfigId());
    } catch (ClassCastException e) {
      throw new DataServiceFault(e, "Configuration is not a RDF config:"
          + this.getConfigId());
    }

  }
View Full Code Here


    } else if (DBConstants.XSDTypes.QNAME.equals(type)) {
      return model.createTypedLiteral(value,XSDDatatype.XSDQName);
    } else if (DBConstants.XSDTypes.NOTATION.equals(type)) {
      return model.createTypedLiteral(value,XSDDatatype.XSDNOTATION);
    } else {
      throw new DataServiceFault("[" + this.getDataService().getName()
          + "]  Found Unsupported data type : " + type
          + " as input parameter.");
    }

  }
View Full Code Here

        this.writeResultEntry(xmlWriter, dataEntry, params, queryLevel);
      }

      return null;
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error in 'SPARQLQuery.processQuery'");
    }
  }
View Full Code Here

    super(dataService, queryId, queryParams, result, configId, inputEventTrigger,
        outputEventTrigger, advancedProperties, inputNamespace);
    try {
        this.config = (CSVConfig) this.getDataService().getConfig(this.getConfigId());
    } catch (ClassCastException e) {
      throw new DataServiceFault(e, "Configuration is not a CSV config:" +
          this.getConfigId());
    }
  }
View Full Code Here

          i++;
        }
       
        return null;
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error in CSVQuery.runQuery.");
    } finally {
      if (reader != null && !prefetchData) {
        try {
            reader.close();
        } catch (Exception e) {
View Full Code Here

            QueryTypes.INOUT.equals(queryParam.getType()))) {
          /* check the exported values */
          tmpParamValue = exportedParams.get(queryParam.getName());
          if (tmpParamValue == null && !queryParam.hasDefaultValue()) {
            /* still can't find, throw an exception */
            throw new DataServiceFault(FaultCodes.INCOMPATIBLE_PARAMETERS_ERROR,
                "Error in 'Query.extractParams', " +
                "cannot find query param with name:" + queryParam.getName());
          }
        }
      }     
View Full Code Here

            validator.validate(context, queryParam.getName(), value);
          }
        }
      }
    } catch (ValidationException e) {
      throw new DataServiceFault(e, FaultCodes.VALIDATION_ERROR, null);
    }
  }
View Full Code Here

      try {
            this.startRowElement(xmlWriter,
                this.getResult().getRowName(),
                this.getResult().getResultType(), this.getResult(), params);
      } catch (XMLStreamException e) {
        throw new DataServiceFault(e,
            "Error in start write row at Query.writeResultEntry");
      }
    }
    /* write the result */
    this.getResult().getDefaultElementGroup().execute(xmlWriter, params, queryLevel, false, null);
    /* end result wrapper */
    if (this.isWriteRow()) {
      try {
            this.endElement(xmlWriter);
      } catch (XMLStreamException e) {
        throw new DataServiceFault(e, "Error in end write row at Query.writeResultEntry");
      }
    }
  }
View Full Code Here

    super(dataService, queryId, queryParams, result, configId,
        inputEventTrigger, outputEventTrigger, advancedProperties, inputNamespace);
    try {
        this.config = (GSpreadConfig) this.getDataService().getConfig(this.getConfigId());
    } catch (ClassCastException e) {
      throw new DataServiceFault(e, "Configuration is not a GSpread config:" +
          this.getConfigId());
    }
    this.worksheetNumber = worksheetNumber;
    this.hasHeader = hasHeader;
    this.startingRow = startingRow;
View Full Code Here

        this.writeResultEntry(xmlWriter, dataEntry, params, queryLevel);
      }
     
      return null;
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error in query GSpreadQuery.execute");
    }
  }
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.