blob: 0e9c4875ef20912fd39eac19c7f178050a62eb4d [file] [log] [blame]
kprice6decb032008-04-01 19:05:41 +00001<?xml version="1.0" encoding="utf-8"?>
2<!--Arbortext, Inc., 1988-2006, v.4002-->
4 "../../dtd/task.dtd">
5<?Pub Inc?>
6<task id="tsklwsdla" xml:lang="en-us"><?Pub Caret?>
7<title>Creating a <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm"
8trademark="Java">Java</tm> bean skeleton from a WSDL document using the Apache
9Axis2 runtime environment</title>
11<searchtitle>Creating a Java bean skeleton from a WSDL document using the
12Apache Axis2 runtime environment</searchtitle>
14<shortdesc>The Web service wizard assists you in creating a skeleton bean
15from an existing WSDL document. The skeleton bean contains a set of methods
16that correspond to the operations described in the WSDL document. When the
17bean is created, each method has a trivial implementation that you replace
18by editing the bean.</shortdesc>
20<keywords><indexterm>Axis2 runtime environment<indexterm>skeleton Web services</indexterm></indexterm>
21<indexterm>Web services<indexterm>Axis2 runtime environment<indexterm>skeleton
22Web services</indexterm></indexterm></indexterm></keywords>
26<li conref="taxis2bu.dita#twsbeana/installaxis2link"></li>
27<li conref="taxis2bu.dita#twsbeana/createtomcatlink"></li>
28<li>Create or import a WSDL file into the Web Content folder of the Web project.
29You can only use a WSDL file that contains a service element.</li>
31<context>To create a Web service from a WSDL file using the Apache Axis2 runtime
34<step><cmd>Switch to the J2EE perspective (<uicontrol>Window > Open Perspective
35> J2EE</uicontrol>).</cmd></step>
36<step><cmd>In the Project Explorer view, select the WSDL file that you created
37or imported into the Web Content folder of your Web project.</cmd></step>
38<step><cmd>Click <uicontrol>File > New > Other</uicontrol>. Select <uicontrol>Web
39Services</uicontrol> in order to display the various Web service wizards.
40Select the <uicontrol>Web Service</uicontrol> wizard. Click <uicontrol>Next</uicontrol>.</cmd>
42<step><cmd>Web Services page: select <uicontrol>Top down Java bean Web service</uicontrol> as
43your Web service type, and enter the URI to the WSDL, WSIL, or HTML file that
44will be used to generate the service.</cmd>
45<substeps conref="taxis2bu.dita#twsbeana/createstep4ul">
49<step><cmd>Axis2 Web Service Skeleton <tm tmclass="special" tmowner="Sun Microsystems, Inc."
50tmtype="tm" trademark="Java">Java</tm> Bean Configuration page: Select the
51folder where the generated <tm tmclass="special" tmowner="Sun Microsystems, Inc."
52tmtype="tm" trademark="Java">Java</tm> will be stored. If you want to review
53or edit the mappings between packages and namespaces, select the <uicontrol>Define
54custom mapping for namespace to package</uicontrol> check box. Click <uicontrol>Next</uicontrol>.</cmd>
56<substep><cmd>Service Name: accept the default.</cmd></substep>
57<substep><cmd>Port Name:accept the default.</cmd></substep>
58<substep><cmd>Databinding Name: Only the Axis2 Databinding Framework (ADB)
59is supported at this time.</cmd></substep>
60<substep><cmd>Custom package name: You can change the package name in this
62<substep><cmd>Generate an Interface for Skeleton</cmd></substep>
63<substep><cmd>Generate all types for all elements referred by schemas</cmd>
65<substep><cmd>Namespace to package mapping: Use this table to review or edit
66the mappings between packages and namespaces.</cmd></substep>
69<step><cmd>Test Web Service page: If you selected to test the Web service,
70select the test facility for the generated Web service. This will open the
71Web service in the Web Services Explorer. Select the operation you want to
72test, enter the required information, and click <uicontrol>Go</uicontrol>.
73The result will display in the Status pane. Click <uicontrol>Next</uicontrol>.</cmd>
75<step conref="taxis2bu.dita#twsbeana/axis2clientpagelink"><cmd>Axis2 Client
76Web service configuration page: Use this page to select the following options: </cmd>
78<substep><cmd>Service Name: </cmd></substep>
79<substep><cmd>Port Name: </cmd></substep>
80<substep><cmd>Databinding Name: Only the Axis2 Databinding Framework (ADB)
81is supported at this time.</cmd></substep>
82<substep><cmd>Custom package name: You can change the package name in this
84<substep><cmd>Client mode: You can choose if the client is synchronous, asynchronous,
85or both.</cmd></substep>
86<substep><cmd>Generate test case to test the service: If you select this,
87the Axis2 emitter will generate JUnit testcases matching the WSDL provided
88to the client. These JUnit testcases will be generated to a newly added source
89directory to the client project called <uicontrol>test</uicontrol>. </cmd>
91<substep><cmd>Generate all types for all elements referred by schemas:</cmd>
93<substep><cmd>Namespace to package mapping: Use this table to review or edit
94the mappings between packages and namespaces.</cmd></substep>
97<step><cmd>Web Service Client Test page: Use this page to select the following
98options: </cmd>
100<substep><cmd>Select your test facility. You can test the generated proxy
101in the Web Service Explorer, or the Universal Test Client.</cmd></substep>
102<substep><cmd>Select <uicontrol>Run test on server</uicontrol> to start the
103server for you automatically.</cmd></substep>
106<step><cmd>Web Service Publication page: If you have selected to publish your
107Web service to a UDDI registry, use this page to launch the Web Services Explorer
108and select the UDDI registry to which the Web service will be published. Click
109 <uicontrol>Finish</uicontrol>.</cmd></step>
111<result conref="taxis2bu.dita#twsbeana/axiswscreateresult">After the Web service
112has been created, the following may occur depending on the options you selected: <ul>
113<li>If you have selected to test the generated proxy using Web service JSPs,
114the proxy is launched in a Web browser at the following URL: <codeph>http://localhost: <varname>port</varname>/ <varname>WebProject</varname>Client/sample<i
115>BeanName</i>/<varname>WebServiceName</varname>/TestClient.jsp</codeph> You
116can use this sample application to test the Web service by selecting a method,
117entering a value for the method, and clicking <uicontrol>Invoke</uicontrol>.
118The result of the method will display in the results pane.</li>
119<li>If you have selected to test the Web service using the Web Services Explorer,
120the Explorer will open. Select the operation you want to test, enter the required
121information, and click <b>Go</b>. The result will display in the Status pane.</li>
122<li>If you have selected to publish the Web service, the Web Services Explorer
123is launched displaying the page required to publish your Web service. Follow
124the instructions in <varname>Publishing the Web service</varname> to complete
125this task.</li>
129<linklist><title>Related Concepts</title>
130<link href="../../" scope="peer">
131<linktext> Tools for Web services development</linktext></link>
132<link href="../../" scope="peer">
133<linktext>Web services development</linktext></link>
135<linklist><title>Related Tasks</title>
136<link href="../../" scope="peer">
137<linktext> Developing Web services</linktext></link>
138<link href="../../"
139scope="peer"><linktext> Using the Web Services Explorer</linktext></link>
143<?Pub *0000007842?>