Examples of WadlGenerator


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

      // InferredSchemaManager.getInferredSchema( restService
      // ).getXsdForNamespace(
      // InferredSchemaManager.namespaceForFilename( wsdlUrl ) ) );
      return XmlUtils.createXmlObject( InferredSchemaManager.getInferredSchema( restService ).getXsdForNamespace(
          InferredSchemaManager.namespaceForFilename( wsdlUrl ) ) );
    return new WadlGenerator( restService ).generateWadl();
  }
View Full Code Here

Examples of com.sun.jersey.server.wadl.WadlGenerator

        ResourceDocType rdt = new ResourceDocType();
        rdt.getDocs().add(cdt);


        /* Generate WADL for that class */
        WadlGenerator wg = new WadlGeneratorResourceDocSupport(new WadlGeneratorImpl(), rdt);

        WadlBuilder wb = new WadlBuilder(wg);
        AbstractResource resource = IntrospectionModeller.createResource(TestResource.class);
        ApplicationDescription app = wb.generate(null, Collections.singleton(resource));

View Full Code Here

Examples of com.sun.jersey.server.wadl.WadlGenerator

    private static final Logger LOGGER = Logger.getLogger(WadlGeneratorLoader.class.getName());

    static WadlGenerator loadWadlGenerators(
            List<WadlGenerator> wadlGenerators) throws Exception {
        WadlGenerator wadlGenerator = new WadlGeneratorJAXBGrammarGenerator();
        if (wadlGenerators != null && !wadlGenerators.isEmpty()) {
            for (WadlGenerator generator : wadlGenerators) {
                generator.setWadlGeneratorDelegate(wadlGenerator);
                wadlGenerator = generator;
            }
        }
        wadlGenerator.init();
        return wadlGenerator;
    }
View Full Code Here

Examples of com.sun.jersey.server.wadl.WadlGenerator

        final List<WadlGeneratorDescription> list = wadlGeneratorDescriptions != null ? Arrays.asList(wadlGeneratorDescriptions) : null;
        return loadWadlGeneratorDescriptions(list);
    }

    static WadlGenerator loadWadlGeneratorDescriptions(List<WadlGeneratorDescription> wadlGeneratorDescriptions) throws Exception {
        WadlGenerator wadlGenerator = new WadlGeneratorJAXBGrammarGenerator();

        final CallbackList callbacks = new CallbackList();
        try {
            if (wadlGeneratorDescriptions != null && !wadlGeneratorDescriptions.isEmpty()) {
                for (WadlGeneratorDescription wadlGeneratorDescription : wadlGeneratorDescriptions) {
                    final WadlGeneratorControl control = loadWadlGenerator(wadlGeneratorDescription, wadlGenerator);
                    wadlGenerator = control.wadlGenerator;
                    callbacks.add(control.callback);
                }
            }
            wadlGenerator.init();
        } finally {
            callbacks.callback();
        }

        return wadlGenerator;
View Full Code Here

Examples of com.sun.jersey.server.wadl.WadlGenerator

    private static WadlGeneratorControl loadWadlGenerator(
            WadlGeneratorDescription wadlGeneratorDescription,
            com.sun.jersey.server.wadl.WadlGenerator wadlGeneratorDelegate) throws Exception {
        LOGGER.info("Loading wadlGenerator " + wadlGeneratorDescription.getGeneratorClass().getName());
        final WadlGenerator generator = wadlGeneratorDescription.getGeneratorClass().newInstance();
        generator.setWadlGeneratorDelegate(wadlGeneratorDelegate);
        CallbackList callbacks = null;
        if (wadlGeneratorDescription.getProperties() != null
                && !wadlGeneratorDescription.getProperties().isEmpty()) {
            callbacks = new CallbackList();
            for (Entry<Object, Object> entry : wadlGeneratorDescription.getProperties().entrySet()) {
View Full Code Here

Examples of com.sun.jersey.server.wadl.WadlGenerator

     * Create a new instance of {@link WadlGenerator}, based on the {@link WadlGeneratorDescription}s
     * provided by {@link #configure()}.
     * @return the initialized {@link WadlGenerator}
     */
    public WadlGenerator createWadlGenerator() {
        WadlGenerator wadlGenerator = null;
        final List<WadlGeneratorDescription> wadlGeneratorDescriptions = configure();
        try {
            wadlGenerator = WadlGeneratorLoader.loadWadlGeneratorDescriptions( wadlGeneratorDescriptions );
        } catch ( Exception e ) {
            throw new RuntimeException( "Could not load wadl generators from wadlGeneratorDescriptions.", e );
View Full Code Here

Examples of com.sun.jersey.server.wadl.WadlGenerator

        this.wadlGeneratorConfig = WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(resourceConfig);

        try {
            // TODO perhaps this should be done another way for the moment
            // create a temporary generator just to do this one task
            final WadlGenerator wadlGenerator = this.wadlGeneratorConfig.createWadlGenerator();
            final String requiredJaxbContextPath = wadlGenerator.getRequiredJaxbContextPath();

            this.jaxbContext = null;
            try {
                // the following works fine in WLS and non-GF environment
                this.jaxbContext = JAXBContext.newInstance(requiredJaxbContextPath, wadlGenerator.getClass().getClassLoader());
            } catch (JAXBException ex) {
                // fallback for GF
                LOG.log(Level.WARNING, ex.getMessage(), ex);
                this.jaxbContext = JAXBContext.newInstance(requiredJaxbContextPath);
            }
View Full Code Here

Examples of com.sun.jersey.server.wadl.WadlGenerator

        // Get the root application description
        //

        ApplicationDescription description = getApplication(info);

        WadlGenerator wadlGenerator = wadlGeneratorConfig.createWadlGenerator();

        Application a = path == null ? new WadlBuilder( wadlGenerator ).generate(info, description,resource) :
                new WadlBuilder( wadlGenerator ).generate(info, description, resource, path);

        for (Resources resources : a.getResources()) {
View Full Code Here

Examples of com.sun.jersey.server.wadl.WadlGenerator

    private WadlGenerator loadWadlGenerator(
            WadlGeneratorDescription wadlGeneratorDescription,
            com.sun.jersey.server.wadl.WadlGenerator wadlGeneratorDelegate ) throws Exception {
        getLog().info( "Loading wadlGenerator " + wadlGeneratorDescription.getClassName() );
        final Class<?> clazz = Class.forName( wadlGeneratorDescription.getClassName(), true, Thread.currentThread().getContextClassLoader() );
        final WadlGenerator generator = clazz.asSubclass( WadlGenerator.class ).newInstance();
        generator.setWadlGeneratorDelegate( wadlGeneratorDelegate );
        if ( wadlGeneratorDescription.getProperties() != null
                && !wadlGeneratorDescription.getProperties().isEmpty() ) {
            for ( Entry<Object, Object> entry : wadlGeneratorDescription.getProperties().entrySet() ) {
                setProperty( generator, entry.getKey().toString(), entry.getValue() );
            }
View Full Code Here

Examples of org.apache.cxf.jaxrs.model.wadl.WadlGenerator

  
     
    public void execute() throws MojoExecutionException {
        getResourcesList();
        WadlGenerator wadlGenernator = new WadlGenerator(getBus());
        StringBuilder sbMain = wadlGenernator.generateWADL(getBaseURI(), classResourceInfos, useJson, null, null);
        getLog().debug("the wadl is =====> \n" + sbMain.toString());
        generateWadl(sbMain.toString());
    }
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.