Class WsimportOptions

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

public class WsimportOptions extends Options
Author:
Vivek Pandey
  • Field Details

    • 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.
    • clientjar

      public String clientjar
      The -clientjar option to package client artifacts as jar
    • additionalHeaders

      public boolean additionalHeaders
      -XadditionalHeaders
    • implDestDir

      public File implDestDir
      The option indicates the dir where the jwsImpl will be generated.
    • implServiceName

      public 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 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 File authFile
      Authentication file
    • defaultAuthfile

      public static final String defaultAuthfile
    • disableAuthenticator

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

      public String proxyAuth
    • extensionOptions

      public HashMap<String,String> extensionOptions
      Additional arguments
    • activePlugins

      public final List<Plugin> activePlugins
      Plugins that are enabled in this compilation.
    • cmdlineJars

      public List<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 Details

    • WsimportOptions

      public WsimportOptions()
      Default constructor.
  • Method Details

    • getCodeModel

      public JCodeModel getCodeModel()
    • getSchemaCompiler

      public SchemaCompiler getSchemaCompiler()
    • setCodeModel

      public void setCodeModel(JCodeModel codeModel)
      Sets the codeModel and includes the Options.classNameReplacer in it.
      Parameters:
      codeModel - the new codeModel
    • getAllPlugins

      public 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.

    • getModuleName

      public String getModuleName()
      Gets Java module name option.
      Returns:
      Java module name option or null if this option was not set.
    • parseArguments

      public final void parseArguments(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(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 runtime 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 String getExtensionOption(String argument)
      Get extension argument
    • disableXmlSecurity

      protected void disableXmlSecurity()
      Overrides:
      disableXmlSecurity in class Options