Package com.eviware.soapui.support

Examples of com.eviware.soapui.support.SoapUIException


    {
      project = workspace.importProject( projectFilePath );
    }
    if( project == null )
    {
      throw new SoapUIException( "Cannot open project on path: " + projectFilePath );
    }
    return project;
  }
View Full Code Here


      }

      if( e instanceof RestConversionException )
      {
        log.error( "Project file needs to be updated manually, please reload the project." );
        throw new SoapUIException( "Failed to load project from file [" + file.toString() + "]", e );
      }

      e.printStackTrace();
      throw new SoapUIException( "Failed to load project from file [" + file.toString() + "]", e );
    }
    finally
    {
      UISupport.resetCursor();
    }
View Full Code Here

      {
        SoapuiWorkspaceDocumentConfig.Factory.parse( file );
      }
      catch( Exception e )
      {
        throw new SoapUIException( messages.get( "FailedToLoadWorkspaceException" ) + e.toString() );
      }
    }

    fireWorkspaceSwitching();
View Full Code Here

    {
      return new WorkspaceImpl( workspaceName, projectOptions );
    }
    catch( Exception e )
    {
      throw new SoapUIException( e );
    }
  }
View Full Code Here

        for( LoadTestRunner loadTestRunner : failedTests )
        {
          log.info( loadTestRunner.getLoadTest().getName() + ": " + loadTestRunner.getReason() );
        }

        throw new SoapUIException( "LoadTests failed" );
      }
    }

    return true;
  }
View Full Code Here

    }
    catch( Exception e )
    {
      log.error( "Error importing wsdl: " + e );
      SoapUI.logError( e );
      throw new SoapUIException( "Error importing wsdl", e );
    }

    try
    {
      if( createRequests && result != null )
      {
        for( WsdlInterface iface : result )
        {
          for( int c = 0; c < iface.getOperationCount(); c++ )
          {
            WsdlOperation operation = iface.getOperationAt( c );
            WsdlRequest request = operation.addNewRequest( "Request 1" );
            try
            {
              String requestContent = operation.createRequest( project.getSettings().getBoolean(
                  WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS ) );
              request.setRequestContent( requestContent );
            }
            catch( Exception e )
            {
              SoapUI.logError( e );
            }
          }
        }
      }
    }
    catch( Exception e )
    {
      log.error( "Error creating requests: " + e.getMessage() );
      throw new SoapUIException( "Error creating requests", e );
    }

    return result;
  }
View Full Code Here

  public static Connection initConnection( PropertyExpansionContext context, String driver, String connectionString,
      String password ) throws SQLException, SoapUIException
  {
    if( JdbcUtils.missingConnSettings( driver, connectionString, password ) )
    {
      throw new SoapUIException( "Some connections settings are missing" );
    }
    String drvr = PropertyExpander.expandProperties( context, driver ).trim();
    String connStr = PropertyExpander.expandProperties( context, connectionString ).trim();
    String pass = StringUtils.hasContent( password ) ? PropertyExpander.expandProperties( context, password ).trim()
        : "";
    String masskedPass = connStr.replace( PASS_TEMPLATE, "#####" );
    if( connStr.contains( PASS_TEMPLATE ) )
    {
      connStr = connStr.replaceFirst( PASS_TEMPLATE, pass );
    }
    try
    {
      GroovyUtils.registerJdbcDriver( drvr );
      DriverManager.getDriver( connStr );
    }
    catch( SQLException e )
    {
      // SoapUI.logError( e );
      try
      {
        Class.forName( drvr ).newInstance();
      }
      catch( Exception e1 )
      {
        SoapUI.logError( e );
        throw new SoapUIException( "Failed to init connection for drvr [" + drvr + "], connectionString ["
            + masskedPass + "]" );
      }
    }
    return DriverManager.getConnection( connStr );
View Full Code Here

                }
            }

            if (e instanceof RestConversionException) {
                log.error("Project file needs to be updated manually, please reload the project.");
                throw new SoapUIException("Failed to load project from file [" + file.toString() + "]", e);
            }

            e.printStackTrace();
            throw new SoapUIException("Failed to load project from file [" + file.toString() + "]", e);
        } finally {
            UISupport.resetCursor();
        }
    }
View Full Code Here

public class WorkspaceFactoryImpl extends WorkspaceFactory {
    public Workspace openWorkspace(String workspaceName, StringToStringMap projectOptions) throws SoapUIException {
        try {
            return new WorkspaceImpl(workspaceName, projectOptions);
        } catch (Exception e) {
            throw new SoapUIException(e);
        }
    }
View Full Code Here

        } catch (InvalidDefinitionException e) {
            throw e;
        } catch (Exception e) {
            log.error("Error importing wsdl: " + e);
            SoapUI.logError(e);
            throw new SoapUIException("Error importing wsdl", e);
        }

        try {
            if (createRequests && result != null) {
                for (WsdlInterface iface : result) {
                    for (int c = 0; c < iface.getOperationCount(); c++) {
                        WsdlOperation operation = iface.getOperationAt(c);
                        WsdlRequest request = operation.addNewRequest("Request 1");
                        try {
                            String requestContent = operation.createRequest(project.getSettings().getBoolean(
                                    WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS));
                            request.setRequestContent(requestContent);
                        } catch (Exception e) {
                            SoapUI.logError(e);
                        }
                    }
                }
            }
        } catch (Exception e) {
            log.error("Error creating requests: " + e.getMessage());
            throw new SoapUIException("Error creating requests", e);
        }

        Analytics.trackAction(SoapUIActions.IMPORT_WSDL.getActionName());

        return result;
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.SoapUIException

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.