NAME
wscompile - generates stubs, ties,
serializers, and WSDL files used in JAX-RPC clients and services
SYNOPSIS
wscompile [options] configuration_file
Use the wscompile command to generate the client
stubs and server-side ties for the service definition interface that represents
the web service interface. Additionally, use the wscompile
command to generate 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.
- -cp path
-
location of the input class files.
- -classpath path
-
same as -cp path option.
- -d directory
-
where to place the generated output files.
- -define
-
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.
- -f:features
-
enables the given features. Features are specified as a comma
separated list of features. See the list of supported features below.
- -features:features
-
same as -f:features
option.
- -g
-
generates the
debugging information.
- -gen
-
generates the
client-side artifacts.
- -gen:client
-
same
as -gen option.
- -gen:server
-
generates
the server-side artifacts.
- -gen:both
-
generates
client and server artifacts.
- -httpproxy:host:port
-
specifies a HTTP proxy server; defaults to
port 8080.
- -import
-
reads a
WSDL file, generates the service's 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.
- -model
-
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.
- -keep
-
keeps the
generated files.
- -nd directory
-
directory for the non-class generated files.
- -O
-
optimizes the
generated code.
- -s directory
-
directory for the generated source files.
- -verbose
-
outputs
messages about what the compiler is doing.
- -version
-
prints
version information.
Exactly one of the -input, -define, -gen options must be specified.
- datahandleronly
-
always map attachments
to data handler type
- explicitcontext
-
turn on explicit
service context mapping.
- infix=name
-
specify an infix to use for generated serializers.
- nodatabinding
-
turn off data binding
for literal encoding.
- noencodedtypes
-
turn off encoding
type information.
- nomultirefs
-
turn off support for
multiple references.
- novalidation
-
turn off validation
for the imported WSDL file.
- searchschema
-
search schema aggresively
for subtypes.
- serializeinterfaces
-
turn on direct
serialization of interface types.
Note: the -gen options are not compatible
with wsdeploy.
The wscompile commands 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?>
<configuration
xmlns=http://java.sun.com/xml/ns/jax-rpc/ri/config>
<service> or <wsdl> or <modelfile>
</configuration>
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:
<service name="CollectionIF_Service"
targetNamespace="http://echoservice.org/wsdl"
typeNamespace="http://echoservice.org/types"
packageName="stub_tie_generator_test">
<interface name="stub_tie_generator_test.CollectionIF"
servantName="stub_tie_generator_test.CollectionImpl"/>
</service>
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:
<wsdl
location="http://tempuri.org/sample.wsdl"
packageName="org.tempuri.sample"/>
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:
<modelfile location="mymodel.Z"/>
Example 1. Using wscompile to generate client-side artifacts
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.
Example 2. Using wscompile to generate server-side artifacts
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.
wsdeploy(1M)
Sun Java System Application Server | Go To Top | Last Changed 29 Dec 2003 |