Save This Page
Home » apache-ant-1.7.1-src » org.apache.tools » ant » taskdefs » optional » dotnet » [javadoc | source]
org.apache.tools.ant.taskdefs.optional.dotnet
public class: WsdlToDotnet [javadoc | source]
java.lang.Object
   org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
         org.apache.tools.ant.taskdefs.optional.dotnet.WsdlToDotnet

All Implemented Interfaces:
    Cloneable

Converts a WSDL file or URL resource into a .NET language. Why add a wrapper to the MS WSDL tool? So that you can verify that your web services, be they written with Axis or anyone else's SOAP toolkit, work with .NET clients. This task is dependency aware when using a file as a source and destination; so if you <get> the file (with usetimestamp="true") then you only rebuild stuff when the WSDL file is changed. Of course, if the server generates a new timestamp every time you ask for the WSDL, this is not enough...use the <filesmatch> <condition> to to byte for byte comparison against a cached WSDL file then make the target conditional on that test failing. See "Creating an XML Web Service Proxy", "wsdl.exe" docs in the framework SDK documentation
Nested Class Summary:
public static class  WsdlToDotnet.Schema  nested schema class Only supported on NET until mono add multi-URL handling on the command line 
public static class  WsdlToDotnet.Compiler  The enumerated values for our compiler 
Field Summary
protected  String extraOptions    any extra command options? 
public static final  String ERROR_DEST_FILE_IS_DIR    error message: dest file is a directory 
public static final  String ERROR_NO_DEST_FILE    error message: no dest file 
Fields inherited from org.apache.tools.ant.Task:
target,  taskName,  taskType,  wrapper
Fields inherited from org.apache.tools.ant.ProjectComponent:
project,  location,  description
Method from org.apache.tools.ant.taskdefs.optional.dotnet.WsdlToDotnet Summary:
addSchema,   execute,   setCompiler,   setDestFile,   setExtraOptions,   setFailOnError,   setIdeErrors,   setLanguage,   setMakeURL,   setNamespace,   setProtocol,   setServer,   setSrcFile,   setUrl,   validate
Methods from org.apache.tools.ant.Task:
bindToOwner,   execute,   getOwningTarget,   getRuntimeConfigurableWrapper,   getTaskName,   getTaskType,   getWrapper,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   init,   isInvalid,   log,   log,   log,   log,   markInvalid,   maybeConfigure,   perform,   reconfigure,   setOwningTarget,   setRuntimeConfigurableWrapper,   setTaskName,   setTaskType
Methods from org.apache.tools.ant.ProjectComponent:
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.taskdefs.optional.dotnet.WsdlToDotnet Detail:
 public  void addSchema(WsdlToDotnet.Schema source) 
    add a new source schema to the compilation
 public  void execute() throws BuildException 
    do the work by building the command line and then calling it
 public  void setCompiler(WsdlToDotnet.Compiler compiler) 
    identify the compiler
 public  void setDestFile(File destFile) 
    Name of the file to generate. Required
 public  void setExtraOptions(String extraOptions) 
    Any extra WSDL.EXE options which aren't explicitly supported by the ant wrapper task; optional
 public  void setFailOnError(boolean failOnError) 
    Whether or not a failure should halt the build. Optional - default is true.
 public  void setIdeErrors(boolean ideErrors) 
    Defines wether errors are machine parseable. Optional, default=true
 public  void setLanguage(String language) 
    set the language; one of "CS", "JS", or "VB" optional, default is CS for C# source
 public  void setMakeURL(boolean b) 
    flag to trigger turning a filename into a file:url ignored for the mono compiler.
 public  void setNamespace(String namespace) 
    namespace to place the source in. optional; default ""
 public  void setProtocol(String protocol) 
    what protocol to use. SOAP, SOAP1.2, HttpPost and HttpGet are the base options. Different version and implementations may. offer different options.
 public  void setServer(boolean server) 
    flag to enable server side code generation; optional, default=false
 public  void setSrcFile(File srcFile) 
    The local WSDL file to parse; either url or srcFile is required.
 public  void setUrl(String url) 
    Sets the URL to fetch. Fetching is by wsdl.exe; Ant proxy settings are ignored; either url or srcFile is required.
 protected  void validate() throws BuildException 
    validation code