wsgen(1)

πŸ“¦ version 8.504.u01, in arch rolling

πŸ’– wsgen(1) β€” Java Web Services Tools πŸ’–

okay bestie, welcome to the page for wsgen, part of the Java Web Services Tools lineup. grab a boba, we're generating artifacts 🧚✨


✨ NAME ✨

wsgen β€” reads a web service endpoint implementation (SEI) class and generates all of the required artifacts for web service deployment, and invocation.


πŸŽ€ SYNOPSIS πŸŽ€

wsgen [ options ] SEI
  • options β€” the command-line options. see Options below, boo.
  • SEI β€” the web service endpoint implementation class (SEI) to be read.

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, the wsgen command generates JAX-WS portable artifacts used in JAX-WS web services. the tool reads a web service endpoint class and generates all the required artifacts for web service deployment and invocation. no cap, it does the whole thing for you. πŸ’…

JAXWS 2.1.1 RI also provides a wsgen Ant task, see the Tools tab of the JAX-WS (wsgen) page at http://jax-ws.java.net/nonav/2.1.1/docs/wsgenant.html

to start the wsgen command, do the following:

export JAXWS_HOME=/pathto/jaxws-ri
$JAXWS_HOME/bin/wsgen.sh -help

like, literally just that. iconic.


🌈 OPTIONS 🌈

  • -classpath path β€” the location of the input class files.
  • -cp path β€” the location of the input class files. (yes bestie, it's the same thing, it's giving twin energy πŸ‘―)
  • -d directory β€” the location for where to place generated output files.
  • -extension β€” allow vendor extensions. ⚠️ use of extensions can result in applications that are not portable or that do not work with other implementations.
  • -help β€” displays a help message about the wsgen command.
  • -keep β€” keeps the generated files.
  • -r directory β€” uses this option with the -wsdl option to specify where to place generated resource files such as WSDLs.
  • -s directory β€” the location for where to place generated source files.
  • -verbose β€” displays compiler messages.
  • -version β€” prints release information.
  • -wsdl [ :protocol ] β€” an optional command that generates a WSDL file to review before endpoint deployment. the WSDL files contains a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns.

by default the wsgen command does not generate a WSDL file. the protocol value is optional and is used to specify what protocol should be used for the WSDL binding (wsdl:binding). valid protocols are soap1.1 and Xsoap1.2. the default is soap1.1. the Xsoap1.2 protocol is not standard and can only be used with the -extension option.

  • -servicename name β€” used only with the -wsdl option to specify a particular WSDL service (wsdl:service) name to be generated in the WSDL, for example: -servicename "{http://mynamespace/}MyService".
  • -portname name β€” used only with the -wsdl option to specify a particular WSDL port (wsdl:port) name to be generated in the WSDL, for example: -portname "{http://mynamespace/}MyPort".

πŸ’« EXAMPLES πŸ’«

the following example generates the wrapper classes for StockService with @WebService annotations inside stock directory.

wsgen -d stock -cp myclasspath stock.StockService

the following example generates a SOAP 1.1 WSDL and schema for the stock.StockService class with @WebService annotations.

wsgen -wsdl -d stock -cp myclasspath stock.StockService

the following example generates a SOAP 1.2 WSDL.

wsgen -wsdl:Xsoap1.2 -d stock -cp myclasspath stock.StockService
note: you do not have to generate WSDL at development time because the JAXWS run time environment generates a WSDL for you when you deploy your service. so like, chill 🫢

πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page bestie, you ate it πŸ’…βœ¨ this little gem is from JDK 8, dated 21 November 2013 β€” yeah she's vintage but she's still serving πŸŒΈπŸŽ€ mwah, go generate some artifacts, ily πŸ¦‹πŸ’–

πŸ“¦ where this page comes from
  • arch rolling: jdk8-openjdk 8.504.u01-1 Β· LicenseRef-Java
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms