Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.HttpRequestConfig


  public WsrmSequence createSequence( String endpoint, SoapVersion soapVersion, String wsrmNamespace, String ackTo,
      Long expires, WsdlOperation operation, String wsaTo )
  {
    String identifier = null;

    HttpRequestConfig httpRequestConfig = ( HttpRequestConfig )( XmlObject.Factory.newInstance()
        .changeType( HttpRequestConfig.type ) );
    httpRequestConfig.setEndpoint( endpoint );
    httpRequestConfig.setMediaType( soapVersion.getContentType() );

    WsaConfigConfig wsaConfigConfig = ( WsaConfigConfig )( XmlObject.Factory.newInstance()
        .changeType( WsaConfigConfig.type ) );
    WsaContainer wsaContainer = new WsaContainerImpl();
    wsaContainer.setOperation( operation );
View Full Code Here


  public void closeSequence( String endpoint, SoapVersion soapVersion, String wsrmNamespace, String uuid,
      String identifier, long lastMsgNum, WsdlOperation operation )
  {

    HttpRequestConfig httpRequestConfig = ( HttpRequestConfig )( XmlObject.Factory.newInstance()
        .changeType( HttpRequestConfig.type ) );
    httpRequestConfig.setEndpoint( endpoint );
    httpRequestConfig.setMediaType( soapVersion.getContentType() );

    WsaConfigConfig wsaConfigConfig = ( WsaConfigConfig )( XmlObject.Factory.newInstance()
        .changeType( WsaConfigConfig.type ) );
    WsaContainer wsaContainer = new WsaContainerImpl();
    wsaContainer.setOperation( operation );
View Full Code Here

  public void getAcks( String endpoint, SoapVersion soapVersion, String wsrmNamespace, String uuid, String identifier,
      WsdlOperation operation )
  {

    HttpRequestConfig httpRequestConfig = ( HttpRequestConfig )( XmlObject.Factory.newInstance()
        .changeType( HttpRequestConfig.type ) );
    httpRequestConfig.setEndpoint( endpoint );
    httpRequestConfig.setMediaType( soapVersion.getContentType() );

    WsaConfigConfig wsaConfigConfig = ( WsaConfigConfig )( XmlObject.Factory.newInstance()
        .changeType( WsaConfigConfig.type ) );
    WsaContainer wsaContainer = new WsaContainerImpl();
    wsaContainer.setOperation( operation );
View Full Code Here

  }

  public static HttpRequestConfig convert( OldRestRequestConfig old )
  {
    HttpRequestConfig config = HttpRequestConfig.Factory.newInstance();
    config.setAssertionArray( old.getAssertionList().toArray( new TestAssertionConfig[old.sizeOfAssertionArray()] ) );
    config.setAttachmentArray( old.getAttachmentList().toArray( new AttachmentConfig[old.sizeOfAttachmentArray()] ) );
    XmlObject obj = old.getCredentials();
    if( obj != null )
      config.setCredentials( ( CredentialsConfig )obj.copy() );
    obj = old.getParameters();
    if( obj != null )
      config.setParameters( ( RestParametersConfig )obj.copy() );

    obj = old.getRequest();
    if( obj != null )
      config.setRequest( ( CompressedStringConfig )obj.copy() );
    obj = old.getSettings();
    if( obj != null )
      config.setSettings( ( SettingsConfig )obj.copy() );
    if( old.isSetDescription() )
      config.setDescription( old.getDescription() );
    config.setEncoding( old.getEncoding() );
    config.setEndpoint( old.getEndpoint() );
    config.setSslKeystore( old.getSslKeystore() );
    if( old.isSetMediaType() )
      config.setMediaType( old.getMediaType() );
    if( old.isSetMethod() )
      config.setMethod( old.getMethod() );
    if( old.isSetName() )
      config.setName( old.getName() );
    if( old.isSetPostQueryString() )
      config.setPostQueryString( old.getPostQueryString() );
    return config;
  }
View Full Code Here

  public void createWebTest( WsdlTestCase targetTestCase, String endpoint, String name, final boolean startRecording )
  {
    targetTestCase.setKeepSession( true );

    HttpRequestConfig httpRequest = HttpRequestConfig.Factory.newInstance();
    httpRequest.setMethod( HttpMethodType.GET.toString() );

    httpRequest.setEndpoint( endpoint );

    TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
    testStepConfig.setType( HttpRequestStepFactory.HTTPREQUEST_TYPE );
    testStepConfig.setConfig( httpRequest );
    testStepConfig.setName( name );
View Full Code Here

  private void createWebTest( WsdlTestCase targetTestCase, String endpoint, String name, final boolean startRecording )
  {
    targetTestCase.setKeepSession( true );

    HttpRequestConfig httpRequest = HttpRequestConfig.Factory.newInstance();
    httpRequest.setMethod( HttpMethodType.GET.toString() );

    httpRequest.setEndpoint( endpoint );

    TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
    testStepConfig.setType( HttpRequestStepFactory.HTTPREQUEST_TYPE );
    testStepConfig.setConfig( httpRequest );
    testStepConfig.setName( name );
View Full Code Here

    try
    {
      if( dialog.show() )
      {
        HttpRequestConfig httpRequest = HttpRequestConfig.Factory.newInstance();
        httpRequest.setEndpoint( HttpUtils.ensureEndpointStartsWithProtocol( dialog.getValue( Form.ENDPOINT ) ) );
        httpRequest.setMethod( dialog.getValue( Form.HTTPMETHOD ) );
        XmlBeansRestParamsTestPropertyHolder tempParams = new XmlBeansRestParamsTestPropertyHolder( testCase,
            httpRequest.addNewParameters() );
        tempParams.addParameters( params );
        tempParams.release();

        TestStepConfig testStep = TestStepConfig.Factory.newInstance();
        testStep.setType( HTTPREQUEST_TYPE );
View Full Code Here

  public TestStepConfig createNewTestStep( WsdlTestCase testCase, String name, String endpoint, String method )
  {
    RestParametersConfig restParamConf = RestParametersConfig.Factory.newInstance();
    params = new XmlBeansRestParamsTestPropertyHolder( testCase, restParamConf );

    HttpRequestConfig httpRequest = HttpRequestConfig.Factory.newInstance();
    httpRequest.setMethod( method );

    String path = RestUtils.extractParams( endpoint, params, true );
    endpoint = path;

    XmlBeansRestParamsTestPropertyHolder tempParams = new XmlBeansRestParamsTestPropertyHolder( testCase,
        httpRequest.addNewParameters() );
    tempParams.addParameters( params );

    httpRequest.setEndpoint( HttpUtils.ensureEndpointStartsWithProtocol( endpoint ) );

    TestStepConfig testStep = TestStepConfig.Factory.newInstance();
    testStep.setType( HTTPREQUEST_TYPE );
    testStep.setConfig( httpRequest );
    testStep.setName( name );
View Full Code Here

    }
  }

  public TestStepConfig createConfig( WsdlMonitorMessageExchange me, String stepName )
  {
    HttpRequestConfig testRequestConfig = HttpRequestConfig.Factory.newInstance();

    testRequestConfig.setName( stepName );
    testRequestConfig.setEncoding( "UTF-8" );
    testRequestConfig.setEndpoint( me.getEndpoint() );
    testRequestConfig.setMethod( me.getRequestMethod() );

    // set parameters
    RestParametersConfig parametersConfig = testRequestConfig.addNewParameters();
    Map<String, String> parametersMap = me.getHttpRequestParameters();
    List<RestParameterConfig> parameterConfigList = new ArrayList<RestParameterConfig>();
    for( String name : parametersMap.keySet() )
    {
      RestParameterConfig parameterConf = RestParameterConfig.Factory.newInstance();
      parameterConf.setName( name );
      parameterConf.setValue( parametersMap.get( name ) );
      parameterConfigList.add( parameterConf );
    }
    parametersConfig.setParameterArray( parameterConfigList.toArray( new RestParameterConfig[parametersMap.size()] ) );
    testRequestConfig.setParameters( parametersConfig );

    // String requestContent = me.getRequestContent();
    // testRequestConfig.addNewRequest().setStringValue( requestContent );

    TestStepConfig testStep = TestStepConfig.Factory.newInstance();
View Full Code Here

  public void sendMakeConnectionRequest( String endpoint, SoapVersion soapVersion, WsdlOperation operation, String uuid )
  {
    String identifier = null;

    HttpRequestConfig httpRequestConfig = ( HttpRequestConfig )( XmlObject.Factory.newInstance()
        .changeType( HttpRequestConfig.type ) );
    httpRequestConfig.setEndpoint( endpoint );

    WsaConfigConfig wsaConfigConfig = ( WsaConfigConfig )( XmlObject.Factory.newInstance()
        .changeType( WsaConfigConfig.type ) );
    WsaContainer wsaContainer = new WsaContainerImpl();
    wsaContainer.setOperation( operation );
View Full Code Here

TOP

Related Classes of com.eviware.soapui.config.HttpRequestConfig

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.