ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatz_5.4.0.1/51/webserv/wsdevwsdl.htm

47 lines
2.8 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Develop a Web Services Description Language (WSDL) file</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h3><a name="wsdevwsdl"></a>Develop a Web Services Description Language (WSDL) file</h3>
<p>You need a Web Services Description Language (WSDL) file to use Web services. You can develop your own WSDL file or get one from a Web service provider. This documentation assumes you are creating your own.</p>
<p>WebSphere Application Server provides a utility, the Java2WSDL script, that generates a WSDL file for your Web service based on your application code.</p>
<p>To generate a WSDL file for your Web service, follow these steps:</p>
<ol>
<li><p>On the CL command line, run the Start Qshell (STRQSH) command to start Qshell.</p></li>
<li><p>Update your CLASSPATH environment variable to include the location of the Service Endpoint Interface class and other referenced classes, for example:</p>
<pre>export -s CLASSPATH=/myapp/myclass.class:/myapp/myjar.jar</pre></li>
<li><p>Run the Java2WSDL command, for example:</p>
<pre>Java2WSDL <em>seiInterface</em></pre>
<p>where <em>seiInterface</em> is the name of your Service Endpoint Interface class. For more information, see <a href="qshjava2wsdl.htm">The Java2WSDL script</a>.</p>
<p>A WSDL file named <em>seiInterface</em>.wsdl is created.</p></li>
<li><p>Edit the generated WSDL file and inspect the part names.
<br>The WSDL parts have names like <tt>arg_0_0</tt>. Modify the WSDL file to use the actual names of the Java parameters.</p></li>
<li><p>Move the WSDL file into the wsdl subdirectory of your WAR file:</p>
<ul>
<li>Move the WSDL file to the WEB-INF/wsdl subdirectory if you are using a Java bean.</li>
</ul><p></p></li>
</ol>
<p><strong>Note:</strong> If your class file is compiled with debugging information and it is not an interface, you can automatically generate and set the correct part names with the Java2WSDL command tool.</p>
<p>Generating and setting the part names is done by providing additional information to the Java2WSDL command in the form of a Java implementation class that implements the same methods as the Service Endpoint Interface and is compiled with debug information on (javac -g). Parameter names are stored in the class file with the debugging information. If your implementation class was compiled with debugging information, you can use the Java2WSDL -implClass <em>seiImpl</em> <em>seiInterface</em> command to generate a WSDL file having the proper part names. For more information, see <a href="qshjava2wsdl.htm">The Java2WSDL script</a>.</p>
</body>
</html>