org.apache.tools.ant.taskdefs.optional.dotnet
Class WsdlToDotnet
public class WsdlToDotnet
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
Version:
- Ant 1.5
void | execute() - do the work by building the command line and then calling it
|
void | setDestFile(File destFile) - Name of the file to generate.
|
void | setExtraOptions(String extraOptions) - Any extra WSDL.EXE options which aren't explicitly
supported by the ant wrapper task; optional
|
void | setFailOnError(boolean failOnError) - Whether or not a failure should halt the build.
|
void | setLanguage(String language) - set the language; one of "CS", "JS", or "VB"
optional, default is CS for C# source
|
void | setNamespace(String namespace) - namespace to place the source in.
|
void | setServer(boolean server) - flag to enable server side code generation;
optional, default=false
|
void | setSrcFile(File srcFile) - The local WSDL file to parse; either url or srcFile is required.
|
void | setUrl(String url) - Sets the URL to fetch.
|
protected void | validate() - validation code
|
execute , getDescription , getLocation , getOwningTarget , getRuntimeConfigurableWrapper , getTaskName , getTaskType , getWrapper , handleErrorFlush , handleErrorOutput , handleFlush , handleInput , handleOutput , init , isInvalid , log , log , maybeConfigure , perform , reconfigure , setDescription , setLocation , setOwningTarget , setRuntimeConfigurableWrapper , setTaskName , setTaskType |
extraOptions
protected String extraOptions
any extra command options?
execute
public void execute()
throws BuildException
do the work by building the command line and then calling it
- execute in interface Task
BuildException
- if validation or execution failed
setDestFile
public void setDestFile(File destFile)
Name of the file to generate. Required
destFile
- filename
setExtraOptions
public void setExtraOptions(String extraOptions)
Any extra WSDL.EXE options which aren't explicitly
supported by the ant wrapper task; optional
extraOptions
- The new ExtraOptions value
setFailOnError
public void setFailOnError(boolean failOnError)
Whether or not a failure should halt the build.
Optional - default is true
.
failOnError
- new failure option
setLanguage
public void setLanguage(String language)
set the language; one of "CS", "JS", or "VB"
optional, default is CS for C# source
language
- language to generate
setNamespace
public void setNamespace(String namespace)
namespace to place the source in.
optional; default ""
namespace
- new namespace
setServer
public void setServer(boolean server)
flag to enable server side code generation;
optional, default=false
server
- server-side flag
setSrcFile
public void setSrcFile(File srcFile)
The local WSDL file to parse; either url or srcFile is required.
srcFile
- name of WSDL file
setUrl
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.
url
- url to save
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.