wsdl2java is the Novell exteNd Web Services SDK WSDL to Java compiler. The wsdl2java compiler transforms WSDL documents into Java interfaces (RMI). The wsdl2java compiler first transforms the WSDL into Java RMI and then invokes the rmi2soap compiler to generate SOAP stubs and skeletons. The wsdl2java compiler passes the information from the SOAP binding to the rmi2soap compiler, i.e. the resulting stubs and skeletons will typically contain more information than if rmi2soap was ran over the remote interface. The following table shows the combinations of style, use and part supported by the wsdl2java compiler.
Combination style use part 1 document literal element 2 rpc encoded type 3 rpc literal element / type
wsdl2java [options] wsdl-file(s)
where options include:
-addr <portQName> <url> override endpoint address specified in WSDL with given url as the endpoint address for the port
-attributeQualified overrides the schema attribute form and attributeFormDefault value
-clienthandler <class> handler to be registered with the client
-defaultmapping <type> specify default mapping for data types, type must be one of the following object, element, or source
-ds <directory> destination directory for generated source files
-elementQualified overrides the schema element form and elementFormDefault value
-help print out this message
-gencallclient generate a call based sample client for the web service
-genclient generate a sample client for the web service
-genserver generate a sample server for the web service
-I <directory> directory with local XSD files
-J<vm flag> pass argument to the java interpreter
-keep do not delete generated source files
-keepgenerated same as -keep
-mdb generate a message driven bean skeleton
-nocompile do not compile the generated source files
-nohttp do not generate interfaces and bindings for http
-noserv do not generate the service interfaces
-noskel do not generate the skeletons
-nostub do not generate the stubs
-notie do not generate the TIE based skeletons
-notypes do not map complex XML types to Java types
-novalidate do not generate schema validation
-nowarn generate no warnings
-nspkg <ns> <pkg> map namespace ns to package pkg
-olddatabinding pre JAXRPC 1.1 style mapping for simple types
-package <pkg> specify package for generated files
-serverhandler <class> handler to be registered with the server
-typemapping <file> load type mappings from file
-verbose turn verbose mode on
-version show version and build information
-wsdllocation <url> the URL to be returned by getWSDLDocumentLocation()
java-compiler options:
-classpath <path> specify where to find user class files
-d <directory> destination directory for classes
-depend make compiler consider compiling dependencies
-g enable generation of debugging information
-O generate optimized code
-nowarn generate no warnings from Java compiler
-nohttp do not generate interfaces and bindings for http
-addr <portQName> <url>
Overrides the endpoint address of the particular port identified by the port QName with the specified url. No error is generated if the specified QName is not a valid port in the WSDL.
-attributeQualified
Overrides the schema attribute form and attributeFormDefault value. Tells the compiler to make all attributes namespace qualified.
-clienthandler <class>
Register the specified class as a JAX-RPC style handler for the client. This flag can be specified multiple times to register multiple handlers. The handler chain will maintain the order in which the handlers are specified. Note the handlers will be registered for all ports in the service.
-defaultmapping <type>
Use the specified type as the default data type when there is no standard XML type to Java type mapping or if the -notypes flag is specified. Currently the only supported values for type are object, element, or source. The corresponding java classes are java.lang.Object, org.w3c.dom.Element, and javax.xml.transform.Source.
-ds <directory>
Output generated Java files to the specified directory. The directory will automatically be created if it doesn't exist. Depending on the package and nspkg flags additional directories may be created below this directory.
-elementQualified
Overrides the schema element form and elementFormDefault value. Tells the compiler to make all elements namespace qualified.
-help
Prints out the command syntax.
-gencallclient
This flag will cause the wsdl2java compiler to generate a sample client that uses the call API, which can be used to invoke the Web Service(s) defined in the WSDL document.
-genclient
This flag will cause the wsdl2java compiler to generate a sample client, which can be used to invoke the Web Service(s) defined in the WSDL document.
-genserver
This flag will cause the wsdl2java compiler to generate a sample server implementation of the Web Service(s) defined in the WSDL document.
-I <directory>
Instruct the compiler to look in this include directory for XML type definitions. If the file specified in the location attribute of an import element could not be loaded, the compiler will try to locate it in the directory specified with the -I flag. This option can be used multiple times on the command line.
-J<vm flag>
Pass a flag to the jvm. As an example -J-Xms100m sets the maximum heap size to 100 MB when running wsdl2java. This option can be used multiple times on the command line.
-keep
Keep the source files generated by the rmi2soap compiler. Typically, developers will not need the generated stub and skeleton source files so the default behavior is to delete those files.
-keepgenerated
Same as -keep.
-mdb
Instruct the compiler to generate Message Driven Bean based skeletons instead of Servlet based skeletons. This means that the skeleton class will implement the javax.ejb.MessageDrivenBean and java.jms.MessageListener interfaces instead of the usual javax.servlet.http.HttpServlet class.
-nocompile
Do not compile Java source generated by rmi2soap into class files. Note that the wsdl2java compiler will still compile the generated Java RMI interface.
-nohttp
Do not generate interfaces and bindings for port types used in a HTTP binding in the WSDL document.
-noserv
Instruct the rmi2soap compiler not to generate service classes. This option can be used for server-side implementations that don't use the service interface.
-noskel
Instructs the rmi2soap compiler not to generate skeletons. This option is typically used by developers who are implementing Web Services client applications, but do not need to implement the Web Service itself.
-nostub
Instruct the rmi2soap compiler not to generate stubs. This options is typically used by developers who only wish to implement a Web Service, but do not require calling said Web Service.
-notie
Instruct the rmi2soap compiler not to generate tie classes. Tie classes are also used by Web Service developers, and is an advanced server-side construct that allows delegation to another Java class.
-notypes
Do not generate Java types for complex XML data types. This effectively maps all complex XML data types to the org.w3c.dom.Element Java type. By default the wsdl2java compiler will try to map XML types defined in the WSDL document to Java types by using the type mapping functionality.
-novalidate
Do not generate validation for schema types specified in the WSDL document.
-nowarn
Do not print out warning messages. The wsdl2java compiler was built to be tolerant towards malformed WSDL documents and it is therefore recommended that this flag is only used when the WSDL is known to be compliant to the WSDL 1.1 specification.
-nspkg <ns> <pkg>
Map the WSDL namespace ns to the Java package pkg. If different XML types, or XML types and WSDL portType's are defined in different namespaces, this option provides a flexible mechanism for mapping different namespaces to different Java packages. This option overrides the -package option. This option can be used multiple times on the command line.
-package <pkg>
Make pkg the default package for all generated Java interfaces, regardless of which namespace is used in the WSDL file. If the package or nspkg flags are not present, the wsdl2java compiler will place generated Java files into a package derived from the targetNamespace of the WSDL document.
-serverhandler <class>
Register the specified class as a JAX-RPC style handler for the server. This flag can be specified multiple times to register multiple handlers. The handler chain will maintain the order in which the handlers are specified. Note the handlers will be registered for all ports in the service.
-typemapping <file>
Load type mappings from file. This argument can be specified multiple times.
-verbose
Print out details about the compilation. This includes information about type and package mappings.
-version
Print out the version and build information of Novell exteNd WSSDK.
-wsdllocation <url>
Specify the URL to be returned by the getWSDLDocumentLocation() method of the Service.
-classpath <path>
Set the classpath available to the java compiler (javac) when compiling the generated Java files.
-d <directory>
Set the output directory for compiled class files. The directory will automatically be created if it doesn't exist. Depending on the package of the source file additional directories may be created below this directory.
-depend
Make the javac compiler consider dependencies.
-g
Enables generation of debugging information.
-nowarn
Do not generate warning messages from the javac compiler.
-O
Generates optimized code.
Copyright © 2003, 2004 Novell, Inc. All rights reserved. Copyright © 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.