Generating Stub Code for a Java Client
Use the following steps to generate the stub code for a Java web services client application, using the wsimport tool that is included with the Java Development Kit.
-
Open an xterm or command prompt window and change to the directory that contains the wsimport program, usually JDK_install_dir/bin/.
-
At the command prompt, type wsimport -s source_dir -d classes_dir URL_TO_WSDL and press Enter.
For example, to generate stub classes for the SAAS version of the Named Resource Service, you might enter the following command:wsimport -s output/source -d output/classes http://dev.pb.com/NamedResourceService/services/NamedResourceService?wsdl
After the command has been executed, the generated source .java files are placed within the directory you specified with the -s option, and the compiled .class files are placed within the directory you specified with the -d option.
No comments:
Post a Comment