public class WSDL2Java
extends AbstractWSDL2Java
This task generates the source code from existing WSDL with axis1 files with a specific configuration.
AbstractWSDL2Java.CompanionCompanion| Constructor and Description |
|---|
WSDL2Java()
This task generates the source code from existing WSDL with axis1 files with a specific configuration.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAllowInvalidURL()
This flag is used to allow Stub generation even if WSDLExtension endpoint URL is not a valid URL.
It's the responsibility of the user to update the endpoint value before using generated classes
default=false
|
java.lang.String |
getDeployScope()
Add scope to deploy.wsdd:
|
java.lang.String |
getFactory()
Used to extend the functionality of the WSDL2Java emitter.
The argument is the name of a class which extends JavaWriterFactory.
|
boolean |
getGenerateAllClasses()
Generate code for all elements, even unreferenced ones. By default,
WSDL2Java only generates code for those elements in the WSDLExtension file that are referenced.
|
boolean |
getHelperGen()
Emits separate Helper classes for meta data.
|
java.lang.String |
getImplementationClassName()
Set the name of the implementation class. Especially useful when exporting an existing class as
a web service using java2wsdl followed by wsdl2java. If you are using the skeleton deploy option
you must make sure, after generation, that your implementation class implements the port type name
interface generated by wsdl2java. You should also make sure that all your exported methods throws
java.lang.RemoteException.
|
boolean |
getNoImports()
Only generate code for the WSDLExtension document that appears on the command line
if this value is true. The default behaviour is to generate files for all WSDLExtension
documents, the immediate one and all imported ones.
|
boolean |
getNoWrapped()
If this value is true, it turns off the special treatment of what is called "wrapped" document/literal
style operations. By default, WSDL2Java will recognize the following conditions:
|
java.lang.String |
getNsExclude()
namespace to specifically exclude from the generated code (defaults to
none excluded until first namespace included with -i option).
|
java.lang.String |
getNsInclude()
namescape to specifically include in the generated code (defaults to
all namespaces unless specifically excluded with the -x option).
|
java.lang.String |
getPassword()
This password is used in resolving the WSDLExtension-URI provided as the input to WSDL2Java.
If the URI contains a password, this will override the command line switch.
|
boolean |
getServerSide()
Emit the server-side bindings for the web service:
|
boolean |
getSkeletonDeploy()
Deploy either the skeleton (true) or the implementation (false) in deploy.wsdd. In other words, for "true"
the service clause in the deploy.wsdd file will look something like:
|
int |
getTimeoutConf()
Timeout in seconds. The default is 240.
Use -1 to disable the timeout.
|
java.lang.String |
getTypeMappingVersion()
Indicate 1.1 or 1.2. The default is 1.2 (SOAP 1.2 JAX-RPC compliant).
|
java.lang.String |
getUserName()
This username is used in resolving the WSDLExtension-URI provided as the input to WSDL2Java.
If the URI contains a username, this will override the command line switch. An example
of a URL with a username and password is: http://user:password@hostname:port/path/to/service?WSDL
|
boolean |
getWrapArrays()
When processing a schema like this:
|
org.gradle.api.NamedDomainObjectContainer<com.intershop.gradle.wsdl.extension.data.WSDLProperty> |
getWsdlProperties() |
java.util.List<java.lang.String> |
getWsdlPropertiesList()
Names and values of a properties for use by the custom GeneratorFactory.
|
void |
provideAllowInvalidURL(org.gradle.api.provider.Provider<java.lang.Boolean> allowInvalidURL)
Add provider for allowInvalidURL.
|
void |
provideDeployScope(org.gradle.api.provider.Provider<java.lang.String> deployScope)
Add provider for deployScope.
|
void |
provideFactory(org.gradle.api.provider.Provider<java.lang.String> factory)
Add provider for factory.
|
void |
provideGenerateAllClasses(org.gradle.api.provider.Provider<java.lang.Boolean> generateAllClasses)
Add provider for generateAllClasses.
|
void |
provideHelperGen(org.gradle.api.provider.Provider<java.lang.Boolean> helperGen)
Add provider for helperGen.
|
void |
provideImplementationClassName(org.gradle.api.provider.Provider<java.lang.String> implementationClassName)
Add provider for implementationClassName.
|
void |
provideNoImports(org.gradle.api.provider.Provider<java.lang.Boolean> noImports)
Add provider for noImports.
|
void |
provideNoWrapped(org.gradle.api.provider.Provider<java.lang.Boolean> noWrapped)
Add provider for noWrapped.
|
void |
provideNsExclude(org.gradle.api.provider.Provider<java.lang.String> nsExclude)
Add provider for nsExclude.
|
void |
provideNsInclude(org.gradle.api.provider.Provider<java.lang.String> nsInclude)
Add provider for nsInclude.
|
void |
providePassword(org.gradle.api.provider.Provider<java.lang.String> password)
Add provider for password.
|
void |
provideServerSide(org.gradle.api.provider.Provider<java.lang.Boolean> serverSide)
Add provider for serverSide.
|
void |
provideSkeletonDeploy(org.gradle.api.provider.Provider<java.lang.Boolean> skeletonDeploy)
Add provider for skeletonDeploy.
|
void |
provideTimeout(org.gradle.api.provider.Provider<java.lang.Integer> timeout)
Add provider for timeoutConf.
|
void |
provideTypeMappingVersion(org.gradle.api.provider.Provider<java.lang.String> typeMappingVersion)
Add provider for typeMappingVersion.
|
void |
provideUserName(org.gradle.api.provider.Provider<java.lang.String> userName)
Add provider for userName.
|
void |
provideWrapArrays(org.gradle.api.provider.Provider<java.lang.Boolean> wrapArrays)
Add provider for wrapArrays.
|
void |
run()
This is the task action and generates Java source files.
|
void |
setAllowInvalidURL(boolean value)
This flag is used to allow Stub generation even if WSDLExtension endpoint URL is not a valid URL.
It's the responsibility of the user to update the endpoint value before using generated classes
default=false
|
void |
setDeployScope(java.lang.String value)
Add scope to deploy.wsdd:
|
void |
setFactory(java.lang.String value)
Used to extend the functionality of the WSDL2Java emitter.
The argument is the name of a class which extends JavaWriterFactory.
|
void |
setGenerateAllClasses(boolean value)
Generate code for all elements, even unreferenced ones. By default,
WSDL2Java only generates code for those elements in the WSDLExtension file that are referenced.
|
void |
setHelperGen(boolean value)
Emits separate Helper classes for meta data.
|
void |
setImplementationClassName(java.lang.String value)
Set the name of the implementation class. Especially useful when exporting an existing class as
a web service using java2wsdl followed by wsdl2java. If you are using the skeleton deploy option
you must make sure, after generation, that your implementation class implements the port type name
interface generated by wsdl2java. You should also make sure that all your exported methods throws
java.lang.RemoteException.
|
void |
setNoImports(boolean value)
Only generate code for the WSDLExtension document that appears on the command line
if this value is true. The default behaviour is to generate files for all WSDLExtension
documents, the immediate one and all imported ones.
|
void |
setNoWrapped(boolean value)
If this value is true, it turns off the special treatment of what is called "wrapped" document/literal
style operations. By default, WSDL2Java will recognize the following conditions:
|
void |
setNsExclude(java.lang.String value)
namespace to specifically exclude from the generated code (defaults to
none excluded until first namespace included with -i option).
|
void |
setNsInclude(java.lang.String value)
namescape to specifically include in the generated code (defaults to
all namespaces unless specifically excluded with the -x option).
|
void |
setPassword(java.lang.String value)
This password is used in resolving the WSDLExtension-URI provided as the input to WSDL2Java.
If the URI contains a password, this will override the command line switch.
|
void |
setServerSide(boolean value)
Emit the server-side bindings for the web service:
|
void |
setSkeletonDeploy(boolean value)
Deploy either the skeleton (true) or the implementation (false) in deploy.wsdd. In other words, for "true"
the service clause in the deploy.wsdd file will look something like:
|
void |
setTimeoutConf(int value)
Timeout in seconds. The default is 240.
Use -1 to disable the timeout.
|
void |
setTypeMappingVersion(java.lang.String value)
Indicate 1.1 or 1.2. The default is 1.2 (SOAP 1.2 JAX-RPC compliant).
|
void |
setUserName(java.lang.String value)
This username is used in resolving the WSDLExtension-URI provided as the input to WSDL2Java.
If the URI contains a username, this will override the command line switch. An example
of a URL with a username and password is: http://user:password@hostname:port/path/to/service?WSDL
|
void |
setWrapArrays(boolean value)
When processing a schema like this:
|
void |
setWsdlProperties(org.gradle.api.NamedDomainObjectContainer<com.intershop.gradle.wsdl.extension.data.WSDLProperty> p) |
args, forkOptions, getArgs, getGenerateTestcase, getInternalForkOptionsAction, getNamespacePackageMappingFile, getNamespacePackageMappingList, getNamespacePackageMappings, getOutputDir, getPackageName, getWsdlFile, provideArguments, provideGenerateTestcase, provideNamespacePackageMappingFile, provideOutputDir, providePackageName, provideWsdlFile, setArgs, setGenerateTestcase, setInternalForkOptionsAction, setNamespacePackageMappingFile, setNamespacePackageMappings, setOutputDir, setPackageName, setWsdlFilepublic WSDL2Java()
This task generates the source code from existing WSDL with axis1 files with a specific configuration.
public boolean getNoImports()
Only generate code for the WSDLExtension document that appears on the command line if this value is true. The default behaviour is to generate files for all WSDLExtension documents, the immediate one and all imported ones.
public void setNoImports(boolean value)
Only generate code for the WSDLExtension document that appears on the command line if this value is true. The default behaviour is to generate files for all WSDLExtension documents, the immediate one and all imported ones.
public void provideNoImports(org.gradle.api.provider.Provider<java.lang.Boolean> noImports)
Add provider for noImports.
public int getTimeoutConf()
Timeout in seconds. The default is 240. Use -1 to disable the timeout.
public void setTimeoutConf(int value)
Timeout in seconds. The default is 240. Use -1 to disable the timeout.
public void provideTimeout(org.gradle.api.provider.Provider<java.lang.Integer> timeout)
Add provider for timeoutConf.
public boolean getNoWrapped()
If this value is true, it turns off the special treatment of what is called "wrapped" document/literal style operations. By default, WSDL2Java will recognize the following conditions:
If an input message has is a single part.
The part is an element.
The element has the same name as the operation
The element's complex type has no attributes If this value is true, WSDL2Java will 'unwrap' the top level element, and treat each of the components of the element as arguments to the operation. This type of WSDLExtension is the default for Microsoft .NET web services, which wrap up RPC style arguments in this top level schema element.
public void setNoWrapped(boolean value)
If this value is true, it turns off the special treatment of what is called "wrapped" document/literal style operations. By default, WSDL2Java will recognize the following conditions:
If an input message has is a single part.
The part is an element.
The element has the same name as the operation
The element's complex type has no attributes If this value is true, WSDL2Java will 'unwrap' the top level element, and treat each of the components of the element as arguments to the operation. This type of WSDLExtension is the default for Microsoft .NET web services, which wrap up RPC style arguments in this top level schema element.
public void provideNoWrapped(org.gradle.api.provider.Provider<java.lang.Boolean> noWrapped)
Add provider for noWrapped.
public boolean getServerSide()
Emit the server-side bindings for the web service:
a skeleton class named Skeleton. This may or may not be emitted (see skeletonDeploy).
an implementation template class named Impl. Note that, if this class already exists, then it is not emitted. (deploy.wsdd and undeploy.wsdd)
public void setServerSide(boolean value)
Emit the server-side bindings for the web service:
a skeleton class named Skeleton. This may or may not be emitted (see skeletonDeploy).
an implementation template class named Impl. Note that, if this class already exists, then it is not emitted. (deploy.wsdd and undeploy.wsdd)
public void provideServerSide(org.gradle.api.provider.Provider<java.lang.Boolean> serverSide)
Add provider for serverSide.
public boolean getSkeletonDeploy()
Deploy either the skeleton (true) or the implementation (false) in deploy.wsdd. In other words, for "true" the service clause in the deploy.wsdd file will look something like:
public void setSkeletonDeploy(boolean value)
Deploy either the skeleton (true) or the implementation (false) in deploy.wsdd. In other words, for "true" the service clause in the deploy.wsdd file will look something like:
public void provideSkeletonDeploy(org.gradle.api.provider.Provider<java.lang.Boolean> skeletonDeploy)
Add provider for skeletonDeploy.
public java.lang.String getDeployScope()
Add scope to deploy.wsdd:
APPLICATION -> "Application",
REQUEST -> "Request", or
SESSION -> "Session". If this option does not appear, no scope tag appears in deploy.wsdd, which the Axis runtime defaults to "Request".
public void setDeployScope(java.lang.String value)
Add scope to deploy.wsdd:
APPLICATION -> "Application",
REQUEST -> "Request", or
SESSION -> "Session". If this option does not appear, no scope tag appears in deploy.wsdd, which the Axis runtime defaults to "Request".
public void provideDeployScope(org.gradle.api.provider.Provider<java.lang.String> deployScope)
Add provider for deployScope.
public boolean getGenerateAllClasses()
Generate code for all elements, even unreferenced ones. By default, WSDL2Java only generates code for those elements in the WSDLExtension file that are referenced.
A note about what it means to be referenced. We cannot simply say: start with the services, generate all bindings referenced by the service, generate all portTypes referenced by the referenced bindings, etc. What if we're generating code from a WSDLExtension file that only contains portTypes, messages, and types? If WSDL2Java used service as an anchor, and there's no service in the file, then nothing will be generated. So the anchor is the lowest element that exists in the WSDLExtension file in the order:
types
portTypes
bindings
services For example, if a WSDLExtension file only contained types, then all the listed types would be generated. But if a WSDLExtension file contained types and a portType, then that portType will be generated and only those types that are referenced by that portType.
Note that the anchor is searched for in the WSDLExtension file appearing on the command line, not in imported WSDLExtension files. This allows one WSDLExtension file to import constructs defined in another WSDLExtension file without the nuisance of having all the imported WSDLExtension file's constructs generated.
public void setGenerateAllClasses(boolean value)
Generate code for all elements, even unreferenced ones. By default, WSDL2Java only generates code for those elements in the WSDLExtension file that are referenced.
A note about what it means to be referenced. We cannot simply say: start with the services, generate all bindings referenced by the service, generate all portTypes referenced by the referenced bindings, etc. What if we're generating code from a WSDLExtension file that only contains portTypes, messages, and types? If WSDL2Java used service as an anchor, and there's no service in the file, then nothing will be generated. So the anchor is the lowest element that exists in the WSDLExtension file in the order:
types
portTypes
bindings
services For example, if a WSDLExtension file only contained types, then all the listed types would be generated. But if a WSDLExtension file contained types and a portType, then that portType will be generated and only those types that are referenced by that portType.
Note that the anchor is searched for in the WSDLExtension file appearing on the command line, not in imported WSDLExtension files. This allows one WSDLExtension file to import constructs defined in another WSDLExtension file without the nuisance of having all the imported WSDLExtension file's constructs generated.
public void provideGenerateAllClasses(org.gradle.api.provider.Provider<java.lang.Boolean> generateAllClasses)
Add provider for generateAllClasses.
public java.lang.String getTypeMappingVersion()
Indicate 1.1 or 1.2. The default is 1.2 (SOAP 1.2 JAX-RPC compliant).
public void setTypeMappingVersion(java.lang.String value)
Indicate 1.1 or 1.2. The default is 1.2 (SOAP 1.2 JAX-RPC compliant).
public void provideTypeMappingVersion(org.gradle.api.provider.Provider<java.lang.String> typeMappingVersion)
Add provider for typeMappingVersion.
public java.lang.String getFactory()
Used to extend the functionality of the WSDL2Java emitter. The argument is the name of a class which extends JavaWriterFactory.
public void setFactory(java.lang.String value)
Used to extend the functionality of the WSDL2Java emitter. The argument is the name of a class which extends JavaWriterFactory.
public void provideFactory(org.gradle.api.provider.Provider<java.lang.String> factory)
Add provider for factory.
public boolean getHelperGen()
Emits separate Helper classes for meta data.
public void setHelperGen(boolean value)
Emits separate Helper classes for meta data.
public void provideHelperGen(org.gradle.api.provider.Provider<java.lang.Boolean> helperGen)
Add provider for helperGen.
public java.lang.String getUserName()
This username is used in resolving the WSDLExtension-URI provided as the input to WSDL2Java. If the URI contains a username, this will override the command line switch. An example of a URL with a username and password is: http://user:password@hostname:port/path/to/service?WSDL
public void setUserName(java.lang.String value)
This username is used in resolving the WSDLExtension-URI provided as the input to WSDL2Java. If the URI contains a username, this will override the command line switch. An example of a URL with a username and password is: http://user:password@hostname:port/path/to/service?WSDL
public void provideUserName(org.gradle.api.provider.Provider<java.lang.String> userName)
Add provider for userName.
public java.lang.String getPassword()
This password is used in resolving the WSDLExtension-URI provided as the input to WSDL2Java. If the URI contains a password, this will override the command line switch.
public void setPassword(java.lang.String value)
This password is used in resolving the WSDLExtension-URI provided as the input to WSDL2Java. If the URI contains a password, this will override the command line switch.
public void providePassword(org.gradle.api.provider.Provider<java.lang.String> password)
Add provider for password.
public java.lang.String getImplementationClassName()
Set the name of the implementation class. Especially useful when exporting an existing class as a web service using java2wsdl followed by wsdl2java. If you are using the skeleton deploy option you must make sure, after generation, that your implementation class implements the port type name interface generated by wsdl2java. You should also make sure that all your exported methods throws java.lang.RemoteException.
public void setImplementationClassName(java.lang.String value)
Set the name of the implementation class. Especially useful when exporting an existing class as a web service using java2wsdl followed by wsdl2java. If you are using the skeleton deploy option you must make sure, after generation, that your implementation class implements the port type name interface generated by wsdl2java. You should also make sure that all your exported methods throws java.lang.RemoteException.
public void provideImplementationClassName(org.gradle.api.provider.Provider<java.lang.String> implementationClassName)
Add provider for implementationClassName.
public boolean getWrapArrays()
When processing a schema like this:
public void setWrapArrays(boolean value)
When processing a schema like this:
public void provideWrapArrays(org.gradle.api.provider.Provider<java.lang.Boolean> wrapArrays)
Add provider for wrapArrays.
public java.lang.String getNsInclude()
namescape to specifically include in the generated code (defaults to all namespaces unless specifically excluded with the -x option).
public void setNsInclude(java.lang.String value)
namescape to specifically include in the generated code (defaults to all namespaces unless specifically excluded with the -x option).
public void provideNsInclude(org.gradle.api.provider.Provider<java.lang.String> nsInclude)
Add provider for nsInclude.
public java.lang.String getNsExclude()
namespace to specifically exclude from the generated code (defaults to none excluded until first namespace included with -i option).
public void setNsExclude(java.lang.String value)
namespace to specifically exclude from the generated code (defaults to none excluded until first namespace included with -i option).
public void provideNsExclude(org.gradle.api.provider.Provider<java.lang.String> nsExclude)
Add provider for nsExclude.
public org.gradle.api.NamedDomainObjectContainer<com.intershop.gradle.wsdl.extension.data.WSDLProperty> getWsdlProperties()
public void setWsdlProperties(org.gradle.api.NamedDomainObjectContainer<com.intershop.gradle.wsdl.extension.data.WSDLProperty> p)
public java.util.List<java.lang.String> getWsdlPropertiesList()
Names and values of a properties for use by the custom GeneratorFactory.
public boolean getAllowInvalidURL()
This flag is used to allow Stub generation even if WSDLExtension endpoint URL is not a valid URL. It's the responsibility of the user to update the endpoint value before using generated classes default=false
public void setAllowInvalidURL(boolean value)
This flag is used to allow Stub generation even if WSDLExtension endpoint URL is not a valid URL. It's the responsibility of the user to update the endpoint value before using generated classes default=false
public void provideAllowInvalidURL(org.gradle.api.provider.Provider<java.lang.Boolean> allowInvalidURL)
Add provider for allowInvalidURL.
public void run()
This is the task action and generates Java source files.