Examples of WsdlSubmitContext


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

    }

    try
    {

      WsdlSubmit wsdlSubmit = startSequenceRequest.submit( new WsdlSubmitContext( null ), true );
      Logger.getLogger( "wsrm" ).info( "StartSequence Request Sent: " + uuid );

      // startSequenceRequest.getWsaConfig().setWsaEnabled(false);
      while( wsdlSubmit.getStatus() != Status.FINISHED )
      {
View Full Code Here

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

      }

      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 );

    }
    catch( XmlException e )
    {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    try
    {
      WsdlSubmit wsdlSubmit = terminateSequenceRequest.submit( new WsdlSubmitContext( null ), true );

    }
    catch( SubmitException e1 )
    {
      SoapUI.logError( e1 );
View Full Code Here

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

    }

    try
    {

      WsdlSubmit wsdlSubmit = startSequenceRequest.submit( new WsdlSubmitContext( null ), true );

      while( wsdlSubmit.getStatus() != Status.FINISHED )
      {
        wsdlSubmit.waitUntilFinished();
      }
View Full Code Here

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

    }

    try
    {

      WsdlSubmit wsdlSubmit = makeConnectionRequest.submit( new WsdlSubmitContext( null ), true );

      // startSequenceRequest.getWsaConfig().setWsaEnabled(false);
      while( wsdlSubmit.getStatus() != Status.FINISHED )
      {
        wsdlSubmit.waitUntilFinished();
View Full Code Here

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

        if( !hasResponseForRecording )
        {
          // resubmit so we have "live" content
          try
          {
            getHttpRequest().submit( new WsdlSubmitContext( getHttpRequest() ), false ).waitUntilFinished();
          }
          catch( SubmitException e )
          {
            SoapUI.logError( e );
          }
View Full Code Here

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

  public void testFullContentMatch() throws Exception
  {
    assertion.setPath( "/" );
    assertion.setExpectedContent( testResponse );

    assertNotNull( assertion.assertContent( testResponse, new WsdlSubmitContext( null ), "" ) );
  }
View Full Code Here

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

    assertion.setPath( "declare namespace urn='urn:schema:v1:companyservice:applications:bis.bonnier.se';"
        + "//urn:searchResponse" );

    assertion.setExpectedContent( testBody );

    assertNotNull( assertion.assertContent( testResponse, new WsdlSubmitContext( null ), "" ) );
  }
View Full Code Here

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

        + "declare namespace urn='urn:schema:v1:companyservice:applications:bis.bonnier.se';"
        + "declare namespace urn1='urn:v1:companysearch:common:bis.bonnier.se';"
        + "/env:Envelope/env:Body/urn:searchResponse/urn1:searchResult/@hitCount" );
    assertion.setExpectedContent( "131" );

    assertNotNull( assertion.assertContent( testResponse, new WsdlSubmitContext( null ), "" ) );
  }
View Full Code Here

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

    assertion.setPath( "declare namespace urn='urn:schema:v1:companyservice:applications:bis.bonnier.se';"
        + "declare namespace urn1='urn:v1:companysearch:common:bis.bonnier.se';"
        + "//urn:searchResponse/urn1:searchResult/company[2]/companyName" );
    assertion.setExpectedContent( "<companyName>Bonnier Otto Karl Adam</companyName>" );

    assertNotNull( assertion.assertContent( testResponse, new WsdlSubmitContext( null ), "" ) );
  }
View Full Code Here

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

        + "declare namespace urn='urn:schema:v1:companyservice:applications:bis.bonnier.se';"
        + "declare namespace urn1='urn:v1:companysearch:common:bis.bonnier.se';"
        + "/env:Envelope/env:Body/urn:searchResponse/urn1:searchResult/company[2]/companyName/text()" );
    assertion.setExpectedContent( "Bonnier Otto Karl Adam" );

    assertNotNull( assertion.assertContent( testResponse, new WsdlSubmitContext( null ), "" ) );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.