Generates the client stubs and server-side ties for the service definition interface that represents the web service interface. Additionally, it generates the WSDL description of the web service interface which is then used to generate the implementation artifacts.
In addition to supporting the generation of stubs, ties, server configuration, and WSDL documents from a set of RMI interfaces, wscompile also supports generating stubs, ties and remote interfaces from a WSDL document.
You must specifiy one of the gen options in order to use wscompile as a stand alone generator. You must use either import (for WSDL) or define (for an RMI interface) along with the model option in order to use wscompile in conjunction with wsdeploy.
Invoking the wscompile command without specifying any arguments outputs the usage information.
location of the input class files.
where to place the generated output files.
read the service's RMI interface, define a service. Use this option with the model option in order to create a model file for use with the wsdeploy command.
enables the given features. Features are specified as a comma separated list of features. See the list of supported features below.
generates the debugging information.
generates the client-side artifacts.
generates the server-side artifacts and the WSDL file. If you are using wsdeploy, you do not specify this option.
specifies an HTTP proxy server; defaults to port 8080.
reads a WSDL file, generates the service RMI interface and a template of the class that implements the interface. Use this option with the model option in order to create a model file for use with the wsdeploy command.
writes the mapping file to the specified file.
write the internal model for the given file name. Use this option with the import option in order to create a model file for use with the wsdeploy command.
keeps the generated files.
directory for the non-class generated files are stored.
optimizes the generated code.
directory for the generated source files.
generate code for the specified JAX-RPC version. Supported versions are 1.0.1, 1.0.3, 1.1, 1.1.1, and 1.1.2 (the default).
output messages about what the compiler is doing.
prints version information.
Exactly one of the –input, define, gen options must be specified.
The -f option requires a comma-separated list of features. The following are the supported features.
always map attachments to data handler type
use document literal encoding
do not regenerate classes that already exist in the classpath.
disable unwrapping of document/literal wrapper elements in WSI mode (default).
turn on explicit service context mapping.
specify an infix to use for generated serializers (Solaris).
specify an infix to use for generated serializers (Windows).
map anonymous enumeration to its base type.
turn off data binding for literal encoding.
turn off encoding type information.
turn off support for multiple references.
do not generate RPC structures (import only).
turn off validation for the imported WSDL file.
use the RPC literal encoding.
search schema aggresively for subtypes.
turn on direct serialization of interface types.
generate code strictly compliant with JAX-RPC 1.1 specification.
enable unwrapping of document/literal wrapper elements in WSI mode.
allow generation of one-way operations.
enable WS-I Basic Profile features, to be used for document/literal, and RPC/literal.
do not regenrate the classes
disables unwrapping of document/literal wrapper elements in WS-I mode. This is on by default.
Note: the gen options are not compatible with wsdeploy.
The wscompile command reads the configuration file config.xml which contains information that describes the web service. The structure of the file is as follows:
<?xml version=”1.0” encoding=”UTF-8”?>
<service> or <wsdl> or <modelfile>
The configuration element may contain exactly one <service>, <wsdl> or <modelfile>.
If the <service> element is specified, wscompile reads the RMI interface that describes the service and generates a WSDL file. In the <interface> subelement, the name attribute specifies the service's RMI interface, and the servantName attribute specifies the class that implements the interface. For example:
If the <wsdl> element is specified, wscompile reads the WSDL file and generates the service's RMI interface. The location attribute specifies the URL of the WSDL file, and the packageName attribute specifies the package of the classes to be generated. For example:
This element is for advanced users.
If config.xml contains a <service> or <wsdl> element, wscompile can generate a model file that contains the internal data structures that describe the service. If a model file is already generated, it can be reused next time while using wscompile. For example:
wscompile -gen:client -d outputdir -classpath classpathdir config.xml
Where a client side artifact is generated in the outputdir for running the service as defined in the config.xml file.
wscompile -gen:server -d outputdir -classpath classpathdir -model modelfile.Z config.xml
Where a server side artifact is generated in the outputdir and the modelfile in modelfile.Z for services defined in the config.xml file.