Skip to content

Commit

Permalink
IDDES-1492 Validation problems created when importing a SOAP-based wsdl
Browse files Browse the repository at this point in the history
Removed the logic that was creating the validation error as it is no longer needed per Steve H. Also fixed an error
when trying to undeploy a VDB that is not deployed.
  • Loading branch information
elvisisking committed Oct 15, 2012
1 parent 8cd1f36 commit 42da910
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ protected IStatus runImpl( IProgressMonitor monitor ) throws Exception {

// delete PVDB from server
try {
teiidServer.getAdmin().undeployVdb(this.pvdbName, this.pvdbVersion);
if (teiidServer.getAdmin().getVdb(this.pvdbName) != null) {
teiidServer.getAdmin().undeployVdb(this.pvdbName, this.pvdbVersion);
}
} catch (Exception e) {
++errors;
deleteVdbErrorStatus = new Status(IStatus.ERROR, PLUGIN_ID, NLS.bind(Messages.DeleteDeployedPreviewVdbJobError,
Expand All @@ -98,7 +100,9 @@ protected IStatus runImpl( IProgressMonitor monitor ) throws Exception {
IStatus deleteDataSourceErrorStatus = null;

try {
teiidServer.getAdmin().deleteDataSource(this.jndiName);
if (teiidServer.getAdmin().dataSourceExists(this.jndiName)) {
teiidServer.getAdmin().deleteDataSource(this.jndiName);
}
} catch (Exception e) {
++errors;
deleteDataSourceErrorStatus = new Status(IStatus.ERROR, PLUGIN_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,17 +585,17 @@ private void validateVirtualProcedures( final Command command,
validationResult.addProblem(typeProblem);
}

// if the command cannot be an UpdateProcedure, it can be a VirtualProcedure
if (cmdType == Command.TYPE_UPDATE_PROCEDURE ) {
// create validation problem and additional to the results
ValidationProblem typeProblem = new ValidationProblemImpl(
0,
IStatus.ERROR,
TransformationPlugin.Util.getString("SqlTransformationMappingRootValidationRule.Virtual_stored_procedures_transformation_definition_cannot_be_an_updateProcedure._3")); //$NON-NLS-1$
validationResult.addProblem(typeProblem);
return;
// // if the command cannot be an UpdateProcedure, it can be a VirtualProcedure
// if (cmdType == Command.TYPE_UPDATE_PROCEDURE ) {
// // create validation problem and additional to the results
// ValidationProblem typeProblem = new ValidationProblemImpl(
// 0,
// IStatus.ERROR,
// TransformationPlugin.Util.getString("SqlTransformationMappingRootValidationRule.Virtual_stored_procedures_transformation_definition_cannot_be_an_updateProcedure._3")); //$NON-NLS-1$
// validationResult.addProblem(typeProblem);
// return;
// If it is update command then result should have one column of type 'int'
} else if (cmdType == Command.TYPE_INSERT || cmdType == Command.TYPE_UPDATE || cmdType == Command.TYPE_DELETE) {
if (cmdType == Command.TYPE_INSERT || cmdType == Command.TYPE_UPDATE || cmdType == Command.TYPE_DELETE) {
Collection columns = procResult.getColumns();
String typeName = null;
if (columns.size() == 1) {
Expand Down

0 comments on commit 42da910

Please sign in to comment.