Package com.eviware.soapui.impl.wsdl

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


  public SchemaTypeSystem getTypeSystem()
  {
    try
    {
      WsdlOperation operation = mockResponse.getMockOperation().getOperation();
      if( operation != null )
      {
        WsdlInterface iface = operation.getInterface();
        WsdlContext wsdlContext = iface.getWsdlContext();
        return wsdlContext.getSchemaTypeSystem();
      }
    }
    catch( Exception e1 )
View Full Code Here


    public Object getValueAt( int rowIndex, int columnIndex )
    {
      if( updatingInterface )
        return "<updating>";

      WsdlOperation operation = iface.getOperationAt( rowIndex );
      BindingOperation bindingOperation = operation.getBindingOperation();

      switch( columnIndex )
      {
      case 0 :
        return operation.getName();
      case 1 :
      {
        boolean in = WsdlUtils.isInputSoapEncoded( bindingOperation );
        boolean out = operation.isUnidirectional() ? false : WsdlUtils.isOutputSoapEncoded( bindingOperation );

        if( out && in )
          return "SOAP Encoding";
        if( !out && !in )
          return "Literal";

        return "Mixed";
      }
      case 3 :
        return operation.getAction();
      case 2 :
        return Boolean.valueOf( operation.isUnidirectional() );
      }

      return null;
    }
View Full Code Here

    List<Request> result = new ArrayList<Request>();

    // first check operations
    for( int c = 0; c < iface.getOperationCount(); c++ )
    {
      WsdlOperation operation = iface.getOperationAt( c );
      String newRequest = operation.createRequest( buildOptional );
      List<Request> requests = operation.getRequestList();

      for( Request request : requests )
      {
        String requestContent = request.getRequestContent();

        if( keepHeaders )
        {
          newRequest = SoapUtils.transferSoapHeaders( requestContent, newRequest, iface.getSoapVersion() );
        }

        String req = XmlUtils.transferValues( requestContent, newRequest );

        // changed?
        if( !req.equals( requestContent ) )
        {
          if( !XmlUtils.prettyPrintXml( req ).equals( XmlUtils.prettyPrintXml( requestContent ) ) )
          {
            if( createBackups )
            {
              WsdlRequest backupRequest = operation.addNewRequest( "Backup of [" + request.getName() + "]" );
              ( ( WsdlRequest )request ).copyTo( backupRequest, false, false );
            }

            ( ( WsdlRequest )request ).setRequestContent( req );
            count++ ;
View Full Code Here

  {
    WsdlTestCase testCase = testSuite.addNewTestCase( iface.getName() + " TestSuite" );

    for( int i = 0; i < iface.getOperationCount(); i++ )
    {
      WsdlOperation operation = iface.getOperationAt( i );
      if( !operations.contains( operation.getName() ) )
        continue;

      if( useExisting && operation.getRequestCount() > 0 )
      {
        for( int x = 0; x < operation.getRequestCount(); x++ )
        {
          testCase.addTestStep( WsdlTestRequestStepFactory.createConfig( operation.getRequestAt( x ),
              operation.getName() ) );
        }
      }
      else
      {
        testCase.addTestStep( WsdlTestRequestStepFactory.createConfig( operation, operation.getName() ) );
      }
    }

    if( createLoadTest )
    {
View Full Code Here

  private void generateMulipleTestCases( WsdlTestSuite testSuite, WsdlInterface iface, boolean useExisting,
      boolean createLoadTest, List<String> operations )
  {
    for( int i = 0; i < iface.getOperationCount(); i++ )
    {
      WsdlOperation operation = iface.getOperationAt( i );
      if( !operations.contains( operation.getName() ) )
        continue;

      WsdlTestCase testCase = testSuite.addNewTestCase( operation.getName() + " TestCase" );

      if( useExisting && operation.getRequestCount() > 0 )
      {
        for( int x = 0; x < operation.getRequestCount(); x++ )
        {
          testCase.addTestStep( WsdlTestRequestStepFactory.createConfig( operation.getRequestAt( x ),
              operation.getName() ) );
        }
      }
      else
      {
        testCase.addTestStep( WsdlTestRequestStepFactory.createConfig( operation, operation.getName() ) );
      }

      if( createLoadTest )
      {
        testCase.addNewLoadTest( "LoadTest 1" );
View Full Code Here

      {
      }

      for( int i = 0; i < iface.getOperationCount(); i++ )
      {
        WsdlOperation operation = ( WsdlOperation )iface.getOperationAt( i );
        if( !operations.contains( operation.getName() ) )
          continue;

        WsdlMockOperation mockOperation = ( WsdlMockOperation )mockService.addNewMockOperation( operation );
        if( mockOperation != null )
          mockOperation.addNewMockResponse( "Response 1", true );
View Full Code Here

    mockService = ( WsdlMockService )project.addNewMockService( "MockService 1" );

    mockService.setPort( 9081 );
    mockService.setPath( "/testmock" );

    WsdlOperation operation = ( WsdlOperation )iface.getOperationAt( 0 );
    WsdlMockOperation mockOperation = ( WsdlMockOperation )mockService.addNewMockOperation( operation );
    WsdlMockResponse mockResponse = mockOperation.addNewMockResponse( "Test Response", true );
    mockResponse.setResponseContent( "Tjohoo!" );

    mockService.start();
View Full Code Here

      {
        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 )
            {
View Full Code Here

    WsdlInterface iface = wsdls[0];

    assertNotNull( iface );
    assertEquals( 2, iface.getOperationCount() );

    WsdlOperation operation = ( WsdlOperation )iface.getOperationAt( 0 );

    assertNotNull( operation );
    assertEquals( "GetDefaultPageData", operation.getName() );

    Definition definition = WsdlUtils.readDefinition( "http://localhost:8082/testonewayop/TestService.wsdl" );

    BindingOperation bindingOperation = operation.findBindingOperation( definition );
    assertNotNull( bindingOperation );
    assertEquals( bindingOperation.getName(), operation.getBindingOperationName() );

    assertNull( operation.getOutputName() );

    WsdlRequest request = operation.addNewRequest( "TestRequest" );
    assertNotNull( request );

    String requestXml = operation.createRequest( true );
    assertNotNull( requestXml );

    request.setRequestContent( requestXml );

    Submit submit = request.submit( new WsdlSubmitContext( null ), false );
View Full Code Here

      wsdlContext.getSoapVersion().validateSoapEnvelope( requestContent, errors );

      if( errors.isEmpty() && !envelopeOnly )
      {
        wsdlContext.getSoapVersion().validateSoapEnvelope( requestContent, errors );
        WsdlOperation operation = messageExchange.getOperation();
        BindingOperation bindingOperation = operation.getBindingOperation();
        if( bindingOperation == null )
        {
          errors.add( XmlError.forMessage( "Missing operation [" + operation.getBindingOperationName()
              + "] in wsdl definition" ) );
        }
        else
        {
          Part[] inputParts = WsdlUtils.getInputParts( bindingOperation );
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.