Name
java2ws - uses a Web service endpoint's implementation (SEI) class and associated types classes to generate a WSDL file, wrapper bean ,server side code used to start this web service and client side code.(Under development)
Synopsis
No Format |
---|
java2ws -databinding <jaxb or aegis> -frontend <jaxws or simple> -wsdl -wrapperbean -client -server -ant -o <output-file> -d <resource-directory> -classdir <compile-classes-directory> -cp <class-path> -soap12 -t <target-namespace> -beans <ppathname of the bean definition file>* -servicename <service-name> -portname <port-name> -createxsdimports -h -v -verbose -quiet {classname} |
Description
java2ws uses a Web service endpoint's implementation (SEI) class and associated types classes to generate a WSDL file, wrapper bean ,server side code used to start this web service and client side code.
Example
java2ws -wsdl -d ./resource org.apache.hello_world_soap_http.Greeter
java2ws -cp ./tmp org.apache.hello_world_soap_http.Greeter -wsdl
java2ws -o hello.wsdl -wsdl org.apache.hello_world_soap_http.Greeter
java2ws -client -server -s ./src org.apache.hello_world_soap_http.Greeter
java2ws -wrapperbean -classdir ./classes org.apache.hello_world_soap_http.Greeter
Arguments
Options
The options The arguments used to manage the code generation process are reviewed in the following table.
...
You must include the classname
argument. All other arguments are optional and may be listed in any order. This tool will search and load the service endpoint class and types classes. Make certain these classes are on the CLASSPATH
or in a location identified through the -cp
flag. If none of "-wsdl , - wrapperbean, -client, -server" flags are specified, java2ws will generate nothing.
Anchor | ||||
---|---|---|---|---|
|
Examples
java2ws -wsdl -d ./resource org.apache.hello_world_soap_http.Greeter
java2ws -cp ./tmp org.apache.hello_world_soap_http.Greeter -wsdl
java2ws -o hello.wsdl -wsdl org.apache.hello_world_soap_http.Greeter
java2ws -client -server -s ./src org.apache.hello_world_soap_http.Greeter
java2ws -wrapperbean -classdir ./classes org.apache.hello_world_soap_http.Greeter
Using java2ws with Ant
The java2ws command can be wrapped inside an Ant target as shown below:
...
Make sure you set the "fork=true" attribute for the <java/> task as shown above. Also, remember to keep each word or flag within the command line options in its own <arg/> element (e.g., do not use <arg value="-o hello.wsdl"/>, but split them up into two <arg/> elements as done here.)
See Also
wsdl2java, wsdl2js, java2js, xsd2wsdl, wsdl2xml, idl2wsdl, wsdl2soap, wsdl2corba,wsdl2service, and wsdlvalidator.