Examples of DataServiceFault


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

      return input;
    } else {
      try {
        return transformer.transform(input);
      } catch (Exception e) {
        throw new DataServiceFault(e,
            "Error in result XSLT transformation");
      }
    }
  }
View Full Code Here

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

          OMElement lastRequestResult = DSSessionManager.getCurrentRequestBox().execute();
          dataService.endTransaction();
          return lastRequestResult;
      } catch (DataServiceFault e) {
        dataService.rollbackTransaction();
        throw new DataServiceFault(e, "Error in boxcarring end");
      } finally {
        DSSessionManager.getCurrentRequestBox().clear();
        DSSessionManager.setBoxcarring(false);
        TLParamStore.clear();
      }     
View Full Code Here

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

          typeFound = true;
          break;
        }
      }
      if (!typeFound) {
        throw new DataServiceFault("Invalid query param sqlType: '" +
            this.getSqlType() + "'.");
      }
      /* validate type, i.e. IN, INOUT, OUT */
      if (!(QueryTypes.IN.equals(this.getType()) ||
          QueryTypes.OUT.equals(this.getType()) ||
          QueryTypes.INOUT.equals(this.getType()))) {
        throw new DataServiceFault("Invalid query param type: '" + this.getType() + "'.");
      }
      /* validate paramType, i.e. SCALAR, ARRAY .. */
      if (!(QueryParamTypes.SCALAR.equals(this.getParamType()) ||
          QueryParamTypes.ARRAY.equals(this.getParamType()))) {
        throw new DataServiceFault("Invalid query param type: '" +
            this.getParamType() + "'.");
      }
    } catch (Exception e) {
      throw new DataServiceFault(e);
    }
  }
View Full Code Here

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

      DataServicesDSComponent.registerRegistryServiceListener(this);
    } else {
      try {
        this.columnMappings = DBUtils.createColumnMappings(this.getHeader());
      } catch (IOException e) {
        throw new DataServiceFault("Error in creating CSV column mappings.");
     
    }
  }
View Full Code Here

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

    this.exportType = exportType;
    this.hasConstantValue = DBSFields.VALUE.equals(paramType);
   
    /* validate element/attribute name */
    if (!NCName.isValid(this.name)) {
      throw new DataServiceFault("Invalid output " + this.elementType + " name: '" +
          this.name + "', must be an NCName.");
    }
  }
View Full Code Here

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

        }
      }
      if (paramObj != null) {
          return paramObj.getValue().getValueAsString();
      } else {
        throw new DataServiceFault(FaultCodes.INCOMPATIBLE_PARAMETERS_ERROR,
            "Error in 'StaticOutputElement.execute', " +
            "cannot find parameter with type:"
            + this.getParamType() + " name:" + this.getOriginalParam());
      }
    }
View Full Code Here

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

        }
     
      /* no data is pre-fetched for static elements */
      return null;
    } catch (XMLStreamException e) {
      throw new DataServiceFault(e, "Error in XML generation at StaticOutputElement.execute");
    }
  }
View Full Code Here

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

                        return new ExternalParam(this.getName(),new ParamValue(
                                udtAttributes[i].toString()), this.getParamType());
                    }
                }
            } catch (SQLException e) {
                throw new DataServiceFault(e, "Error while extracting UDT attribute values");
            }
        }
        return params.getParam(this.getParamType(), this.getParam());
    }
View Full Code Here

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

        try {
            TransactionManager txManager = DBUtils.getContainerTransactionManager(
                    this.getContainerUserTransactionName());
            this.txManager = new DSSXATransactionManager(txManager);
        } catch (Exception e) {
            throw new DataServiceFault(e, "Cannot create XA transaction manager");
        }
    }
View Full Code Here

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

                if (this.isEnableXA()) {
                    this.getDSSTxManager().rollback();
                } else {
                    TLConnectionStore.rollbackAllAndClose();
                }
                throw new DataServiceFault(e, "Error in ending transaction");
            }
        } else if (activeNestedTransactions.get() < 0) {
            activeNestedTransactions.set(0);
        }
    }
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.