Package com.eviware.soapui.model.propertyexpansion

Examples of com.eviware.soapui.model.propertyexpansion.DefaultPropertyExpansionContext


    }
  }

  private TestCaseRunner runTestCase( WsdlTestCase testCaseAt, boolean async )
  {
    DefaultPropertyExpansionContext properties = ( DefaultPropertyExpansionContext )getRunContext().getProperties();
    properties.put( "#TestSuiteRunner#", this );

    TestCaseRunner currentRunner = testCaseAt.run( properties, true );
    activeRunners.add( currentRunner );
    if( !async )
      currentRunner.waitUntilFinished();
View Full Code Here


    }
  }

  private WsdlTestSuiteRunner runTestSuite( WsdlTestSuite testSuite, boolean async )
  {
    DefaultPropertyExpansionContext properties = ( DefaultPropertyExpansionContext )getRunContext().getProperties();
    properties.put( "#ProjectRunner#", this );

    // this is here for backwards compatibility, should be removed eventually
    properties.put( "#TestSuiteRunner#", this );

    WsdlTestSuiteRunner currentRunner = testSuite.run( properties, true );
    activeRunners.add( currentRunner );
    if( !async )
      currentRunner.waitUntilFinished();
View Full Code Here

      cursor.dispose();

      cursor.dispose();

      WsaUtils wsaUtils = new WsaUtils( object.xmlText(), soapVersion, null, new DefaultPropertyExpansionContext(
          makeConnectionRequest ) );
      String content = wsaUtils.addWSAddressingRequest( makeConnectionRequest );

      makeConnectionRequest.setRequestContent( content );
View Full Code Here

    public void actionPerformed( ActionEvent arg0 )
    {
      try
      {

        PropertyExpansionContext context = new DefaultPropertyExpansionContext( getModelItem() );
        JdbcUtils.initConnection( context, jdbcRequestTestStep.getDriver(),
            jdbcRequestTestStep.getConnectionString(), jdbcRequestTestStep.getPassword() );
        UISupport.showInfoMessage( "The Connection Successfully Tested" );
      }
      catch( SoapUIException e )
View Full Code Here

        settings.getString( SecurityTabForm.SSLTUNNEL_KEYSTOREPATH, "" ) + " "
            + settings.getString( SecurityTabForm.SSLTUNNEL_KEYSTOREPASSWORD, "" ) );
    hostConfiguration.setHost( new URI( this.prot + sslEndPoint, true ) );

    hostConfiguration = ProxyUtils.initProxySettings( settings, httpState, hostConfiguration, prot + sslEndPoint,
        new DefaultPropertyExpansionContext( project ) );

    if( sslEndPoint.indexOf( "/" ) < 0 )
      postMethod.setPath( "/" );
    else
      postMethod.setPath( sslEndPoint.substring( sslEndPoint.indexOf( "/" ), sslEndPoint.length() ) );
View Full Code Here

    if( responseWss != null )
    {
      Document dom = XmlUtils.parseXml( responseContent );
      try
      {
        responseWssResult = responseWss.processIncoming( dom, new DefaultPropertyExpansionContext( project ) );
        if( responseWssResult != null && responseWssResult.size() > 0 )
        {
          StringWriter writer = new StringWriter();
          XmlUtils.serialize( dom, writer );
          responseContent = writer.toString();
View Full Code Here

    if( requestWss != null )
    {
      Document dom = XmlUtils.parseXml( requestContent );
      try
      {
        requestWssResult = requestWss.processIncoming( dom, new DefaultPropertyExpansionContext( project ) );
        if( requestWssResult != null && requestWssResult.size() > 0 )
        {
          StringWriter writer = new StringWriter();
          XmlUtils.serialize( dom, writer );
          requestContent = writer.toString();
View Full Code Here

      wsrmContainer.getWsaConfig().setTo( endpoint );
      wsrmContainer.getWsaConfig().setGenerateMessageId( true );

      WsaUtils wsaUtils = new WsaUtils( content, wsrmContainer.getOperation().getInterface().getSoapVersion(), null,
          new DefaultPropertyExpansionContext( wsrmContainer ) );
      content = wsaUtils.addWSAddressingRequest( wsrmContainer );

    }
    catch( Exception e )
    {
View Full Code Here

        cursor.insertChars( expires.toString() );
      }

      cursor.dispose();

      WsaUtils wsaUtils = new WsaUtils( object.xmlText(), soapVersion, null, new DefaultPropertyExpansionContext(
          startSequenceRequest ) );
      content = wsaUtils.addWSAddressingRequest( startSequenceRequest );

      startSequenceRequest.setRequestContent( content );
View Full Code Here

        cursor.beginElement( WSRM_LAST_MSG, wsrmNamespace );
        cursor.insertChars( String.valueOf( lastMsgNum ) );
        cursor.dispose();

        WsaUtils wsaUtils = new WsaUtils( object.xmlText(), soapVersion, null, new DefaultPropertyExpansionContext(
            closeSequenceRequest ) );
        content = wsaUtils.addWSAddressingRequest( closeSequenceRequest );

        closeSequenceRequest.setRequestContent( content );

        Logger.getLogger( "wsrm" ).info( "CloseSequence Request Sent for Sequence: " + identifier );

      }
      catch( XmlException e )
      {
        SoapUI.logError( e );
      }

      try
      {

        WsdlSubmit wsdlSubmit = closeSequenceRequest.submit( new WsdlSubmitContext( null ), true );
        while( wsdlSubmit.getStatus() != Status.FINISHED )
        {
          wsdlSubmit.waitUntilFinished();
        }
        Response response = wsdlSubmit.getResponse();
        String responseContent = response.getContentAsString();
        // XmlObject xml = XmlObject.Factory.parse( responseContent );
        XmlObject xml = XmlUtils.createXmlObject( responseContent );

        XmlOptions options = new XmlOptions();

        String namespaceDeclaration = "declare namespace wsrm='" + wsrmNamespace + "';";
        XmlObject result[] = xml.selectPath( namespaceDeclaration + "//wsrm:AcknowledgementRange", options );

        if( result.length > 0 )
        {
          for( int i = 0; i < result.length; i++ )
          {
            String upper = result[i].selectAttribute( null, "Upper" ).getDomNode().getNodeValue();
            String lower = result[i].selectAttribute( null, "Lower" ).getDomNode().getNodeValue();

            if( lower == upper )
            {
              Logger.getLogger( "wsrm" ).info(
                  "Acknowledgment for message " + upper + " received for identifier: " + identifier );
            }
            else
            {
              Logger.getLogger( "wsrm" ).info(
                  "Acknowledgment for messages " + lower + " to " + upper + " received for identifier: "
                      + identifier );
            }
          }
        }
        else
        {
          Logger.getLogger( "wsrm" ).info( "No Acknowledgments received for identifier: " + identifier );
        }

      }
      catch( SubmitException e1 )
      {
        SoapUI.logError( e1 );

      }
      catch( XmlException e )
      {
        SoapUI.logError( e );
      }
    }

    // The Terminate Sequence Message
    WsaRequest terminateSequenceRequest = new WsaRequest( httpRequestConfig, wsaConfig, wsrmConfig, false );
    terminateSequenceRequest.setOperation( operation );

    String terminateSequenceRequestContent = SoapMessageBuilder.buildEmptyMessage( soapVersion );

    terminateSequenceRequest.getWsaConfig().setWsaEnabled( true );
    terminateSequenceRequest.getWsaConfig().setAction( wsrmNamespace + WSRM_TERMINATE_SEQUENCE_ACTION );

    terminateSequenceRequest.getWsaConfig().setTo( endpoint );
    terminateSequenceRequest.getWsaConfig().setGenerateMessageId( true );

    try
    {
      // XmlObject object = XmlObject.Factory.parse(
      // terminateSequenceRequestContent );
      XmlObject object = XmlUtils.createXmlObject( terminateSequenceRequestContent );
      XmlCursor cursor = object.newCursor();

      cursor.toFirstContentToken();
      cursor.toFirstChild();
      cursor.toNextSibling();

      cursor.toNextToken();
      cursor.insertNamespace( "wsrm", wsrmNamespace );

      cursor.beginElement( "TerminateSequence", wsrmNamespace );
      cursor.beginElement( WSRM_IDENTIFIER, wsrmNamespace );
      cursor.insertChars( identifier );

      cursor.dispose();

      // startSequenceRequest.getOperation().setAction("");
      // startSequenceRequest.setRequestContent(object.xmlText());

      WsaUtils wsaUtils = new WsaUtils( object.xmlText(), soapVersion, null, new DefaultPropertyExpansionContext(
          terminateSequenceRequest ) );
      terminateSequenceRequestContent = wsaUtils.addWSAddressingRequest( terminateSequenceRequest );

      terminateSequenceRequest.setRequestContent( terminateSequenceRequestContent );
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.propertyexpansion.DefaultPropertyExpansionContext

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.