Examples of DataServiceFault


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

                if (owner != null && owner.equals(this.getName())) {
                    eventBroker.unsubscribe(subs.getId());
                }
            }
        } catch (EventBrokerException e) {
            throw new DataServiceFault(e);
        }
    }
View Full Code Here

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

                    this.extractParams(params), prefetchData, prefetchedData);
        } catch (DataServiceFault e) {
            this.fillInDataServiceFault(e, requestName, params);
            throw e;
        } catch (Exception e) {
            DataServiceFault dsf = new DataServiceFault(e);
            this.fillInDataServiceFault(dsf, requestName, params);
            log.error(dsf.getFullMessage(), e);
            throw dsf;
        }
    }
View Full Code Here

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

  }
 
  public void init() throws DataServiceFault {
    this.query = this.getDataService().getQuery(this.getQueryId());
    if (this.query == null) {
      throw new DataServiceFault(
          "Query with the query id: '" + this.getQueryId() + "' cannot be found");
    }
  }
View Full Code Here

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

          subEl = subElItr.next();
          endpointUrls.add(subEl.getText());
        }
        return new XPathEventTrigger(dataService, id, expression, targetTopic, endpointUrls);
    } catch (Exception e) {
      throw new DataServiceFault(e, "Error in create XPathEventTrigger");
    }
  }
View Full Code Here

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

        paramObj = params.getParam(paramName);
      }
      if (paramObj != null) {
          qparams.put(withParam.getName(), paramObj.getValue());
      } else {
        throw new DataServiceFault(FaultCodes.INCOMPATIBLE_PARAMETERS_ERROR,
            "Error in 'CallQuery.extractParams', cannot find parameter with type:" +
            paramType + " name:" + withParam.getOriginalName());
      }
    }
    Set<ExternalParam> remainingEntries = new HashSet<ExternalParam>(params.getEntries().values());
View Full Code Here

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

    private void validateWithParam() throws DataServiceFault {
      /* validate name, should be an NCName */
      if (DBSFields.QUERY_PARAM.equals(this.getParamType()) &&
          !NCName.isValid(this.getParam())) {
        throw new DataServiceFault("Invalid query param name: '" + this.getParam() +
            "', must be an NCName.");
      }
    }
View Full Code Here

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

        DataSource externalDS = this.createDataSource();
        this.setDBCPConnectionManager(new DBCPConnectionManager(this, externalDS));
        try {
          this.initSQLDataSource();
        } catch (SQLException e) {
          throw new DataServiceFault(e, DBConstants.FaultCodes.CONNECTION_UNAVAILABLE_ERROR,
              e.getMessage());
        }
    }
  }
View Full Code Here

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

    }
  }
 
  private void validateJNDIConfig() throws DataServiceFault {
    if (DBUtils.isEmptyString(this.getProperty(DBConstants.JNDI.INITIAL_CONTEXT_FACTORY))) {
      throw new DataServiceFault("Initial context factory cannot be null in config '" +
          this.getConfigId() + "'");
    }
        if (DBUtils.isEmptyString(this.getProperty(DBConstants.JNDI.PROVIDER_URL))) {
          throw new DataServiceFault("Provider URL cannot be null in config '" +
          this.getConfigId() + "'");
    }
        if (DBUtils.isEmptyString(this.getProperty(DBConstants.JNDI.RESOURCE_NAME))) {
          throw new DataServiceFault("Resource name cannot be null in config '" +
          this.getConfigId() + "'");
    }
        this.validateDBCPSQLConfig();
  }
View Full Code Here

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

      if (resourceName != null && resourceName.trim().length() > 0) {
          InitialContext context = new InitialContext(properties);
          DataSource dataSource = (DataSource) context.lookup(resourceName);
          return dataSource;
      } else {
        throw new DataServiceFault("JNDI resource name not specified.");
      }
    } catch (NamingException e) {
      throw new DataServiceFault(e,
          "Naming error occurred while trying to retrieve JDBC Connection from JNDI tree.");
    }
  }
View Full Code Here

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

                scraperConfiguration = new ScraperConfiguration(inputSource);
            }
            scraper = new Scraper(scraperConfiguration, "")
            return scraper;
        } catch (FileNotFoundException e) {
            throw new DataServiceFault(e, "Error in reading web harvest configuration");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.