wsdl2java:generate-test-sources

Full name:

org.apache.axis:wsdl2java-maven-plugin:1.4.1-SNAPSHOT:generate-test-sources

Description:

Create Java classes from local or remote WSDL for usage in test cases.

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: generate-test-sources.

Required Parameters

Name Type Since Description
generate String - Specifies what artifacts should be generated. Valid values are:
  • client: generate client stubs
  • server: generate server side artifacts
  • both: generate all artifacts
The server mode can also be used for clients that rely on dynamic proxies created using the JAX-RPC ServiceFactory API, because they don't need client stubs.
Also note that the both mode is only really meaningful if skeleton is set to true or if deployWsdd is specified. If none of these conditions is satisfied, then client and both will generate the same set of artifacts.

Optional Parameters

Name Type Since Description
all boolean - flag to generate code for all elements, even unreferenced ones
Default value is: false.
allowInvalidURL boolean - (no description)
Default value is: false.
catalog File - The catalog file to resolve external entity references. This can be any type of catalog supported by xml-resolver.
deployScope String - Determines the scope that will be specified for the service in the deployment WSDD. Valid values are application, request and session. This parameter has no effect if generate is set to client or if deployWsdd is not specified. If this parameter is not specified, then no explicit scope will be configured in the deployment WSDD, in which case the scope defaults to request.
Note that these semantics (in particular the default scope request) are compatible with the deployScope parameter of the wsdl2java Ant task. This simplifies the migration of Ant builds to Maven. However, for most services, application is a more reasonable setting.
deployWsdd File - The location of the deployment WSDD file to be generated. This parameter is ignored if generate is set to client. If this parameter is not specified, then no deployment WSDD will be generated.
file File - The WSDL file to process.
helperGen boolean - Turn on/off Helper class generation.
Default value is: false.
implementation boolean - Flag indicating whether a default (empty) implementation should be generated.
Default value is: false.
implementationClassName String - Set the name of the class implementing the web service. This parameter is ignored if generate is set to client. If this parameter is not specified, then a default class name will be chosen if necessary.
javaXmlTypeMappings JavaXmlTypeMapping[] - A set of Java to XML type mappings that override the default mappings. This can be used to change the Java class associated with an XML type.
mappings Mapping[] - Mappings of namespaces to packages.
noWrapped boolean - Set the noWrapped flag.
Default value is: false.
skeleton boolean - Specifies whether a skeleton should be generated. If this parameter is set to false, a skeleton will not be generated. Instead, the generated deployment WSDD will indicate that the implementation class is deployed directly. In such cases, the WSDD contains extra meta data describing the operations and parameters of the implementation class. This parameter is ignored if generate is set to client.
Default value is: false.
testCase boolean - Flag indicating whether a basic unit test should be generated.
Default value is: false.
testDefaultHttpPort int - (no description)
testHttpPortSystemProperty String - (no description)
testSourceOutputDirectory File - Output directory for generated Java files.
Default value is: ${project.build.directory}/generated-test-sources/wsdl2java.
typeMappingVersion String - The default type mapping registry to use. Either 1.1 or 1.2.
Default value is: 1.2.
undeployWsdd File - The location of the undeployment WSDD file to be generated. This parameter is ignored if generate is set to client. If this parameter is not specified, then no undeployment WSDD will be generated. Note that (in contrast to deployWsdd) this parameter is rarely used: in general, no undeployment WSDD is required.
url String - The URL of the WSDL to process. This should only be used for remote WSDLs. For local files, use the file parameter.
wrapArrays boolean - Set the wrap arrays flag - if true this will make new classes like "ArrayOfString" for literal "wrapped" arrays. Otherwise it will use "String []" and generate appropriate metadata.
Default value is: false.

Parameter Details

all:

flag to generate code for all elements, even unreferenced ones
  • Type: boolean
  • Required: No
  • Default: false

allowInvalidURL:

(no description)
  • Type: boolean
  • Required: No
  • Default: false

catalog:

The catalog file to resolve external entity references. This can be any type of catalog supported by xml-resolver.
  • Type: java.io.File
  • Required: No

deployScope:

Determines the scope that will be specified for the service in the deployment WSDD. Valid values are application, request and session. This parameter has no effect if generate is set to client or if deployWsdd is not specified. If this parameter is not specified, then no explicit scope will be configured in the deployment WSDD, in which case the scope defaults to request.
Note that these semantics (in particular the default scope request) are compatible with the deployScope parameter of the wsdl2java Ant task. This simplifies the migration of Ant builds to Maven. However, for most services, application is a more reasonable setting.
  • Type: java.lang.String
  • Required: No

deployWsdd:

The location of the deployment WSDD file to be generated. This parameter is ignored if generate is set to client. If this parameter is not specified, then no deployment WSDD will be generated.
  • Type: java.io.File
  • Required: No

file:

The WSDL file to process.
  • Type: java.io.File
  • Required: No

generate:

Specifies what artifacts should be generated. Valid values are:
  • client: generate client stubs
  • server: generate server side artifacts
  • both: generate all artifacts
The server mode can also be used for clients that rely on dynamic proxies created using the JAX-RPC ServiceFactory API, because they don't need client stubs.
Also note that the both mode is only really meaningful if skeleton is set to true or if deployWsdd is specified. If none of these conditions is satisfied, then client and both will generate the same set of artifacts.
  • Type: java.lang.String
  • Required: Yes

helperGen:

Turn on/off Helper class generation.
  • Type: boolean
  • Required: No
  • Default: false

implementation:

Flag indicating whether a default (empty) implementation should be generated.
  • Type: boolean
  • Required: No
  • Default: false

implementationClassName:

Set the name of the class implementing the web service. This parameter is ignored if generate is set to client. If this parameter is not specified, then a default class name will be chosen if necessary.
  • Type: java.lang.String
  • Required: No

javaXmlTypeMappings:

A set of Java to XML type mappings that override the default mappings. This can be used to change the Java class associated with an XML type.
  • Type: org.apache.axis.tools.maven.wsdl2java.JavaXmlTypeMapping[]
  • Required: No

mappings:

Mappings of namespaces to packages.
  • Type: org.apache.axis.tools.maven.shared.nsmap.Mapping[]
  • Required: No

noWrapped:

Set the noWrapped flag.
  • Type: boolean
  • Required: No
  • Default: false

skeleton:

Specifies whether a skeleton should be generated. If this parameter is set to false, a skeleton will not be generated. Instead, the generated deployment WSDD will indicate that the implementation class is deployed directly. In such cases, the WSDD contains extra meta data describing the operations and parameters of the implementation class. This parameter is ignored if generate is set to client.
  • Type: boolean
  • Required: No
  • Default: false

testCase:

Flag indicating whether a basic unit test should be generated.
  • Type: boolean
  • Required: No
  • Default: false

testDefaultHttpPort:

(no description)
  • Type: int
  • Required: No

testHttpPortSystemProperty:

(no description)
  • Type: java.lang.String
  • Required: No

testSourceOutputDirectory:

Output directory for generated Java files.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/generated-test-sources/wsdl2java

typeMappingVersion:

The default type mapping registry to use. Either 1.1 or 1.2.
  • Type: java.lang.String
  • Required: No
  • Default: 1.2

undeployWsdd:

The location of the undeployment WSDD file to be generated. This parameter is ignored if generate is set to client. If this parameter is not specified, then no undeployment WSDD will be generated. Note that (in contrast to deployWsdd) this parameter is rarely used: in general, no undeployment WSDD is required.
  • Type: java.io.File
  • Required: No

url:

The URL of the WSDL to process. This should only be used for remote WSDLs. For local files, use the file parameter.
  • Type: java.lang.String
  • Required: No

wrapArrays:

Set the wrap arrays flag - if true this will make new classes like "ArrayOfString" for literal "wrapped" arrays. Otherwise it will use "String []" and generate appropriate metadata.
  • Type: boolean
  • Required: No
  • Default: false