com.sun.tools.ws.wscompile
Class WsimportOptions

java.lang.Object
  extended by com.sun.tools.ws.wscompile.Options
      extended by com.sun.tools.ws.wscompile.WsimportOptions

public class WsimportOptions
extends Options


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.tools.ws.wscompile.Options
Options.Target, Options.WeAreDone
 
Field Summary
 boolean additionalHeaders
          -XadditionalHeaders
 File authFile
          Authentication file
 String defaultPackage
          The -p option that should control the default Java package that will contain the generated code.
 EntityResolver entityResolver
          Actually stores com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver, but the field type is made to EntityResolver so that XJC can be used even if resolver.jar is not available in the classpath.
 boolean noAddressingBbinding
          -Xno-addressing-databinding option to disable addressing namespace data binding.
 String wsdlLocation
          -wsdlLocation
 
Fields inherited from class com.sun.tools.ws.wscompile.Options
classpath, compatibilityMode, debug, debugMode, destDir, EXTENSION, keep, nocompile, quiet, sourceDir, STRICT, target, targetDir, verbose
 
Constructor Summary
WsimportOptions()
           
 
Method Summary
 void addBindings(String name)
           
protected  void addFile(String arg)
          Adds a file from the argume
 void addGrammarRecursive(File dir)
          Recursively scan directories and add all XSD files in it.
 void addHandlerChainConfiguration(Element config)
           
 void addSchema(File source)
           
 void addSchema(InputSource is)
           
 void addSchemmaBindFile(InputSource is)
           
 void addWSDL(File source)
           
 void addWSDL(InputSource is)
           
 void addWSDLBindFile(InputSource is)
          Adds a new input schema.
 com.sun.codemodel.JCodeModel getCodeModel()
           
 Element getHandlerChainConfiguration()
          There is supposed to be one handler chain per generated SEI.
 InputSource[] getSchemaBindings()
           
 SchemaCompiler getSchemaCompiler()
           
 InputSource[] getSchemas()
           
 InputSource[] getWSDLBindings()
           
 InputSource[] getWSDLs()
           
 int parseArguments(String[] args, int i)
          Parses an option args[i] and return the number of tokens consumed.
 void parseBindings(ErrorReceiver receiver)
          Exposing it as a public method to allow external tools such as NB to read from wsdl model and work on it.
 void setCodeModel(com.sun.codemodel.JCodeModel codeModel)
           
 void validate()
           
 
Methods inherited from class com.sun.tools.ws.wscompile.Options
addGeneratedFile, deleteGeneratedFiles, fileToURL, getClassLoader, getGeneratedFiles, isExtensionMode, parseArguments, pathToURLs, removeGeneratedFiles, requireArgument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wsdlLocation

public String wsdlLocation
-wsdlLocation


entityResolver

public EntityResolver entityResolver
Actually stores com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver, but the field type is made to EntityResolver so that XJC can be used even if resolver.jar is not available in the classpath.


defaultPackage

public String defaultPackage
The -p option that should control the default Java package that will contain the generated code. Null if unspecified.


additionalHeaders

public boolean additionalHeaders
-XadditionalHeaders


authFile

public File authFile
Authentication file


noAddressingBbinding

public boolean noAddressingBbinding
-Xno-addressing-databinding option to disable addressing namespace data binding. This is experimental switch and will be working as a temporary workaround till jaxb can provide a better way to selelctively disable compiling of an schema component.

Constructor Detail

WsimportOptions

public WsimportOptions()
Method Detail

getCodeModel

public com.sun.codemodel.JCodeModel getCodeModel()

getSchemaCompiler

public SchemaCompiler getSchemaCompiler()

setCodeModel

public void setCodeModel(com.sun.codemodel.JCodeModel codeModel)

parseArguments

public int parseArguments(String[] args,
                          int i)
                   throws BadCommandLineException
Description copied from class: Options
Parses an option args[i] and return the number of tokens consumed.

Overrides:
parseArguments in class Options
Returns:
0 if the argument is not understood. Returning 0 will let the caller report an error.
Throws:
BadCommandLineException - If the callee wants to provide a custom message for an error.

validate

public void validate()
              throws BadCommandLineException
Throws:
BadCommandLineException

addFile

protected void addFile(String arg)
                throws BadCommandLineException
Description copied from class: Options
Adds a file from the argume

Overrides:
addFile in class Options
Parameters:
arg - a file, could be a wsdl or xsd or a Class
Throws:
BadCommandLineException

getHandlerChainConfiguration

public Element getHandlerChainConfiguration()
There is supposed to be one handler chain per generated SEI. TODO: There is possible bug, how to associate a @HandlerChain with each port on the generated SEI. For now lets preserve the JAXWS 2.0 FCS behaviour and generate only one @HandlerChain on the SEI


addHandlerChainConfiguration

public void addHandlerChainConfiguration(Element config)

getWSDLs

public InputSource[] getWSDLs()

getSchemas

public InputSource[] getSchemas()

getWSDLBindings

public InputSource[] getWSDLBindings()

getSchemaBindings

public InputSource[] getSchemaBindings()

addWSDL

public void addWSDL(File source)

addWSDL

public void addWSDL(InputSource is)

addSchema

public void addSchema(File source)

addSchema

public void addSchema(InputSource is)

addGrammarRecursive

public void addGrammarRecursive(File dir)
Recursively scan directories and add all XSD files in it.


addWSDLBindFile

public void addWSDLBindFile(InputSource is)
Adds a new input schema.


addSchemmaBindFile

public void addSchemmaBindFile(InputSource is)

addBindings

public void addBindings(String name)
                 throws BadCommandLineException
Throws:
BadCommandLineException

parseBindings

public final void parseBindings(ErrorReceiver receiver)
Exposing it as a public method to allow external tools such as NB to read from wsdl model and work on it. TODO: WSDL model needs to be exposed - basically at tool time we need to use the runtimw wsdl model Binding files could be jaxws or jaxb. This method identifies jaxws and jaxb binding files and keeps them separately. jaxb binding files are given separately to JAXB in JAXBModelBuilder

Parameters:
receiver - ErrorReceiver