Package com.eviware.soapui.impl.wsdl

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


    convert( resource, oldConfig, getMethod( resource, oldConfig.getMethod(), oldConfig.getName() ) );
  }

  public static RestMethod getMethod( RestResource resource, String methodType, String requestName )
  {
    WsdlProject project = resource.getService().getProject();
    if( !autoConvert.containsKey( project ) )
    {
      autoConvert
          .put( project,
              UISupport
                  .confirm(
                      "The model for REST requests has changed slightly,\r\n"
                          + "introducing a new REST Method item in-between each REST Resource and Request.\r\n"
                          + "Any existing REST Request must now be placed under either an existing Method or a new one, "
                          + "either automatically or manually.\r\n\r\nWould You like soapUI to do this automatically using the default values?",
                      "Update REST model for project: " + project.getName() ) );
    }
    RestMethod method = null;
    List<String> options = new ArrayList<String>();
    for( int c = 0; c < resource.getRestMethodCount(); c++ )
    {
View Full Code Here


  public static RestResource resolveResource( RestTestRequestStep requestStep )
  {
    Map<String, RestResource> options = new LinkedHashMap<String, RestResource>();

    WsdlProject project = requestStep.getTestCase().getTestSuite().getProject();
    String serviceName = requestStep.getRequestStepConfig().getService();
    RestService service = ( RestService )project.getInterfaceByName( serviceName );
    if( service != null )
    {
      addResources( service, options );
    }
    else
    {
      for( Interface iface : project.getInterfaceList() )
      {
        if( iface instanceof RestService )
        {
          addResources( ( RestService )iface, options );
        }
View Full Code Here

  {
    if( !UISupport.confirm( "Add Request [" + source.getName() + "] to TestCase [" + testCase.getName() + "]",
        "Add Request to TestCase" ) )
      return false;

    WsdlProject targetProject = testCase.getTestSuite().getProject();
    if( targetProject != source.getOperation().getInterface().getProject() )
    {
      HashSet<Interface> requiredInterfaces = new HashSet<Interface>();
      requiredInterfaces.add( source.getOperation().getInterface() );
View Full Code Here

    {
      String[] names = ModelSupport.getNames( ( ( WorkspaceImpl )SoapUI.getWorkspace() ).getOpenProjectList() );
      String projectName = UISupport.prompt( "Select project to import from", "Import WSS Settings", names );
      if( projectName != null )
      {
        WsdlProject prj = ( WsdlProject )SoapUI.getWorkspace().getProjectByName( projectName );
        wssContainer.importConfig( prj.getWssContainer() );
      }
    }
View Full Code Here

    super( "Add to TestCase", "Adds this request to a TestCase" );
  }

  public void perform( WsdlRequest request, Object param )
  {
    WsdlProject project = request.getOperation().getInterface().getProject();

    WsdlTestCase testCase = getTargetTestCase( project );
    if( testCase != null )
      addRequest( testCase, request, -1 );
  }
View Full Code Here

    String[] names = ModelSupport.getNames( iface.getOperationList() );
    dialog.setOptions( GenerateForm.OPERATIONS, names );
    XFormOptionsField operationsFormField = ( XFormOptionsField )dialog.getFormField( GenerateForm.OPERATIONS );
    operationsFormField.setSelectedOptions( names );

    WsdlProject project = iface.getProject();
    String[] testSuites = ModelSupport.getNames( new String[] { "<create>" }, project.getTestSuiteList() );
    dialog.setOptions( GenerateForm.TESTSUITE, testSuites );

    if( dialog.show() )
    {
      List<String> operations = StringUtils.toStringList( operationsFormField.getSelectedOptions() );
      if( operations.size() == 0 )
      {
        UISupport.showErrorMessage( "No Operations selected.." );
        return null;
      }

      String testSuiteName = dialog.getValue( GenerateForm.TESTSUITE );

      if( testSuiteName.equals( "<create>" ) )
        testSuiteName = UISupport.prompt( "Enter name of TestSuite to create", "Generate TestSuite",
            iface.getName() + " TestSuite" );

      if( testSuiteName != null && testSuiteName.trim().length() > 0 )
      {
        WsdlTestSuite testSuite = project.getTestSuiteByName( testSuiteName );

        if( testSuite == null )
        {
          testSuite = project.addNewTestSuite( testSuiteName );
        }

        int style = dialog.getValueIndex( GenerateForm.STYLE );
        boolean useExistingRequests = dialog.getValueIndex( GenerateForm.REQUEST_CONTENT ) == 0;
        boolean generateLoadTest = dialog.getBooleanValue( GenerateForm.GENERATE_LOADTEST );
View Full Code Here

  }

  private Context getHermesContext( AbstractInterface<?> iface, String hermesConfigPath )
      throws MalformedURLException, NamingException, IOException
  {
    WsdlProject project = iface.getProject();
    HermesUtils.flushHermesCache();
    Context ctx = HermesUtils.hermesContext( project, hermesConfigPath );
    return ctx;

  }
View Full Code Here

    XFormOptionsField operationsFormField = ( XFormOptionsField )dialog.getFormField( Form.OPERATIONS );
    operationsFormField.setSelectedOptions( names );

    dialog.getFormField( Form.START_MOCKSERVICE ).setEnabled( !atCreation );

    WsdlProject project = ( WsdlProject )iface.getProject();
    String[] mockServices = ModelSupport.getNames( new String[] { CREATE_MOCKSUITE_OPTION },
        project.getMockServiceList() );
    dialog.setOptions( Form.MOCKSERVICE, mockServices );

    dialog.setValue( Form.PATH, "/mock" + iface.getName() );
    dialog.setValue( Form.PORT, "8088" );

    if( dialog.show() )
    {
      List<String> operations = StringUtils.toStringList( operationsFormField.getSelectedOptions() );
      if( operations.size() == 0 )
      {
        UISupport.showErrorMessage( "No Operations selected.." );
        return null;
      }

      String mockServiceName = dialog.getValue( Form.MOCKSERVICE );
      WsdlMockService mockService = ( WsdlMockService )project.getMockServiceByName( mockServiceName );

      if( mockService == null || mockServiceName.equals( CREATE_MOCKSUITE_OPTION ) )
      {
        mockServiceName = UISupport.prompt( "Specify name of MockService to create", getName(), iface.getName()
            + " MockService" );
        if( mockServiceName == null )
          return null;

        mockService = ( WsdlMockService )project.addNewMockService( mockServiceName );
      }

      mockService.setPath( dialog.getValue( Form.PATH ) );
      try
      {
View Full Code Here

    String targetProjectName = UISupport.prompt( "Select target Project for cloned Interface", "Clone Interface",
        asList );
    if( targetProjectName == null )
      return;

    WsdlProject targetProject = ( WsdlProject )workspace.getProjectByName( targetProjectName );
    if( targetProject == null )
    {
      targetProjectName = UISupport.prompt( "Enter name for new Project", "Clone TestSuite", "" );
      if( targetProjectName == null )
        return;

      try
      {
        targetProject = workspace.createProject( targetProjectName, null );
      }
      catch( SoapUIException e )
      {
        UISupport.showErrorMessage( e );
      }

      if( targetProject == null )
        return;
    }

    WsdlInterface targetIface = ( WsdlInterface )targetProject.getInterfaceByTechnicalId( iface.getTechnicalId() );
    if( targetIface != null )
    {
      UISupport.showErrorMessage( "Target Project already contains Interface for binding" );
    }
    else
    {
      boolean importEndpoints = UISupport.confirm( "Import endpoint defaults also?", getName() );
      UISupport.select( targetProject.importInterface( iface, importEndpoints, true ) );
    }
  }
View Full Code Here

            "Interface has depending MockOperations which will also be removed. Remove anyway?",
            "Remove Interface" ) )
          return;
      }

      WsdlProject project = ( WsdlProject )iface.getProject();
      project.removeInterface( iface );
    }
  }
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.