⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wsdl2javaanttask.java

📁 Java有关XML编程需要用到axis 的源代码 把里面bin下的包导入相应的Java工程 进行使用
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
     *  flag for debug output; default=false     *     *@param  debug  The new debug value     */    public void setDebug(boolean debug) {        this.debug = debug;    }    /**     *  flag for quiet output; default=false     *     *@param  quiet  The new quiet value     */    public void setQuiet(boolean quiet) {        this.quiet = quiet;    }    /**     *  emit server-side bindings for web service; default=false     */    public void setServerSide(boolean parameter) {        this.server = parameter;    }    /**     * deploy skeleton (true) or implementation (false) in deploy.wsdd.     * Default is false.  Assumes server-side="true".     */    public void setSkeletonDeploy(boolean parameter) {        this.skeletonDeploy = parameter;    }    /**     * flag for automatic Junit testcase generation     * default is false     */    public void setTestCase(boolean parameter) {        this.testCase = parameter;    }    /**     * Turn on/off Helper class generation;     * default is false     */    public void setHelperGen(boolean parameter) {        this.helperGen = parameter;    }    /**     * name of the Java2WSDLFactory class for     * extending WSDL generation functions     */    public void setFactory(String parameter) {        this.factory = parameter;    }    /**     * only generate code for the immediate WSDL document,     * and not imports; default=false;     */    public void setNoImports(boolean parameter) {        this.noImports = parameter;    }    /**     * output directory for emitted files     */    public void setOutput(File parameter) throws BuildException {        try {            this.output = parameter.getCanonicalPath();        } catch (IOException ioe) {            throw new BuildException(ioe);        }    }    /**     * append any protocol handler pkgs specified with the task     */    public void setProtocolHandlerPkgs(String handlerPkgs) {        String currentPkgs = System.getProperty("java.protocol.handler.pkgs");        String newPkgs = null;        if (currentPkgs == null)            newPkgs = handlerPkgs;        else        // append to the existing list            newPkgs = currentPkgs + "|" + handlerPkgs;        System.setProperty("java.protocol.handler.pkgs", newPkgs);    }    /**     * add scope to deploy.xml: "Application", "Request", "Session"     * optional;     */    public void setDeployScope(String scope) {        this.deployScope = scope;    }/*    //unused till we can somehow get ant to be case insensitive when handling enums    public void setDeployScope(DeployScopeEnum scope) {        this.deployScope = scope.getValue();    }*/    /**     * URL to fetch and generate WSDL for.     * Can be remote or a local file.     */    public void setURL(String parameter) {        this.url = parameter;    }    /**     * flag to generate code for all elements, even unreferenced ones     * default=false;     */    public void setAll(boolean parameter) {        this.all = parameter;    }    /**     *  the default type mapping registry to use. Either 1.1 or 1.2.     * Default is 1.1     * @param parameter new version     */    public void setTypeMappingVersion(TypeMappingVersionEnum parameter) {        this.typeMappingVersion = parameter.getValue();    }    /**     * timeout in milliseconds for URL retrieval; default is 45 seconds.     * Set this to -1 to disable timeouts altogether: other negative values     * are not allowed)     */    public void setTimeout(long parameter) {        this.timeout = parameter;    }    /**     * add a mapping of namespaces to packages     */    public void addMapping(NamespaceMapping mapping) {        mappings.addMapping(mapping);    }    /**     * add a mapping of namespaces to packages     */    public void addMappingSet(MappingSet mappingset) {        mappings.addMappingSet(mappingset);    }    /**     * set the mapping file. This is a properties file of     * package=namespace order. Optional, default is to look for     * a file called NStoPkg.properties in the project directory.     * @param namespaceMappingFile     */    public void setNamespaceMappingFile(File namespaceMappingFile) {        this.namespaceMappingFile = namespaceMappingFile;    }    /**     * valid deploy scopes for the task     */    /*    public static class DeployScopeEnum extends EnumeratedAttribute {        public String[] getValues() {            return new String[]{"Application", "Request", "Session","none"};        }    }    */    /**     * should the task fail the build if there is a network error?     * optional: defaults to false     * @param failOnNetworkErrors     */    public void setFailOnNetworkErrors(boolean failOnNetworkErrors) {        this.failOnNetworkErrors = failOnNetworkErrors;    }    /**     * should we print a stack trace on failure?     * Optional, default=true.     * @param printStackTraceOnFailure     */    public void setPrintStackTraceOnFailure(boolean printStackTraceOnFailure) {        this.printStackTraceOnFailure = printStackTraceOnFailure;    }    /**     * set any username required for BASIC authenticated access to the WSDL;     * optional.     * @param username     */    public void setUsername(String username) {        this.username = username;    }    /**     * set any password required for BASIC authenticated access to the WSDL;     * optional; only used if username is set     * @param password     * @see #username     */    public void setPassword(String password) {        this.password = password;    }    /**     * Set the noWrapped flag.     * @param noWrapped     */    public void setNoWrapped(boolean noWrapped) {        this.noWrapped = noWrapped;    }    /**     * Set the allowInvalidURL flag.     */    public void setAllowInvalidUrl(boolean b) {        this.allowInvalidURL = b;    }	/**	 * Set the name of the class implementing the web service.	 * This is especially useful when exporting a java class	 * as a web service using Java2WSDL followed by WSDL2Java.	 * 	 * @param implementationClassName	 */	public void setImplementationClassName(String implementationClassName) {		this.implementationClassName = implementationClassName;	}    /**     * Set the wrap arrays flag - if true this will make new classes     * like "ArrayOfString" for literal "wrapped" arrays.  Otherwise it     * will use "String []" and generate appropriate metadata.     *     * @param wrapArrays     */    public void setWrapArrays(boolean wrapArrays) {        this.wrapArrays = wrapArrays;    }    /**     * set the classpath     * @return     */    public Path createClasspath() {        if (classpath == null) {            classpath = new Path(getProject());        }        return classpath.createPath();    }    /** Adds an additional namespace to the list to be included     * in source code generation.     */    public NamespaceSelector createNsInclude() {        NamespaceSelector selector = new NamespaceSelector();        nsIncludes.add(selector);        return selector;    }    /** Adds an additional namespace to the list to be excluded     * from source code generation.     */    public NamespaceSelector createNsExclude() {        NamespaceSelector selector = new NamespaceSelector();        nsExcludes.add(selector);        return selector;    }    /** Adds a property name/value pair for specialized     * JavaGeneratorFactories.     */    public FactoryProperty createProperty() {        FactoryProperty property = new FactoryProperty();        properties.add(property);        return property;    }    /** This factory method makes it easier to extend this Ant task     * with a custom Emitter, if necessary.     */    protected Emitter createEmitter() {        return new Emitter();    }    protected NamespaceSelector createSelector() {        return new NamespaceSelector();    }    private void traceSystemSetting(String setting, int logLevel) {        String value = System.getProperty(setting);        log("\t" + setting + "=" + value, logLevel);    }    private void traceNetworkSettings(int logLevel) {        traceSystemSetting("http.proxyHost", logLevel);        traceSystemSetting("http.proxyPort", logLevel);        traceSystemSetting("http.proxyUser", logLevel);        traceSystemSetting("http.proxyPassword", logLevel);        traceSystemSetting("socks.proxyHost", logLevel);        traceSystemSetting("socks.proxyPort", logLevel);    }    /**     * Adds a system property that tests can access.     * @param sysp environment variable to add     */    public void addSysproperty(Environment.Variable sysp) {        commandline.addSysproperty(sysp);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -