Hitachi

Hitachi Application Server V10 Command Reference Guide (For UNIX® Systems)


2.2.8 wsgen

Generates the JAX-WS portable artifacts used in the JAX-WS web services.

Synopsis

wsgen [OPTION]... <SEI>

    OPTION:
    [-classpath path]
    [-cp path]
    [-d directory]
    [-extension={false|true}]
    [-help]
    [-keep={false|true}]
    [-r directory]
    [-s directory]
    [-encoding encoding]
    [-verbose={false|true}]
    [-version]
    [--fullversion]
    [-wsdl[:protocol]]
    [-servicename name]
    [-portname name]
    [-inlineSchemas={false|true}]
    [-x path]

Storage location

Application Server installation directory/javaee/glassfish/bin

Function

The wsgen command generates the JAX-WS portable artifacts used in the JAX-WS Web services. The tool reads a Web service endpoint class and generates all the required artifacts for Web service deployment and invocation.

Execution permission

Superuser

Files

The tool reads a web service endpoint class and generates JAX-WS portable artifacts used in JAX-WS web services.

Arguments

-classpath path | -cp path

Specifies where to find the input class files.

Type: String

The following values can be specified:

  • Path of the input class files

Default value: N/A

-d directory

Specifies where to place the generated output files.

Type: String

The following values can be specified:

  • Directory path to place output files

Default value: N/A

-extension={false|true}

Allows vendor extensions. Use of extensions may result in applications that are not portable or may not interoperate with other implementations.

Type: Boolean

The following values can be specified:

  • true

  • false

Default value: false

-help

Displays help.

-keep={false|true}

Stores the generated files.

Type: Boolean

The following values can be specified:

  • true

  • false

Default value: false

-r directory

Specifies where to place the generated resource files such as WSDLs.

Used only in conjunction with the -wsdl option.

Type: String

The following values can be specified:

  • Directory path to place output files

Default value: N/A

-s directory

Specifies where to place the generated source files.

Type: String

The following values can be specified:

  • Directory path to place output files

Default value: Current working directory

-encoding encoding

Sets the encoding name for generated sources, such as, EUC-JP or UTF-8. If -encoding is not specified, the platform default encoding is used.

Type: String

The following values can be specified:

  • UTF-8

  • EUC-JP

Default value: N/A

-verbose={false|true}

Outputs messages about the compiler actions.

Type: Boolean

The following values can be specified:

  • true

  • false

Default value: false

-version

Prints the version information.

-fullversion

Prints the full version information.

-wsdl[:protocol]

By default, it does not generate a WSDL file.

This flag is optional and will cause wsgen to generate a WSDL file and is usually only used, so that the developers can look at the WSDL before the endpoint is deployed. The protocol is optional and is used to specify what protocol should be used in the wsdl:binding.

Valid protocols include:

  • soap1.1

  • Xsoap1.2

The default is soap1.1. Xsoap1.2 is not standard and can only be used in conjunction with the -extension option.

Type: String

The following values can be specified:

  • soap1.1

  • Xsoap1.2

Default value: soap1.1

-servicename name

Specifies a particular wsdl:service name to be generated in the WSDL. For example: -servicename "{http://mynamespace/}MyService"

Used only in conjunction with the -wsdl option.

Type: String

The following values can be specified:

  • Service name

Default value: N/A

-portname name

Specifies a particular wsdl:port name to be generated in the WSDL. For example: -portname "{http://mynamespace/}MyPort"

Used only in conjunction with the -wsdl option.

Type: String

The following values can be specified:

  • Name of the port

Default value: N/A

-inlineSchemas={false|true}

Inlines the schemas in a generated wsdl.

Must be used in conjunction with the -wsdl option.

Type: Boolean

The following values can be specified:

  • true

  • false

Default value: false

-x path

Specifies the External Web Service Metadata xml descriptor to be used.

If there are more descriptor files then the option must be used before each descriptor file.

Type: String

The following values can be specified:

  • Path to the file

Default value: N/A

Examples

This will generate the wrapper classes needed for StockService annotated with @WebService annotation inside the stock directory.

wsgen -d stock -cp myclasspath stock.StockService

Exit Status

Exit Status

Explanation

0

subcommand executed successfully.

1

error in executing the subcommand.