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
 java.util.List<Plugin> activePlugins
          Plugins that are enabled in this compilation.
 boolean additionalHeaders
          -XadditionalHeaders
 java.io.File authFile
          Authentication file
 java.lang.String clientjar
          The -clientjar option to package client artifacts as jar
 java.util.List<java.lang.String> cmdlineJars
          This captures jars passed on the commandline and passes them to XJC and puts them in the classpath for compilation
static java.lang.String defaultAuthfile
           
 java.lang.String defaultPackage
          The -p option that should control the default Java package that will contain the generated code.
 boolean disableAuthenticator
          Setting disableAuthenticator to true disables the DefaultAuthenticator.
 boolean disableSSLHostnameVerification
          Setting disableSSLHostVerification to true disables the SSL Hostname verification while fetching the wsdls.
 org.xml.sax.EntityResolver entityResolver
          Actually stores 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.
 java.util.HashMap<java.lang.String,java.lang.String> extensionOptions
          Additional arguments
 java.io.File implDestDir
          The option indicates the dir where the jwsImpl will be generated.
 java.lang.String implPortName
          optional, generated impl file only for the ordered portName Note: It is a QName string, formatted as: "{" + Namespace URI + "}" + local part
 java.lang.String implServiceName
          optional, generated impl file only for the ordered serviceName Note: It is a QName string, formatted as: "{" + Namespace URI + "}" + local part
 boolean isGenerateJWS
          optional, if true JWS file is generated
 boolean noAddressingBbinding
          -Xno-addressing-databinding option to disable addressing namespace data binding.
 java.lang.String proxyAuth
           
 boolean useBaseResourceAndURLToLoadWSDL
          Setting useBaseResourceAndURLToLoadWSDL to true causes generated Service classes to load the WSDL file from a URL generated from the base resource.
 java.lang.String wsdlLocation
          -wsdlLocation
 
Fields inherited from class com.sun.tools.ws.wscompile.Options
classpath, compatibilityMode, debug, debugMode, destDir, disableXmlSecurity, encoding, EXTENSION, filer, javacOptions, keep, nocompile, quiet, sourceDir, STRICT, target, verbose
 
Constructor Summary
WsimportOptions()
           
 
Method Summary
 void addBindings(java.lang.String name)
           
protected  void addFile(java.lang.String arg)
          Adds a file from the argume
 void addGrammarRecursive(java.io.File dir)
          Recursively scan directories and add all XSD files in it.
 void addHandlerChainConfiguration(org.w3c.dom.Element config)
           
 void addSchema(java.io.File source)
           
 void addSchema(org.xml.sax.InputSource is)
           
 void addSchemmaBindFile(org.xml.sax.InputSource is)
           
 void addWSDL(java.io.File source)
           
 void addWSDL(org.xml.sax.InputSource is)
           
 void addWSDLBindFile(org.xml.sax.InputSource is)
          Adds a new input schema.
protected  void disableXmlSecurity()
           
 java.util.List<Plugin> getAllPlugins()
          Gets all the Plugins discovered so far.
 com.sun.codemodel.JCodeModel getCodeModel()
           
 java.lang.String getExtensionOption(java.lang.String argument)
          Get extension argument
 org.w3c.dom.Element getHandlerChainConfiguration()
          There is supposed to be one handler chain per generated SEI.
 org.xml.sax.InputSource[] getSchemaBindings()
           
 com.sun.tools.xjc.api.SchemaCompiler getSchemaCompiler()
           
 org.xml.sax.InputSource[] getSchemas()
           
 org.xml.sax.InputSource[] getWSDLBindings()
           
 org.xml.sax.InputSource[] getWSDLs()
           
 void parseArguments(java.lang.String[] args)
          Parses arguments and fill fields of this object.
 int parseArguments(java.lang.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, getJavacOptions, isExtensionMode, 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 java.lang.String wsdlLocation
-wsdlLocation


entityResolver

public org.xml.sax.EntityResolver entityResolver
Actually stores 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 java.lang.String defaultPackage
The -p option that should control the default Java package that will contain the generated code. Null if unspecified.


clientjar

public java.lang.String clientjar
The -clientjar option to package client artifacts as jar


additionalHeaders

public boolean additionalHeaders
-XadditionalHeaders


implDestDir

public java.io.File implDestDir
The option indicates the dir where the jwsImpl will be generated.


implServiceName

public java.lang.String implServiceName
optional, generated impl file only for the ordered serviceName Note: It is a QName string, formatted as: "{" + Namespace URI + "}" + local part


implPortName

public java.lang.String implPortName
optional, generated impl file only for the ordered portName Note: It is a QName string, formatted as: "{" + Namespace URI + "}" + local part


isGenerateJWS

public boolean isGenerateJWS
optional, if true JWS file is generated


disableSSLHostnameVerification

public boolean disableSSLHostnameVerification
Setting disableSSLHostVerification to true disables the SSL Hostname verification while fetching the wsdls. -XdisableSSLHostVerification


useBaseResourceAndURLToLoadWSDL

public boolean useBaseResourceAndURLToLoadWSDL
Setting useBaseResourceAndURLToLoadWSDL to true causes generated Service classes to load the WSDL file from a URL generated from the base resource. -XuseBaseResourceAndURLToLoadWSDL


authFile

public java.io.File authFile
Authentication file


defaultAuthfile

public static final java.lang.String defaultAuthfile

disableAuthenticator

public boolean disableAuthenticator
Setting disableAuthenticator to true disables the DefaultAuthenticator. -XdisableAuthenticator


proxyAuth

public java.lang.String proxyAuth

extensionOptions

public java.util.HashMap<java.lang.String,java.lang.String> extensionOptions
Additional arguments


activePlugins

public final java.util.List<Plugin> activePlugins
Plugins that are enabled in this compilation.


cmdlineJars

public java.util.List<java.lang.String> cmdlineJars
This captures jars passed on the commandline and passes them to XJC and puts them in the classpath for compilation


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 com.sun.tools.xjc.api.SchemaCompiler getSchemaCompiler()

setCodeModel

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

getAllPlugins

public java.util.List<Plugin> getAllPlugins()
Gets all the Plugins discovered so far.

A plugins are enumerated when this method is called for the first time, by taking Options.classpath into account. That means "-cp plugin.jar" has to come before you specify options to enable it.


parseArguments

public final void parseArguments(java.lang.String[] args)
                          throws BadCommandLineException
Parses arguments and fill fields of this object.

Overrides:
parseArguments in class Options
Throws:
BadCommandLineException - thrown when there's a problem in the command-line arguments

parseArguments

public int parseArguments(java.lang.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(java.lang.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 org.w3c.dom.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(org.w3c.dom.Element config)

getWSDLs

public org.xml.sax.InputSource[] getWSDLs()

getSchemas

public org.xml.sax.InputSource[] getSchemas()

getWSDLBindings

public org.xml.sax.InputSource[] getWSDLBindings()

getSchemaBindings

public org.xml.sax.InputSource[] getSchemaBindings()

addWSDL

public void addWSDL(java.io.File source)

addWSDL

public void addWSDL(org.xml.sax.InputSource is)

addSchema

public void addSchema(java.io.File source)

addSchema

public void addSchema(org.xml.sax.InputSource is)

addGrammarRecursive

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


addWSDLBindFile

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


addSchemmaBindFile

public void addSchemmaBindFile(org.xml.sax.InputSource is)

addBindings

public void addBindings(java.lang.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

getExtensionOption

public java.lang.String getExtensionOption(java.lang.String argument)
Get extension argument


disableXmlSecurity

protected void disableXmlSecurity()
Overrides:
disableXmlSecurity in class Options


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.