JwsCompile Command

The JwsCompile tool compiles one or more web services in a WebLogic Workshop project. Optionally, JwsCompile may produce either: 1) an EAR file (containing multiple web services) that may be deployed to a production server; or 2) a CTRL file or WSDL file from a single web service; or 3) a CTRL file from a WSDL file.

 

Syntax

JwsCompile -a [ -f -nowarn -p -v -x ]


JwsCompile [ -f -nowarn -p -v ] <JWS File Name>
JwsCompile -a -ear [ -app -f -hostname -http-port -https-port -nowarn -p -protocol -t -v -x <JWS File Name>]
JwsCompile -ctrl [ -f -hostname -http-port -https-port -nowarn -out -p -protocol -v ] <JWS File Name>
JwsCompile -wsdl [ -f -hostname -http-port -https-port -nowarn -out -p -protocol -v ] <JWS File Name>

Parameters

-a

Specifies that all JWS files in the project should be compiled.

-app <Application Name>

Specifies the name of the application. See A Web Service's URL below. Do not include leading or trailing slashes ('/') in <Application Name>.

-ctrl

Generates a CTRL file from the specified JWS or WSDL file.  The CTRL file defines a WebLogic Workshop Service control.

-default

When used with the -ear parameter, specifies that the EAR file should be deployed as the default application on the production server.  For example, an application compiled by the following command
jwsCompile -ear HelloWorld.ear -app HelloWorld HelloWorld.jws
will be accessed on the production server through the following URL
     http://myProductionServer:7001/HelloWorld/HelloWorld.jws

But an application compiled by the following command
jwsCompile -ear HelloWorld.ear -default HelloWorld.jws

will be accessed on the production server through the following URL
http://myProductionServer:7001/HelloWorld.jws

-ear <Output EAR file>

Specifies the name of the EAR file to be produced. May include an absolute path or a path relative to the current directory on the command line. No EAR file is produced if the -ear argument is not present.

Since -ear is typically used to generate an EAR file containing web services to be deployed to a different destination server, the URL of the web services on the destination server should be specified either in weblogic-jws-config.xml or by use of a cobination of the -protocol, -hostname, -http-port, -https-port and -app arguments.

-f

Forces compilation of a JWS file(s) even it is believed to be up to date.  Use in conjunction with the -t parameter

-hostname <Hostname>

Specifies the hostname to use in the URL of each web service in the project. Overrides any values specified in weblogic-jws-config.xml. Default value is the hostname of the host on which JwsCompile is run.

-http-port <Port Number>

Specifies the port to use in the URL of each HTTP-bound web service in the project. Overrides any values specified in weblogic-jws-config.xml. Default value is 7001.

-https-port <Port Number>

Specifies the port to use in the URL of each HTTPS-bound web service in the project. Overrides any values specified in weblogic-jws-config.xml. Default value is 7002.

-nowarn

Disables warnings.

-out <Output File>

Specifies the name of the output file for -ctrl and -wsdl. May include an absolute path or a path relative to the directory in which jwsCompile is run.

-p <Project Directory>

Specifies where project sources are. May be an absolute path or a path relative to the directory in which JwsCompile is run.

-protocol <http | https>

Specifies the protocol to use in the URL of each web service in the project. Overrides the global <protocol> value specified in weblogic-jws-config.xml.  However, -protocol will be overridden by individual <jws><protocol> specifications in weblogic-jws-config.xml.  Default value is http.

-t <Target Directory>

Specifies the destination directory for partial results of JwsCompile. Generated EAR, CTRL and WSDL files are not placed in <Target Directory>; the location of those files is specified by the -out argument. If the same <Target Directory> is specified for subsequent invocations of JwsCompile, any up-to-date compilation products in the <Target Directory> are reused and the associated source files are be recompiled.

If -t is not specified, a temporary directory is created for partial compilation results. The directory is deleted upon completion of JwsCompile.

-v

Reports progress verbosely.

-wsdl

Generates a WSDL file from the specified JWS file.

-x <Exclude JWS>

When -a is specified, indicates that <Exclude JWS> should be excluded from compilation. Multiple -x arguments may be specified.

<JWS File Name>

The name of the JWS file to compile. Only one JWS file may be specified, except when used with the -ear flag.  In that case, multiple JWS files can be specified.

Remarks

JwsCompile may be used for several purposes.  Typical uses are listed below:

JwsCompile may be invoked from anywhere within a WebLogic Workshop project directory; it determines the root of the project directory by traversing up the directory hierarchy until it locates a WEB-INF folder.

Note: JwsCompile does not "cook" the deployed JWSs in the project on the development server. The only product of JwsCompile is a CTRL, WSDL or EAR file at the location specified by -out or -ear, and possibly partial compilation products in the directory specified by -t.

A Web Service's URL

The URL of a web service is of the form:

protocol://host:port/application/service.jws

The following JwsCompile arguments control the specified portions of the deployed web services' URLs:

-protocol specifies "protocol"

-hostname specifies "host"

-http-port or -https-port specifies "port"

-app specifies "application"

 

Related Topics

weblogic-jws-config.xml Configuration File