Package com.eviware.soapui.impl.wsdl

Examples of com.eviware.soapui.impl.wsdl.WsdlOperation$WsdlFaultPart


        return;

      createOptional = create.booleanValue();
    }

    WsdlOperation wsdlOperation = ( WsdlOperation )request.getOperation();
    String req = wsdlOperation.createRequest( createOptional );
    if( req == null )
    {
      UISupport.showErrorMessage( "Request creation failed" );
      return;
    }

    if( request.getRequestContent() != null && request.getRequestContent().trim().length() > 0 )
    {
      if( UISupport.confirm( "Keep existing values", "Recreate Request" ) )
      {
        req = SoapUtils.transferSoapHeaders( request.getRequestContent(), req, wsdlOperation.getInterface()
            .getSoapVersion() );

        req = XmlUtils.transferValues( request.getRequestContent(), req );
      }
    }
View Full Code Here


    boolean create = false;

    if( dialog == null )
      dialog = ADialogBuilder.buildDialog( Form.class );

    WsdlOperation operation = request.getOperation();
    dialog.setValue( Form.STEP_NAME, operation.getName() );
    dialog.setBooleanValue( Form.CLOSE_REQUEST, true );
    dialog.setBooleanValue( Form.SHOW_TESTCASE, true );
    dialog.setIntValue( Form.PORT, 8181 );
    dialog.setValue( Form.PATH, "/" + operation.getName() );

    SoapUIDesktop desktop = SoapUI.getDesktop();
    dialog.getFormField( Form.CLOSE_REQUEST ).setEnabled( desktop != null && desktop.hasDesktopPanel( request ) );

    if( !dialog.show() )
      return false;

    TestStepConfig config = WsdlMockResponseStepFactory.createConfig( operation, request, false );
    MockResponseStepConfig mockResponseStepConfig = ( ( MockResponseStepConfig )config.getConfig() );

    config.setName( dialog.getValue( Form.STEP_NAME ) );
    mockResponseStepConfig.setPath( dialog.getValue( Form.PATH ) );
    mockResponseStepConfig.setPort( dialog.getIntValue( Form.PORT, 8181 ) );
    CompressedStringConfig responseContent = mockResponseStepConfig.getResponse().getResponseContent();

    if( request.getResponse() == null && !request.getOperation().isOneWay() )
    {
      create = UISupport.confirm( "Request is missing response, create default mock response instead?", title );
    }

    if( create )
    {
      String response = operation.createResponse( operation.getSettings().getBoolean(
          WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS ) );
      CompressedStringSupport.setString( responseContent, response );
    }
    else if( request.getResponse() != null )
    {
View Full Code Here

  }

  private DefinitionContext<?> getWsdlContext( WsdlMessageExchange messageExchange, SubmitContext context )
      throws Exception
  {
    WsdlOperation operation = messageExchange.getOperation();
    WsdlInterface iface = operation.getInterface();
    String def = PathUtils.expandPath( definition, iface, context );
    if( StringUtils.isNullOrEmpty( def ) || def.equals( iface.getDefinition() ) )
    {
      definitionContext = ( iface ).getWsdlContext();
      ( ( WsdlContext )definitionContext ).loadIfNecessary();
View Full Code Here

    buildUI();
    setPreferredSize( new Dimension( 600, 440 ) );

    mockOperation.getMockService().getProject().addProjectListener( projectListener );

    WsdlOperation operation = getModelItem().getOperation();
    if( operation != null )
    {
      currentInterface = operation.getInterface();
      currentInterface.addInterfaceListener( interfaceListener );
    }
  }
View Full Code Here

  {
    Set<WsdlInterface> result = new HashSet<WsdlInterface>();

    for( WsdlMockOperation mockOperation : mockOperations )
    {
      WsdlOperation operation = mockOperation.getOperation();
      if( operation != null )
        result.add( operation.getInterface() );
    }

    return result.toArray( new WsdlInterface[result.size()] );
  }
View Full Code Here

    return result;
  }

  public void setOperation( WsdlOperation operation )
  {
    WsdlOperation oldOperation = getOperation();

    if( operation == null )
    {
      getConfig().unsetInterface();
      getConfig().unsetOperation();
View Full Code Here

    putValue( Action.SHORT_DESCRIPTION, "Creates an empty SOAP response" );
  }

  public void actionPerformed( ActionEvent e )
  {
    WsdlOperation operation = mockResponse.getMockOperation().getOperation();

    if( operation == null )
    {
      UISupport.showErrorMessage( "Missing operation for this mock response" );
      return;
    }

    if( UISupport.confirm( "Overwrite current response with empty one?", "Create Empty" ) )
    {
      WsdlInterface iface = operation.getInterface();
      mockResponse.setResponseContent( iface.getMessageBuilder().buildEmptyMessage() );
    }
  }
View Full Code Here

    // {
    // throw new AssertionException( new AssertionError( "WS-A not enabled" )
    // );
    // }

    WsdlOperation operation = messageExchange.getOperation();

    if( wsaAssertionConfiguration.isAssertAction() )
    {
      assertProperty( "Wsa:Action", "Action" );
    }
    validateWsAddressingCommon( content );
    if( operation.isRequestResponse() )
    {
      if( wsaAssertionConfiguration.isAssertMessageId() )
      {
        // MessageId is Mandatory
        assertProperty( "Wsa:MessageId", "MessageId" );
View Full Code Here

    putValue( Action.SHORT_DESCRIPTION, "Creates an SOAP Fault response" );
  }

  public void actionPerformed( ActionEvent e )
  {
    WsdlOperation operation = mockResponse.getMockOperation().getOperation();
    if( operation == null )
    {
      UISupport.showErrorMessage( "Missing operation for this mock response" );
      return;
    }

    if( UISupport.confirm( "Overwrite current response with a fault message?", "Create Fault" ) )
    {
      WsdlInterface iface = operation.getInterface();
      MessagePart[] faultParts = operation.getFaultParts();

      if( faultParts != null && faultParts.length > 0 )
      {
        List<String> names = new ArrayList<String>();
        for( int c = 0; c < faultParts.length; c++ )
View Full Code Here

    putValue( Action.SHORT_DESCRIPTION, "Recreates a default response from the schema" );
  }

  public void actionPerformed( ActionEvent arg0 )
  {
    WsdlOperation operation = mockResponse.getMockOperation().getOperation();
    if( operation == null )
    {
      UISupport.showErrorMessage( "Missing operation for this mock response" );
      return;
    }

    String response = mockResponse.getResponseContent();
    if( response != null && response.trim().length() > 0
        && !UISupport.confirm( "Overwrite current response?", "Recreate response" ) )
      return;

    boolean createOptional = mockResponse.getSettings().getBoolean(
        WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS );
    if( !createOptional )
      createOptional = UISupport.confirm( "Create optional elements in schema?", "Create Request" );

    String req = operation.createResponse( createOptional );
    if( req == null )
    {
      UISupport.showErrorMessage( "Response creation failed" );
      return;
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.WsdlOperation$WsdlFaultPart

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.