Examples of Emitter


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

    public void execute() throws BuildException {
        traceParams(Project.MSG_VERBOSE);
        validate();
        try {
            // Instantiate the emitter
            Emitter emitter = new Emitter();

            Scope scope = Scope.getScope(deployScope, null);
            if (scope != null) {
                emitter.setScope(scope);
            } else if ("none".equalsIgnoreCase(deployScope)) {
                /* leave default (null, or not-explicit) */;
            } else {
                log("Unrecognized scope:  " + deployScope + ".  Ignoring it.", Project.MSG_VERBOSE);
            }
           
            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.setTypeMappingVersion(tm);
            //TODO: extract this and make it an attribute
            emitter.setNStoPkg(project.resolveFile("NStoPkg.properties"));
            emitter.setTimeout(timeout);

            Authenticator.setDefault(new DefaultAuthenticator(null,null));

            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

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

    /**
     * Call WSDL2Java on this WSDL file, failing if WSDL2Java succeeds.
     */
    public void testWSDLFailures() {
        boolean failed  = false;
        Emitter emitter = new Emitter();

        emitter.setTestCaseWanted(true);
        emitter.setHelperWanted(true);   
        emitter.setImports(true);
        emitter.setAllWanted(true);
        emitter.setServerSide(true);
        emitter.setSkeletonWanted(true);
        try {
            emitter.run(wsdl);
            failed = true;
        }
        catch (Throwable e) {
        }
        if (failed) {
View Full Code Here

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

    public void execute() throws BuildException {
        traceParams(Project.MSG_VERBOSE);
        validate();
        try {
            // Instantiate the emitter
            Emitter emitter = new Emitter();

            Scope scope = Scope.getScope(deployScope, null);
            if (scope != null) {
                emitter.setScope(scope);
            } else if ("none".equalsIgnoreCase(deployScope)) {
                /* leave default (null, or not-explicit) */;
            } else {
                log("Unrecognized scope:  " + deployScope + ".  Ignoring it.", Project.MSG_VERBOSE);
            }
           
            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.setTypeMappingVersion(tm);
            //TODO: extract this and make it an attribute
            emitter.setNStoPkg(project.resolveFile("NStoPkg.properties"));
            emitter.setTimeout(timeout);

            Authenticator.setDefault(new DefaultAuthenticator(null,null));

            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

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

    public void execute() throws BuildException {
        traceParams(Project.MSG_VERBOSE);
        validate();
        try {
            // Instantiate the emitter
            Emitter emitter = new Emitter();

            Scope scope = Scope.getScope(deployScope, null);
            if (scope != null) {
                emitter.setScope(scope);
            } else if ("none".equalsIgnoreCase(deployScope)) {
                /* leave default (null, or not-explicit) */;
            } else {
                log("Unrecognized scope:  " + deployScope + ".  Ignoring it.", Project.MSG_VERBOSE);
            }
           
            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.setTypeMappingVersion(tm);
            //TODO: extract this and make it an attribute
            emitter.setNStoPkg(project.resolveFile("NStoPkg.properties"));
            emitter.setTimeout(timeout);

            Authenticator.setDefault(new DefaultAuthenticator(null,null));

            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

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

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

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

      }
   }

   private void excludeSpecNamespaces(  )
   {
      Emitter emitter = getEmitter(  );

      for ( int i = 0; i < MuseConstants.WS_SPEC_NSURIS.length; i++ )
      {
         NamespaceSelector excludedNs = new NamespaceSelector(  );
         excludedNs.setNamespace( MuseConstants.WS_SPEC_NSURIS[i] );
         emitter.getNamespaceExcludes(  ).add( excludedNs );
      }
   }
View Full Code Here

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

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

*/
public class AxisTypeGenerator extends JavaGeneratorFactory {

    public AxisTypeGenerator() {
        super();
        Emitter e = new Emitter();
        setEmitter(e);
        emitter.setFactory(this);
    }
View Full Code Here

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

            log("\tall:" + all, Project.MSG_VERBOSE);
            log("\ttypeMappingVersion:" + tm, Project.MSG_VERBOSE);
            log("\ttimeout:" + timeout, Project.MSG_VERBOSE);

            // Instantiate the emitter
            Emitter emitter = new Emitter();

            Scope scope = Scope.getScope(deployScope, null);
            if (scope != null) {
                emitter.setScope(scope);
            } else if ("none".equalsIgnoreCase(deployScope)) {
                /* leave default (null, or not-explicit) */;
            } else {
                log("Unrecognized scope:  " + deployScope + ".  Ignoring it.", Project.MSG_VERBOSE);
            }
           
            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.setTypeMappingVersion(tm);
            emitter.setNStoPkg(project.resolveFile("NStoPkg.properties"));
            emitter.setTimeout(timeout);

            Authenticator.setDefault(new DefaultAuthenticator(null,null));

            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 issue
View Full Code Here

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

    /** 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
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.