| <?xml version="1.0" encoding="utf-8"?> |
| <!--Arbortext, Inc., 1988-2005, v.4002--> |
| <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" |
| "../../dtd/task.dtd"> |
| <task id="tsklwsdla" xml:lang="en-us"> |
| <title>Creating a <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm" |
| trademark="Java">Java</tm> bean skeleton from a WSDL document using the Apache |
| Axis run-time environment</title> |
| <titlealts> |
| <searchtitle>Creating a Java bean skeleton from a WSDL document using the |
| Apache Axis run-time environment</searchtitle> |
| </titlealts> |
| <shortdesc>The Web service wizard assists you in creating a skeleton bean |
| from an existing WSDL document. The skeleton bean contains a set of methods |
| that correspond to the operations described in the WSDL document. When the |
| bean is created, each method has a trivial implementation that you replace |
| by editing the bean.</shortdesc> |
| <prolog><metadata> |
| <keywords><indexterm>Axis runtime environment<indexterm>skeleton Web services</indexterm></indexterm> |
| <indexterm>Web services<indexterm>Axis runtime environment<indexterm>skeleton Web services</indexterm></indexterm></indexterm> |
| </keywords> |
| </metadata></prolog> |
| <taskbody> |
| <prereq><p>Prerequisites:</p><ol> |
| <li conref="twsbeana.dita#twsbeana/createtomcatlink"></li> |
| <li>Create or import a WSDL file into the Web Content folder of the Web project. |
| You can only use a WSDL file that contains a service element.</li> |
| </ol></prereq> |
| <context>To create a Web service from a WSDL file using the Apache Axis run-time |
| environment:</context> |
| <steps> |
| <step><cmd>Switch to the J2EE perspective (<uicontrol>Window > Open Perspective |
| > J2EE</uicontrol>).</cmd></step> |
| <step><cmd>In the Project Explorer view, select the WSDL file that you created |
| or imported into the Web Content folder of your Web project.</cmd></step> |
| <step><cmd>Click <uicontrol>File > New > Other</uicontrol>. Select <uicontrol>Web |
| Services</uicontrol> in order to display the various Web service wizards. |
| Select the <uicontrol>Web Service</uicontrol> wizard. Click <uicontrol>Next</uicontrol>.</cmd> |
| </step> |
| <step><cmd>Web Services page: select <uicontrol>Top down Java bean Web service</uicontrol> as |
| your Web service type, and select the artifact from which the service will |
| be created.</cmd> |
| <substeps conref="twsbeana.dita#twsbeana/createstep4ul"> |
| <substep><cmd></cmd></substep> |
| </substeps> |
| </step> |
| <step><cmd>Web Services Skeleton <tm tmclass="special" tmowner="Sun Microsystems, Inc." |
| tmtype="tm" trademark="Java">Java</tm> Bean Configuration page: Select the |
| folder where the generated <tm tmclass="special" tmowner="Sun Microsystems, Inc." |
| tmtype="tm" trademark="Java">Java</tm> will be stored. If you want to review |
| or edit the mappings between packages and namespaces, select the <uicontrol>Define |
| custom mapping for namespace to package</uicontrol> check box. Click <uicontrol>Next</uicontrol>.</cmd> |
| </step> |
| <step><cmd>Web Service Namespace to Package Mappings page: if you selected |
| <uicontrol>Define custom mapping for package to namespace</uicontrol> on |
| the previous panel, you can enter your custom mapping pairs on this panel |
| by clicking <uicontrol>Add</uicontrol>. Alternately, you can click <b>Import</b> to |
| import custom mapping pairs from a <systemoutput>.properties</systemoutput> file. |
| The content of the properties file must be of the format <codeph><varname>namespace=package</varname></codeph>. |
| Click <uicontrol>Next</uicontrol>.</cmd></step> |
| <step><cmd>Web Service Test page: If you selected to test the Web service, |
| select the test facility for the generated Web service. This will open the |
| Web service in the Web Services Explorer. Select the operation you want to |
| test, enter the required information, and click <uicontrol>Go</uicontrol>. |
| The result will display in the Status pane. Click <uicontrol>Next</uicontrol>.</cmd> |
| </step> |
| <step><cmd>Web Service Proxy page: If you have selected to generate a proxy, |
| this page shows the options for the proxy. It lists the folder where the proxy |
| will be generated, and you can optionally create custom mappings between namespaces |
| and packages. Click <uicontrol>Next</uicontrol>.</cmd></step> |
| <step><cmd>Web Service Client Test page: Use this page to select the following |
| options: </cmd> |
| <substeps> |
| <substep><cmd>Select your test facility. You can test the generated proxy |
| in the Web Service Explorer, or you can generate a sample Web service JSP.</cmd> |
| </substep> |
| <substep><cmd>If you selected to test the proxy through a JSP, you can select |
| the folder where the JSP will be located, and you can select the methods that |
| will be included in the JSP.</cmd></substep> |
| <substep><cmd>Select <uicontrol>Run test on server</uicontrol> to start the |
| server for you automatically.</cmd></substep> |
| </substeps> |
| </step> |
| <step><cmd>Web Service Publication page: If you have selected to publish your |
| Web service to a UDDI registry, use this page to launch the Web Services Explorer |
| and select the UDDI registry to which the Web service will be published. Click |
| <uicontrol>Finish</uicontrol>.</cmd></step> |
| </steps> |
| <result conref="twsbeana.dita#twsbeana/axiswscreateresult">After the Web service |
| has been created, the following may occur depending on the options you selected: <ul> |
| <li>If you have selected to test the generated proxy using Web service JSPs, |
| the proxy is launched in a Web browser at the following URL: <codeph>http://localhost: <varname>port</varname>/ <varname>WebProject</varname>Client/sample<i |
| >BeanName</i>/<varname>WebServiceName</varname>/TestClient.jsp</codeph> You |
| can use this sample application to test the Web service by selecting a method, |
| entering a value for the method, and clicking <uicontrol>Invoke</uicontrol>. |
| The result of the method will display in the results pane.</li> |
| <li>If you have selected to test the Web service using the Web Services Explorer, |
| the Explorer will open. Select the operation you want to test, enter the required |
| information, and click <b>Go</b>. The result will display in the Status pane.</li> |
| <li>If you have selected to publish the Web service, the Web Services Explorer |
| is launched displaying the page required to publish your Web service. Follow |
| the instructions in <varname>Publishing the Web service</varname> to complete |
| this task.</li> |
| </ul></result> |
| </taskbody> |
| <related-links> |
| <linklist><title>Related Concepts</title> |
| <link href="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.dita" scope="peer"> |
| <linktext> Tools for Web services development</linktext></link> |
| <link href="../../org.eclipse.jst.ws.doc.user/concepts/cws.dita" scope="peer"> |
| <linktext>Web services development</linktext></link> |
| </linklist> |
| <linklist><title>Related Tasks</title> |
| <link href="../../org.eclipse.jst.ws.doc.user/tasks/toverws.dita" scope="peer"> |
| <linktext> Developing Web services</linktext></link> |
| <link href="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.dita" |
| scope="peer"><linktext> Using the Web Services Explorer</linktext></link> |
| </linklist> |
| <linklist><title>Related Reference</title> |
| <link href="../../org.eclipse.jst.ws.doc.user/ref/rwsdl.dita" scope="peer"> |
| <linktext>WSDL documents</linktext></link> |
| </linklist> |
| </related-links> |
| </task> |