Package com.sun.tools.ws.wscompile
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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sun.tools.ws.wscompile.Options
Options.Target, Options.WeAreDone
-
-
Field Summary
Fields Modifier and Type Field Description List<Plugin>activePluginsPlugins that are enabled in this compilation.booleanadditionalHeaders-XadditionalHeadersFileauthFileAuthentication fileStringclientjarThe -clientjar option to package client artifacts as jarList<String>cmdlineJarsThis captures jars passed on the commandline and passes them to XJC and puts them in the classpath for compilationstatic StringdefaultAuthfileStringdefaultPackageThe -p option that should control the default Java package that will contain the generated code.booleandisableAuthenticatorSetting disableAuthenticator to true disables the DefaultAuthenticator.booleandisableSSLHostnameVerificationSetting disableSSLHostVerification to true disables the SSL Hostname verification while fetching the wsdls.EntityResolverentityResolverActually storesCatalogResolver, but the field type is made toEntityResolverso that XJC can be used even if resolver.jar is not available in the classpath.HashMap<String,String>extensionOptionsAdditional argumentsFileimplDestDirThe option indicates the dir where the jwsImpl will be generated.StringimplPortNameoptional, generated impl file only for the ordered portName Note: It is a QName string, formatted as: "{" + Namespace URI + "}" + local partStringimplServiceNameoptional, generated impl file only for the ordered serviceName Note: It is a QName string, formatted as: "{" + Namespace URI + "}" + local partbooleanisGenerateJWSoptional, if true JWS file is generatedbooleannoAddressingBbinding-Xno-addressing-databinding option to disable addressing namespace data binding.StringproxyAuthbooleanuseBaseResourceAndURLToLoadWSDLSetting useBaseResourceAndURLToLoadWSDL to true causes generated Service classes to load the WSDL file from a URL generated from the base resource.StringwsdlLocation-wsdlLocation
-
Constructor Summary
Constructors Constructor Description WsimportOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBindings(String name)protected voidaddFile(String arg)Adds a file from the argumevoidaddGrammarRecursive(File dir)Recursively scan directories and add all XSD files in it.voidaddHandlerChainConfiguration(Element config)voidaddSchema(File source)voidaddSchema(InputSource is)voidaddSchemmaBindFile(InputSource is)voidaddWSDL(File source)voidaddWSDL(InputSource is)voidaddWSDLBindFile(InputSource is)Adds a new input schema.protected voiddisableXmlSecurity()List<Plugin>getAllPlugins()Gets all thePlugins discovered so far.JCodeModelgetCodeModel()StringgetExtensionOption(String argument)Get extension argumentElementgetHandlerChainConfiguration()There is supposed to be one handler chain per generated SEI.StringgetModuleName()Gets Java module name option.InputSource[]getSchemaBindings()SchemaCompilergetSchemaCompiler()InputSource[]getSchemas()InputSource[]getWSDLBindings()InputSource[]getWSDLs()voidparseArguments(String[] args)Parses arguments and fill fields of this object.intparseArguments(String[] args, int i)Parses an optionargs[i]and return the number of tokens consumed.voidparseBindings(ErrorReceiver receiver)Exposing it as a public method to allow external tools such as NB to read from wsdl model and work on it.voidsetCodeModel(JCodeModel codeModel)voidvalidate()-
Methods inherited from class com.sun.tools.ws.wscompile.Options
addGeneratedFile, deleteGeneratedFiles, fileToURL, getClassLoader, getGeneratedFiles, getJavacOptions, isExtensionMode, pathToURLs, removeGeneratedFiles, requireArgument
-
-
-
-
Field Detail
-
wsdlLocation
public String wsdlLocation
-wsdlLocation
-
entityResolver
public EntityResolver entityResolver
Actually storesCatalogResolver, but the field type is made toEntityResolverso 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
-
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.
-
-
Method Detail
-
getCodeModel
public JCodeModel getCodeModel()
-
getSchemaCompiler
public SchemaCompiler getSchemaCompiler()
-
setCodeModel
public void setCodeModel(JCodeModel codeModel)
-
getAllPlugins
public List<Plugin> getAllPlugins()
Gets all thePlugins discovered so far.A plugins are enumerated when this method is called for the first time, by taking
Options.classpathinto 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
nullif this option was not set.
-
parseArguments
public final void parseArguments(String[] args) throws BadCommandLineException
Parses arguments and fill fields of this object.- Overrides:
parseArgumentsin classOptions- 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:OptionsParses an optionargs[i]and return the number of tokens consumed.- Overrides:
parseArgumentsin classOptions- 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:OptionsAdds a file from the argume- Overrides:
addFilein classOptions- 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 inJAXBModelBuilder- Parameters:
receiver-ErrorReceiver
-
disableXmlSecurity
protected void disableXmlSecurity()
- Overrides:
disableXmlSecurityin classOptions
-
-