Examples of RestService


Examples of com.adaptrex.core.rest.RestService

  public ORMPersistenceManager getPersistenceManager(String factoryName) {
    return AdaptrexServices.getPersistenceManager(factoryName);
  }
 
  public RestService getRest() {
    return new RestService();
  }
View Full Code Here

Examples of com.adaptrex.core.rest.RestService

   
    return persistenceManager;
  }
 
  public static RestService getRestService() {
    return new RestService();
  }
View Full Code Here

Examples of com.adaptrex.core.rest.RestService

      }
    }   
  }
 
  public void initialize(ServletContext context) {
    this.restService = new RestService(context);
    context.setAttribute(Adaptrex.ATTRIBUTE, this);
   
    log.info("Adaptrex Initialized: " + properties.get(AdaptrexProperties.ADAPTREX_VERSION));
  }
View Full Code Here

Examples of com.adaptrex.core.rest.RestService

      }
    }   
  }
 
  public void initialize(ServletContext context) {
    this.restService = new RestService(context);
    context.setAttribute(Adaptrex.ATTRIBUTE, this);
   
    log.info("Adaptrex Initialized: " + properties.get(AdaptrexProperties.ADAPTREX_VERSION));
  }
View Full Code Here

Examples of com.eviware.soapui.impl.rest.RestService

  {
    Map<String, RestResource> options = new LinkedHashMap<String, RestResource>();

    WsdlProject project = requestStep.getTestCase().getTestSuite().getProject();
    String serviceName = requestStep.getRequestStepConfig().getService();
    RestService service = ( RestService )project.getInterfaceByName( serviceName );
    if( service != null )
    {
      addResources( service, options );
    }
    else
View Full Code Here

Examples of com.eviware.soapui.impl.rest.RestService

        WsdlInterface iface = ( WsdlInterface )ic;
        section.addMetric( iface.getIcon(), iface.getName(), MetricType.URL ).set( iface.getDefinition() );
      }
      else if( ic instanceof RestService )
      {
        RestService iface = ( RestService )ic;
        section.addMetric( iface.getIcon(), iface.getName(), MetricType.URL ).set( iface.getWadlUrl() );
      }

      interfaceNameSet.add( ic.getName() );
    }
View Full Code Here

Examples of com.eviware.soapui.impl.rest.RestService

public class WadlImporterTestCase extends TestCase
{
  public void testWadlImporter() throws Exception
  {
    WsdlProject project = new WsdlProject();
    RestService service = ( RestService )project.addNewInterface( "REST Service", RestServiceFactory.REST_TYPE );
    WadlImporter importer = new WadlImporter( service );
    importer.initFromWadl( WadlImporter.class.getResource( "/wadl/YahooSearch.wadl" ).toString() );
    assertEquals( service.getName(), "REST Service" );
    assertEquals( 1, service.getResourceList().size() );
    assertEquals( 0, service.getResourceList().get( 0 ).getChildResourceCount() );
    assertEquals( 1, service.getResourceList().get( 0 ).getRestMethodCount() );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.rest.RestService

  }

  public void testImportWadl() throws Exception
  {
    WsdlProject project = new WsdlProject();
    RestService service = ( RestService )project.addNewInterface( "Test", RestServiceFactory.REST_TYPE );

    new WadlImporter( service ).initFromWadl( new File( "src" + File.separatorChar + "test-resources"
        + File.separatorChar + "wadl" + File.separatorChar + "YahooSearch.wadl" ).toURI().toURL().toString() );

    assertEquals( 1, service.getOperationCount() );
    assertEquals( "/NewsSearchService/V1/", service.getBasePath() );

    RestResource resource = service.getOperationAt( 0 );

    assertEquals( 1, resource.getPropertyCount() );
    assertEquals( "appid", resource.getPropertyAt( 0 ).getName() );
    assertNotNull( resource.getProperty( "appid" ) );
    assertEquals( 1, resource.getRequestCount() );
View Full Code Here

Examples of com.eviware.soapui.impl.rest.RestService

    }
  }

  private void importWadl( WsdlProject project, String url )
  {
    RestService restService = ( RestService )project
        .addNewInterface( project.getName(), RestServiceFactory.REST_TYPE );
    UISupport.select( restService );
    try
    {
      new WadlImporter( restService ).initFromWadl( url );
View Full Code Here

Examples of com.eviware.soapui.impl.rest.RestService

    importWadl( project, "file:/" + path );
  }

  private void importWadl( WsdlProject project, String path )
  {
    RestService restService = ( RestService )project.addNewInterface( ( ( RestTestRequestStepInterface )item )
        .getRequestStepConfig().getService(), RestServiceFactory.REST_TYPE );
    try
    {
      new WadlImporter( restService ).initFromWadl( path );
    }
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.