wsgen(1)
π 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 π
-classpathpath β the location of the input class files.-cppath β the location of the input class files. (yes bestie, it's the same thing, it's giving twin energy π―)-ddirectory β 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 thewsgencommand.-keepβ keeps the generated files.-rdirectory β uses this option with the-wsdloption to specify where to place generated resource files such as WSDLs.-sdirectory β 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.
-servicenamename β used only with the-wsdloption to specify a particular WSDL service (wsdl:service) name to be generated in the WSDL, for example:-servicename "{http://mynamespace/}MyService".-portnamename β used only with the-wsdloption 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 π
wsimport(1)- the Tools tab of the JAX-WS (wsgen) page
http://jax-ws.java.net/nonav/2.1.1/docs/wsgenant.html
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
- Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms