Package org.apache.axis.wsdl.toJava

Examples of org.apache.axis.wsdl.toJava.Emitter


     * Instantiate a WSDL2Java emitter.
     */
    public WSDL2Java() {
        // Instantiate the emitter
        writerFactory = new JavaWriterFactory();
        emitter = new Emitter(writerFactory);
        writerFactory.setEmitter(emitter);
    } // ctor
View Full Code Here


        traceParams(Project.MSG_VERBOSE);
        validate();
        try {
            // Instantiate the emitter
            Emitter emitter = createEmitter();

            //extract the scope
            Scope scope = Scope.getScope(deployScope, null);
            if (scope != null) {
                emitter.setScope(scope);
            } else if (deployScope.length() == 0
                    || "none".equalsIgnoreCase(deployScope)) {
                /* leave default (null, or not-explicit) */;
            } else {
                log("Unrecognized scope:  " + deployScope + ".  Ignoring it.", Project.MSG_VERBOSE);
            }

            //do the mappings, with namespaces mapped as the key
            mappings.execute(this, namespaceMap, false);
            if (!namespaceMap.isEmpty()) {
                emitter.setNamespaceMap(namespaceMap);
            }
            emitter.setTestCaseWanted(testCase);
            emitter.setHelperWanted(helperGen);
            if (factory != null) {
                emitter.setFactory(factory);
            }
            emitter.setNamespaceIncludes(nsIncludes);
            emitter.setNamespaceExcludes(nsExcludes);
            emitter.setProperties(properties);
            emitter.setImports(!noImports);
            emitter.setAllWanted(all);
            emitter.setOutputDir(output);
            emitter.setServerSide(server);
            emitter.setSkeletonWanted(skeletonDeploy);
            emitter.setVerbose(verbose);
            emitter.setDebug(debug);
            emitter.setQuiet(quiet);
            emitter.setTypeMappingVersion(typeMappingVersion);
            emitter.setNowrap(noWrapped);
            if (namespaceMappingFile != null) {
                emitter.setNStoPkg(namespaceMappingFile.toString());
            }
      emitter.setTimeout(timeout);
      emitter.setImplementationClassName(implementationClassName);

            Authenticator.setDefault(new DefaultAuthenticator(username, password));
            if (classpath != null) {
                AntClassLoader cl = new AntClassLoader(
                        getClass().getClassLoader(),
                        project,
                        classpath,
                        false);
                log("Using CLASSPATH " + cl.getClasspath(),
                        Project.MSG_VERBOSE);
                ClassUtils.setDefaultClassLoader(cl);
            }

            log("WSDL2Java " + url, Project.MSG_INFO);
            try {
                emitter.run(url);
            } catch (Throwable e) {
                if (url.startsWith("http://")) {
                    // What we have is either a network error or invalid XML -
                    // the latter most likely an HTML error page.  This makes
                    // it impossible to continue with the test, so we stop here
View Full Code Here

    /** This factory method makes it easier to extend this Ant task
     * with a custom Emitter, if necessary.
     */
    protected Emitter createEmitter() {
        return new Emitter();
    }
View Full Code Here

     * Instantiate an extension of the Parser
     *
     * @return
     */
    protected Parser createParser() {
        return new Emitter();
    }    // createParser
View Full Code Here

    /**
     * Instantiate an extension of the Parser
     */
    protected Parser createParser() {
        return new Emitter();
    } // createParser
View Full Code Here

    
        traceParams(Project.MSG_VERBOSE);
        validate();
        try {
            // Instantiate the emitter
            Emitter emitter = new Emitter();

            //extract the scope
            Scope scope = Scope.getScope(deployScope, null);
            if (scope != null) {
                emitter.setScope(scope);
            } else if (deployScope.length()==0
                    ||  "none".equalsIgnoreCase(deployScope)) {
                /* leave default (null, or not-explicit) */;
            } else {
                log("Unrecognized scope:  " + deployScope + ".  Ignoring it.", Project.MSG_VERBOSE);
            }

            //do the mappings, with namespaces mapped as the key
            mappings.execute(this, namespaceMap, false);
            if (!namespaceMap.isEmpty()) {
                emitter.setNamespaceMap(namespaceMap);
            }
            emitter.setTestCaseWanted(testCase);
            emitter.setHelperWanted(helperGen);
            if (factory != null) {
                emitter.setFactory(factory);
            }
            emitter.setImports(!noImports);
            emitter.setAllWanted(all);
            emitter.setOutputDir(output);
            emitter.setServerSide(server);
            emitter.setSkeletonWanted(skeletonDeploy);
            emitter.setVerbose(verbose);
            emitter.setDebug(debug);
            emitter.setTypeMappingVersion(typeMappingVersion);
            emitter.setNowrap(noWrapped);
          if (namespaceMappingFile != null) {
              emitter.setNStoPkg(namespaceMappingFile.toString());
          }   
            emitter.setTimeout(timeout);

            Authenticator.setDefault(new DefaultAuthenticator(username,password));
            if (classpath != null) {
                AntClassLoader cl = new AntClassLoader(
                        getClass().getClassLoader(),
                        project,
                        classpath,
                        false);
                log("Using CLASSPATH " + cl.getClasspath(),
                        Project.MSG_VERBOSE);
                ClassUtils.setDefaultClassLoader(cl);
            }
           
            log("WSDL2Java " + url, Project.MSG_INFO);
            try {
                emitter.run(url);
            } catch (Throwable e) {
                if (url.startsWith("http://")) {
                    // What we have is either a network error or invalid XML -
                    // the latter most likely an HTML error page.  This makes
                    // it impossible to continue with the test, so we stop here
View Full Code Here

     * Instantiate an extension of the Parser
     *
     * @return
     */
    protected Parser createParser() {
        return new Emitter();
    }    // createParser
View Full Code Here

TOP

Related Classes of org.apache.axis.wsdl.toJava.Emitter

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.