com.sun.tools.ws.ant
Class WsImport2

java.lang.Object
  extended by MatchingTask
      extended by com.sun.tools.ws.ant.WsImport2

public class WsImport2
extends MatchingTask

wscompile task for use with the JAXWS project.


Field Summary
protected  boolean xNoAddressingDatabinding
          -Xno-addressing-databinding
 
Constructor Summary
WsImport2()
           
 
Method Summary
 void addConfiguredBinding(FileSet fs)
           
 void addConfiguredDepends(FileSet fs)
          Nested <depends> element.
 void addConfiguredProduces(FileSet fs)
          Nested <produces> element.
 void addConfiguredXMLCatalog(XMLCatalog entityResolver)
           
 Commandline.Argument createArg()
          Provides a way to directly pass wsimport commandline options through nested arg instead of a separate attribute for each option.
 Commandline.Argument createJavacarg()
          Adds Javac argument.
 Commandline.Argument createJvmarg()
          Adds a JVM argument.
 Commandline.Argument createXjcarg()
          Adds XJC argument.
 void execute()
          Called by the project to let the task do it's work
protected  void execute(String tool, String toolClass)
          Let the task do it's work.
 File getCatalog()
           
 String getClientjar()
          Gets the clientjar to output generated artifacts into a jar.
 boolean getDebug()
          Gets the debug flag.
 File getDestdir()
          Gets the base directory to output generated class.
 String getEncoding()
          Gets the encoding for generated source java files.
 boolean getExtension()
          Gets the "extension" flag.
 boolean getFork()
          Gets the "fork" flag.
 File getImplDestDir()
           
 String getImplPortName()
           
 String getImplServiceName()
           
 boolean getIncludeantruntime()
          Gets whether or not the ant classpath is to be included in the task's classpath.
 boolean getIncludejavaruntime()
          Gets whether or not the java runtime should be included in this task's classpath.
 Commandline getJavacargs()
           
 boolean getKeep()
          Gets the "keep" flag.
 String getPackage()
           
 File getSourcedestdir()
          Gets the directory to place generated source java files.
 boolean getVerbose()
          Gets the "verbose" flag.
 String getWsdl()
           
 String getWsdllocation()
           
 File getXauthfile()
           
 boolean getXdisableAuthenticator()
           
 boolean getxNoAddressingDatabinding()
           
 boolean isFailonerror()
           
 boolean isGenerateJWS()
           
 boolean isQuiet()
           
 boolean isXadditionalHeaders()
           
 boolean isXdebug()
           
 boolean isXendorsed()
           
 boolean isXnocompile()
           
 boolean isXUseBaseResourceAndURLToLoadWSDL()
           
protected  boolean runInVm(String[] arguments, OutputStream out)
          Used to call the tool directly using API.
 void setBinding(String binding)
           
 void setCatalog(File catalog)
          Adds a new catalog file.
 void setClientjar(String clientjar)
          Sets the base directory to output generated class.
 void setDebug(boolean debug)
          Sets the debug flag.
 void setDestdir(File base)
          Sets the base directory to output generated class.
 void setdisableAuthenticator(boolean disableAuthenticator)
           
 void setEncoding(String encoding)
          Sets the encoding for generated source java files.
 void setExtension(boolean extension)
          Sets the "extension" flag.
 void setFailonerror(boolean value)
          Mostly for our SQE teams and not to be advertised.
 void setFork(boolean fork)
          Sets the "fork" flag.
 void setGenerateJWS(boolean isGenerateJWS)
           
 void setImplDestDir(File base)
           
 void setImplPortName(String base)
           
 void setImplServiceName(String base)
           
 void setIncludeantruntime(boolean include)
          Include ant's own classpath in this task's classpath?
 void setIncludejavaruntime(boolean include)
          Sets whether or not to include the java runtime libraries to this task's classpath.
 void setKeep(boolean keep)
          Sets the "keep" flag.
 void setPackage(String pkg)
           
 void setQuiet(boolean quiet)
           
 void setSourcedestdir(File sourceBase)
          Sets the directory to place generated source java files.
 void setTarget(String version)
           
protected  CommandlineJava setupCommand()
          Set up command line to invoke.
 void setVerbose(boolean verbose)
          Sets the "verbose" flag.
 void setWsdl(String wsdl)
           
 void setWsdllocation(String wsdlLocation)
           
 void setXadditionalHeaders(boolean xadditionalHeaders)
           
 void setXauthfile(File xauthfile)
           
 void setXdebug(boolean xdebug)
           
 void setXendorsed(boolean xendorsed)
           
 void setxNoAddressingDatabinding(boolean xNoAddressingDatabinding)
           
 void setXnocompile(boolean xnocompile)
           
 void setXUseBaseResourceAndURLToLoadWSDL(boolean xuseBaseResourceAndURLToLoadWSDL)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xNoAddressingDatabinding

protected boolean xNoAddressingDatabinding
-Xno-addressing-databinding

Constructor Detail

WsImport2

public WsImport2()
Method Detail

isXdebug

public boolean isXdebug()

setXdebug

public void setXdebug(boolean xdebug)

setXUseBaseResourceAndURLToLoadWSDL

public void setXUseBaseResourceAndURLToLoadWSDL(boolean xuseBaseResourceAndURLToLoadWSDL)

isXUseBaseResourceAndURLToLoadWSDL

public boolean isXUseBaseResourceAndURLToLoadWSDL()

isGenerateJWS

public boolean isGenerateJWS()

setGenerateJWS

public void setGenerateJWS(boolean isGenerateJWS)

getImplDestDir

public File getImplDestDir()

setImplDestDir

public void setImplDestDir(File base)

getImplServiceName

public String getImplServiceName()

setImplServiceName

public void setImplServiceName(String base)

getImplPortName

public String getImplPortName()

setImplPortName

public void setImplPortName(String base)

createArg

public Commandline.Argument createArg()
Provides a way to directly pass wsimport commandline options through nested arg instead of a separate attribute for each option.

Returns:
argument created

isXadditionalHeaders

public boolean isXadditionalHeaders()

setXadditionalHeaders

public void setXadditionalHeaders(boolean xadditionalHeaders)

getClientjar

public String getClientjar()
Gets the clientjar to output generated artifacts into a jar.

Returns:
jar file where to put generated artifacts.

setClientjar

public void setClientjar(String clientjar)
Sets the base directory to output generated class.

Parameters:
clientjar - jar file where to put generated artifacts.

getWsdllocation

public String getWsdllocation()

setWsdllocation

public void setWsdllocation(String wsdlLocation)

addConfiguredXMLCatalog

public void addConfiguredXMLCatalog(XMLCatalog entityResolver)

setPackage

public void setPackage(String pkg)

getPackage

public String getPackage()

createXjcarg

public Commandline.Argument createXjcarg()
Adds XJC argument.

Returns:
XJC argument created.
Since:
2.1

getxNoAddressingDatabinding

public boolean getxNoAddressingDatabinding()

setxNoAddressingDatabinding

public void setxNoAddressingDatabinding(boolean xNoAddressingDatabinding)

isQuiet

public boolean isQuiet()

setQuiet

public void setQuiet(boolean quiet)

setTarget

public void setTarget(String version)

addConfiguredDepends

public void addConfiguredDepends(FileSet fs)
Nested <depends> element.

Parameters:
fs - FileSet to check for modifications.

addConfiguredProduces

public void addConfiguredProduces(FileSet fs)
Nested <produces> element.

Parameters:
fs - FileSet to check for modifications.

setBinding

public void setBinding(String binding)
Parameters:
binding - The external binding to set.

setCatalog

public void setCatalog(File catalog)
Adds a new catalog file.

Parameters:
catalog - catalog file to use.

getCatalog

public File getCatalog()

getWsdl

public String getWsdl()
Returns:
Returns the wsdl.

setWsdl

public void setWsdl(String wsdl)
Parameters:
wsdl - The wsdl to set.

getXauthfile

public File getXauthfile()

setXauthfile

public void setXauthfile(File xauthfile)

getXdisableAuthenticator

public boolean getXdisableAuthenticator()

setdisableAuthenticator

public void setdisableAuthenticator(boolean disableAuthenticator)

addConfiguredBinding

public void addConfiguredBinding(FileSet fs)

setupCommand

protected CommandlineJava setupCommand()
Set up command line to invoke.

Returns:
ready to run command line

execute

public void execute()
             throws BuildException
Called by the project to let the task do it's work

Throws:
BuildException

runInVm

protected boolean runInVm(String[] arguments,
                          OutputStream out)
Used to call the tool directly using API.

Parameters:
arguments - arguments to be passed to the tool
out - output for the tool
Returns:
true if tool succeed

getDestdir

public File getDestdir()
Gets the base directory to output generated class.

Returns:
destination directory for generated class(es).

setDestdir

public void setDestdir(File base)
Sets the base directory to output generated class.

Parameters:
base - destination directory for generated class(es).

getExtension

public boolean getExtension()
Gets the "extension" flag.

Returns:
true if extension mode is on, false otherwise.

setExtension

public void setExtension(boolean extension)
Sets the "extension" flag.

Parameters:
extension - true to set extension mode on, false otherwise.

getKeep

public boolean getKeep()
Gets the "keep" flag.

Returns:
Whether to keep generated sources.

setKeep

public void setKeep(boolean keep)
Sets the "keep" flag.

Parameters:
keep - keep generated sources.

getFork

public boolean getFork()
Gets the "fork" flag.

Returns:
true if execution should be done in forked JVM, false otherwise.

setFork

public void setFork(boolean fork)
Sets the "fork" flag.

Parameters:
fork - true to run execution in a forked JVM.

getSourcedestdir

public File getSourcedestdir()
Gets the directory to place generated source java files.

Returns:
destination directory for generated source(s).

setSourcedestdir

public void setSourcedestdir(File sourceBase)
Sets the directory to place generated source java files.

Parameters:
sourceBase - destination directory for generated source(s).

setEncoding

public void setEncoding(String encoding)
Sets the encoding for generated source java files.

Parameters:
encoding - encoding to use in generated sources.

getEncoding

public String getEncoding()
Gets the encoding for generated source java files.

Returns:
encoding to use in generated sources.

getVerbose

public boolean getVerbose()
Gets the "verbose" flag.

Returns:
true if messages about what the compiler is doing should be printed out.

setVerbose

public void setVerbose(boolean verbose)
Sets the "verbose" flag.

Parameters:
verbose - whether to output messages about what the compiler is doing.

getDebug

public boolean getDebug()
Gets the debug flag.

Returns:
true if all debugging info should be generated.

setDebug

public void setDebug(boolean debug)
Sets the debug flag.

Parameters:
debug - generate all debugging info.

createJavacarg

public Commandline.Argument createJavacarg()
Adds Javac argument.

Returns:
Javac argument created.
Since:
2.2.9

getJavacargs

public Commandline getJavacargs()

setXendorsed

public void setXendorsed(boolean xendorsed)

isXendorsed

public boolean isXendorsed()

isXnocompile

public boolean isXnocompile()

setXnocompile

public void setXnocompile(boolean xnocompile)

setFailonerror

public void setFailonerror(boolean value)
Mostly for our SQE teams and not to be advertised.

Parameters:
value - a boolean value

isFailonerror

public boolean isFailonerror()
Returns:
true if the task should fail on error.

setIncludeantruntime

public void setIncludeantruntime(boolean include)
Include ant's own classpath in this task's classpath?

Parameters:
include - a boolean value.

getIncludeantruntime

public boolean getIncludeantruntime()
Gets whether or not the ant classpath is to be included in the task's classpath.

Returns:
true if Ant classpath should be included in the task's classpath.

setIncludejavaruntime

public void setIncludejavaruntime(boolean include)
Sets whether or not to include the java runtime libraries to this task's classpath.

Parameters:
include - a boolean value.

getIncludejavaruntime

public boolean getIncludejavaruntime()
Gets whether or not the java runtime should be included in this task's classpath.

Returns:
true if java runtime classpath should be included in the task's classpath.

createJvmarg

public Commandline.Argument createJvmarg()
Adds a JVM argument.

Returns:
JVM argument created

execute

protected final void execute(String tool,
                             String toolClass)
                      throws BuildException
Let the task do it's work.

Parameters:
tool - string to use in logged messages
toolClass - class name to invoke
Throws:
BuildException - if invocation fails


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.