Beta 2 Version
Usage: java org.apache.axis.wsdl.WSDL2Java [options] WSDL-URI
Options:
-h, --help
print this message and exit
-v, --verbose
print informational messages
-s, --server-side
emit server-side bindings for web service
-S, --skeletonDeploy <argument>
deploy skeleton (true) or implementation (false) in deploy.wsdd.
Default is false. Assumes --server-side.
-N, --NStoPkg <argument>=<value>
mapping of namespace to package
-f, --fileNStoPkg <argument>
file of NStoPkg mappings (default NStoPkg.properties)
-p, --package <argument>
override all namespace to package mappings, use this package
name instead
-o, --output <argument>
output directory for emitted files
-d, --deployScope <argument>
add scope to deploy.xml: "Application", "Request", "Session"
-t, --testCase
emit junit testcase class for web service
-n, --noImports
only generate code for the immediate WSDL document
-a, --all
generate code for all elements, even unreferenced ones
-D, --Debug
print debug information
-F, --factory <argument>
name of the JavaWriterFactory class for extending Java generation functions
ompliant)
-O, --timeout <argument>
timeout in seconds (default is 45, specify -1 to disable)
-U, --user <argument>
username to access the WSDL-URI
-P, --password <argument>
password to access the WSDL-URI
-W, --noWrapped
turn off support for "wrapped" document/literal
<service name="AddressBook" provider="java:RPC"> <parameter name="className" value="samples.addr.AddressBookSOAPBindingSkeleton"/> ... </service>
and for "false" it would look like:
<service name="AddressBook" provider="java:RPC"> <parameter name="className" value="samples.addr.AddressBookSOAPBindingImpl"/> ... </service>
The default for this option is false. When you use this option, the --server-side option is assumed, so you don't have to explicitly specify --server-side as well.
--NStoPkg urn:AddressFetcher2=samples.addr(Note that if you use the short option tag, "-N", then there must not be a space between "-N" and the namespace.)
The entries in this file are of the same form as the arguments to the --NStoPkg command line option. For example, instead of providing the command line option as above, we could provide the same information in NStoPkg.properties:
urn\:AddressFetcher2=samples.addr(Note that the colon must be escaped in the properties file.)
If an entry for a given mapping exists both on the command line and in the properties file, the command line entry takes precedence.
A note about what it means to be referenced. We cannot simply say:
start with the services, generate all bindings referenced by the service, generated
all portTypes referenced by the referenced bindings, etc. What if we're
generating code from a WSDL 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 WSDL file in the order:
For example, if a WSDL file only contained types, then all the listed types would be generated. But if a WSDL file contained types and a portType, then that portType will be generated and only those types that are referenced by that portType.
http://user:password@hostname:port/path/to/service?WSDL
Here is the help message generated from the current tool:
Java2WSDL emitter
Usage: java org.apache.axis.wsdl.Java2WSDL [options]
class-of-portType
Options:
-h, --help
print this message and exit
-o, --output
<argument>
output WSDL filename
-l, --location
<argument>
service location url
-P, --portTypeName
<argument>
portType name (obtained from class-of-portType if not specified)
-S, --serviceElementName
<argument>
service element name (defaults to servicePortName value + "Service")
-s, --servicePortName
<argument>
service port name (obtained from --location if not specified)
-n, --namespace
<argument>
target namespace
-p, --PkgtoNS
<argument>=<value>
package=namespace, name value pairs
-m, --methods
<argument>
space or comma separated list of methods to export
-a, --all
look for allowed methods in inherited class
-w, --outputWsdlMode
<argument>
output WSDL mode: All, Interface, Implementation
-L, --locationImport
<argument>
location of interface WSDL
-N, --namespaceImpl
<argument>
target namespace for implementation WSDL
-O, --outputImpl
<argument>
output Implementation WSDL filename, setting this causes --outputWsdlMode to
be ignored
-f, --factory
<argument>
name of the Java2WSDLFactory class for extending WSDL generation functions
-i, --implClass
<argument>
optional class that contains implementation of methods in
class-of-portType. The debug information in the class is used
to obtain the method parameter names, which are used to set
the WSDL part names.
-x, --exclude
<argument>
space or comma separated list of methods not to export
-c, --stopClasses
<argument>
space or comma separated list of class names which stop inheritance search
if --all switch is enabled
-T, --typeMappingVersion
<argument>
indicate 1.1 or 1.2. The default is 1.2 (SOAP 1.2 JAX-RPC compliant)
Details:
portType element name= <.portTypeName
value> OR <class-of-portType name>
binding element name= <--servicePortName
value>SoapBinding
service element name= <--serviceElementName
value> OR <portTypeName value>Service
port element name=
<--servicePortName value>
address location =
<--location value>
-h , --help
Prints the help message.
-o, --output <WSDL file>
Indicates the name of the output WSDL file. If not specified, a suitable
default WSDL file is written into the current directory.
-l, --location <location>
Indicates the url of the location of the service. The name after the last
slash or backslash is the name of the service port (unless overriden by the
-s option). The service port address location attribute is assigned the
specified value.
-p, --portTypeName <name>
Indicates the name to use use for the portType element. If not specified, the
class-of-portType name is used.
-s, -serviceElementName <name>
Indicates the name of the service element. If not specified, the service
element is the <portTypeName>Service.
-s, -servicePortName <name>
Indicates the name of the service port. If not specified, the service
port name is derived from the --location value.
-n, --namespace <target namespace>
Indicates the name of the target namespace of the WSDL.
-p, --PkgToNS <package> <namespace>
Indicates the mapping of a package to a namespace. If a package is encountered
that does not have a namespace, the Java2WSDL emitter will generate a suitable
namespace name. This option may be specified multiple times.
-m, --methods <arguments>
If this option is specified, only the indicated methods in your interface class
will be exported into the WSDL file. The methods list must be comma separated.
If not specified, all methods declared in the interface class will be exported
into the WSDL file.
-a, --all
If this option is specified, the Java2WSDL parser will look into extended classes
to determine the list of methods to export into the WSDL file.
-w, --outputWSDLMode <mode>
Indicates the kind of WSDL to generate. Accepted values are:
-N, --namespaceImpl <namespace>
Namespace of the implementation WSDL.
-O, --outputImpl <WSDL file>
Use this option to indicate the name of the output implementation WSDL file.
If specified, Java2WSDL will produce interface and implementation WSDL files.
If this option is used, the -w option is ignored.
-f, --factory <class>
(No longer used.)
-i, --implClass <impl-class>
Sometimes extra information is avalable in the implementation class file. Use
this option to specify the implementation class.
-f, --factory <class>
(No longer used.)
-x, --exclude <list>
List of methods to not exclude from the wsdl file.
-c, --stopClasses <list>
List of classes which stop the Java2WSDL inheritance search.
-T, --typeMappingVersion <version>
Choose the default type mapping registry to use. Either 1.1 or 1.2.
<parameter name="name"
value="value"/>
, and common ones include:<service name="test"> <parameter name="className" value="test.Implementation"/> <parameter name="allowedMethods" value="*"/> <namespace>http://testservice/</namespace> <requestFlow> <!-- Run these before processing the request --> <handler type="java:MyHandlerClass"/> <handler type="somethingIDefinedPreviously"/> </requestFlow> </service>Metadata may be specified about particular operations in your service by using the <operation> tag inside a service. This enables you to map the java parameter names of a method to particular XML names, to specify the parameter modes for your parameters, and to map particular XML names to particular operations.
<chain name="myChain"> <handler type="java:org.apache.axis.handlers.LogHandler"/> </chain>or may refer to previously defined <handlers>, with the "type" of the handler referring to the name of the other handler definition:
<handler name="logger" type="java:org.apache.axis.handlers.LogHandler"/>
<chain name="myChain"/>
<handler type="logger"/>
</chain>
% java org.apache.axis.client.AdminClient -llocal:// list