Package com.eviware.soapui.impl.wsdl

Examples of com.eviware.soapui.impl.wsdl.WsdlProject


    testLoader( "http://localhost:8082/testonewayop/TestService.wsdl" );
  }

  private void testLoader( String wsdlUrl ) throws XmlException, IOException, Exception
  {
    WsdlProject project = new WsdlProject();
    project.getSettings().setBoolean( WsdlSettings.CACHE_WSDLS, true );
    WsdlInterface wsdlInterface = WsdlImporter.importWsdl( project, wsdlUrl )[0];

    assertTrue( wsdlInterface.isCached() );

    WsdlDefinitionExporter exporter = new WsdlDefinitionExporter( wsdlInterface );

    String root = exporter.export( "test" + File.separatorChar + "output" );

    WsdlProject project2 = new WsdlProject();
    WsdlInterface wsdl2 = WsdlImporter.importWsdl( project2, new File( root ).toURI().toURL().toString() )[0];

    assertEquals( wsdlInterface.getBindingName(), wsdl2.getBindingName() );
    assertEquals( wsdlInterface.getOperationCount(), wsdl2.getOperationCount() );
    assertEquals( wsdlInterface.getWsdlContext().getInterfaceDefinition().getDefinedNamespaces(), wsdl2
View Full Code Here


      return;

    SoapUIClassLoaderState state = SoapUIExtensionClassLoader.ensure();
    try
    {
      WsdlProject project = ( WsdlProject )workspace.importProject( fileName );
      if( project != null )
        UISupport.select( project );
    }
    catch( Exception ex )
    {
View Full Code Here

    {
      String url = UISupport.prompt( messages.get( "prompt.text" ), messages.get( "prompt.title" ), "" );

      if( url != null )
      {
        WsdlProject project = ( WsdlProject )workspace.importRemoteProject( url );
        if( project != null )
          UISupport.select( project );
      }
    }
    catch( Exception ex )
View Full Code Here

      logger.info( "Initializing soapUI Core" );
      SoapUI.setSoapUICore(
          createSoapUICore( getInitParameter( "settingsFile" ), getInitParameter( "settingsPassword" ) ), true );

      logger.info( "Loading project" );
      project = new WsdlProject( getInitParameter( "projectFile" ), getInitParameter( "projectPassword" ) );

      logger.info( "Starting MockService" );
      mockService = project.getMockServiceByName( getInitParameter( "mockService" ) );
      mockRunner = mockService.start();
    }
View Full Code Here

    String projectFile = getProjectFile();

    // WsdlProject project = new WsdlProject( projectFile,
    // getProjectPassword() );
    WsdlProject project = ( WsdlProject )ProjectFactoryRegistry.getProjectFactory( "wsdl" ).createNew( projectFile,
        getProjectPassword() );

    if( project.isDisabled() )
      throw new Exception( "Failed to load soapUI project file [" + projectFile + "]" );

    initProjectProperties( project );

    int suiteCount = 0;

    if( testSuite != null && project.getTestSuiteByName( testSuite ) == null )
      throw new Exception( "Missing TestSuite named [" + testSuite + "]" );

    for( int c = 0; c < project.getTestSuiteCount(); c++ )
    {
      if( testSuite == null || project.getTestSuiteAt( c ).getName().equalsIgnoreCase( testSuite ) )
      {
        runSuite( project.getTestSuiteAt( c ) );
        suiteCount++ ;
      }
    }

    if( suiteCount == 0 )
    {
      log.warn( "No test-suites matched argument [" + testSuite + "]" );
    }
    else if( testCaseCount == 0 )
    {
      log.warn( "No test-cases matched argument [" + testCase + "]" );
    }
    else if( loadTestCount == 0 )
    {
      log.warn( "No load-tests matched argument [" + loadTest + "]" );
    }
    else
    {
      if( saveAfterRun && !project.isRemote() )
      {
        try
        {
          project.save();
        }
        catch( Throwable t )
        {
          log.error( "Failed to save project", t );
        }
View Full Code Here

    return resolved;
  }

  private void loadWadlFromUrl()
  {
    WsdlProject project = item.getTestCase().getTestSuite().getProject();
    String url = UISupport.prompt( "Enter WADL URL", "Add WADL from URL", "" );
    if( url == null )
      return;

    importWadl( project, url );
View Full Code Here

  }

  private void loadWadlFromFile()
  {
    WsdlProject project = item.getTestCase().getTestSuite().getProject();
    File file = UISupport.getFileDialogs().open( this, "Select WADL file", ".wadl", "WADL Files (*.wadl)",
        ProjectDirProvider.getProjectFolder( project ) );
    if( file == null )
      return;

View Full Code Here

  protected abstract boolean update();

  private void loadWsdlFromUrl()
  {
    WsdlProject project = item.getTestCase().getTestSuite().getProject();
    String url = UISupport.prompt( "Enter WSDL URL", "Add WSDL from URL", "" );
    if( url == null )
      return;

    importWsdl( project, url );
View Full Code Here

  }

  private void loadWsdlFromFile()
  {

    WsdlProject project = item.getTestCase().getTestSuite().getProject();
    File file = UISupport.getFileDialogs().open( this, "Select WSDL file", ".wsdl", "WSDL Files (*.wsdl)",
        ProjectDirProvider.getProjectFolder( project ) );
    if( file == null )
      return;

View Full Code Here

    return factories.get( getScriptEngineId( modelItem ) ).createScriptEngine( modelItem );
  }

  public static String getScriptEngineId( ModelItem modelItem )
  {
    WsdlProject project = ( WsdlProject )ModelSupport.getModelItemProject( modelItem );

    String scriptEngineId = null;
    if( project == null )
      log.warn( "Project is null for modelItem [" + String.valueOf( modelItem )
          + "], using default script language [" + DEFAULT_SCRIPT_ENGINE_ID + "]" );
    else
      scriptEngineId = project.getDefaultScriptLanguage();

    if( StringUtils.isNullOrEmpty( scriptEngineId ) )
      scriptEngineId = DEFAULT_SCRIPT_ENGINE_ID;

    return scriptEngineId;
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.WsdlProject

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.