Skip to main content
summaryrefslogtreecommitdiffstats
blob: d20f70ad8f6e5bd9a0eec4302aa34146e63424b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="task" name="DC.Type" />
<meta name="DC.Title" content="Generating a Java client proxy and a sample application from a WSDL document using the Axis1 runtime environment" />
<meta name="abstract" content="The Web Service Client wizard assists you in generating a Java bean proxy and a sample application. The sample Web application demonstrates how to code a proxy file." />
<meta name="description" content="The Web Service Client wizard assists you in generating a Java bean proxy and a sample application. The sample Web application demonstrates how to code a proxy file." />
<meta content="Axis runtime environment, Web services, clients, Web service clients" name="DC.subject" />
<meta content="Axis runtime environment, Web services, clients, Web service clients" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/caxistover.html" />
<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.html" />
<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cws.html" />
<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.html" />
<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/ref/rwsdl.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="tsampappa" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>Generating a Java client proxy and a sample application from
a WSDL document using the Axis runtime environment</title>
</head>
<body id="tsampappa"><a name="tsampappa"><!-- --></a>


<h1 class="topictitle1">Generating a Java client proxy and a sample application
from a WSDL document using the Axis1 runtime environment</h1>




<div><p>The Web Service Client wizard assists you in generating a Java™ bean
proxy and a sample application. The sample Web application demonstrates how
to code a proxy file.</p>

<div class="p"><p>Prerequisites:</p>
<ol>
<li>If you are using the Apache Jakarta Tomcat servlet
container as your server, you must install it, configure an instance of it,
and create a Web project targeted to it as described in <a href="ttomcatserv.html">Creating an Apache Tomcat server and Web project</a></li>

<li>Discover and import a WSDL document into the Web project. You can only
use a WSDL file that contains a service element.</li>

</ol>
</div>

<div class="section">To generate a Java client proxy and a sample application
from a discovered WSDL document:</div>

<ol>
<li class="stepexpand"><span>Switch to the Java EE perspective (<span class="uicontrol">Window &gt; Open Perspective
&gt; Java EE</span>).</span></li>

<li class="stepexpand"><span>In the Navigator view, select the Web project in which you want
to generate a sample application.</span></li>

<li class="stepexpand"><span>Click  <span class="uicontrol">File &gt; New &gt; Other</span>. Select  <span class="uicontrol">Web
Services</span> in order to display the various Web service wizards.
Select the  <span class="uicontrol">Web Service Client</span> wizard. Click  <span class="uicontrol">Next</span>.</span>
</li>

<li class="stepexpand"><span>Web Services page: </span>
<ol type="a">
<li class="substepexpand"><span>Enter the URI to the WSDL, WSIL, or HTML file that will be used
to generate the client.</span></li>

<li class="substepexpand"><span>Select the type of proxy to be generated</span></li>

<li class="substepexpand"><span>Select the stages of Web services development that you want
to complete using the slider:</span> <ul>
<li>Develop: this will develop the WSDL definition and implementation of the
Web service. This includes such tasks as creating the modules which will contain
the generated code and Java files, as well as copying the Axis JARs..</li>

<li>Assemble: this ensures the project that will host the Web service or client
gets associated to an EAR when required by the target application server.</li>

<li>Deploy: this will create the deployment code for the service.</li>

<li>Install: this will install and configure the Web module and EARs on the
target server.</li>

<li>Start: this will start the server once the service has been installed
on it. The server-config.wsdd file will be generated.</li>

<li>Test: this will provide various options for testing the service, such
as using the Web Service Explorer or sample JSPs.</li>

</ul>
</li>

<li class="substepexpand"><span>Select your server: the default server is displayed. If you
want to deploy your client to a different server click the link to specify
a different server.</span></li>

<li class="substepexpand"><span>Select your runtime: the default runtime is displayed. If you
want to deploy your client to a different runtime click the link to specify
a different runtime.</span></li>

<li class="substepexpand"><span>Select the client project: the project containing the project
selected in your workspace is displayed. To select a different project and
EAR click on the project link.</span> Ensure that the project selected
as the Client Web Project is different from the Service Web Project, or the
service will be overwritten by the client's generated artifacts.</li>

<li class="substepexpand"><span>Monitor the Web service: this will send the Web service traffic
through the TCP/IP Monitor, which allows you to watch the SOAP traffic generated
by the Web service and to test this traffic for WS-I compliance. Alternately
you can manually set up a TCP/IP monitor as described in <a href="../../org.eclipse.wst.wsi.ui.doc.user/tasks/tmonitor.html">Using the TCP/IP Monitor to test Web services</a></span></li>

</ol>

</li>

<li class="stepexpand"><span>Web Service Proxy page: This panel 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.</span></li>

<li class="stepexpand"><span>Web Service Namespace to Package Mappings page: if you selected
 <span class="uicontrol">Define custom mapping for namespace to package</span> on
the previous page, you can enter your custom mapping pairs on this page by
clicking  <span class="uicontrol">Add</span>. Alternately, you can click  <strong>Import</strong> to
import custom mapping pairs from a  <tt class="sysout">.properties</tt> file.
The content of the properties file must be of the format  <samp class="codeph"><var class="varname">namespace=package</var></samp>.</span>
 You will need to escape some special characters in the properties files.
 For example <samp class="codeph">http://someNamespace=somePackage</samp> should be <samp class="codeph">http\://someNamespace=somePackage</samp>.
 Otherwise, the colon (:) would be treated as delimiter resulting in trying
to map <samp class="codeph">http</samp> to <samp class="codeph">//someNamespace=somePackage</samp>.
</li>

<li class="stepexpand"><span>Web Service Client Test page: This page displays if you selected
to test your client. Select the test facility that you will use to test the
proxy, and the methods that you want included in the proxy. Note that the
Universal Test Client (UTC) is only compatible with Web service clients deployed
on WebSphere<sup>®</sup> servers.</span>
</li>

<li class="stepexpand"><span>Click  <span class="uicontrol">Finish</span>. If you have selected to test
the proxy, the test client will open in a browser window.</span></li>

</ol>

<div class="section"><p>The generated Java bean proxy provides a remote procedure
call interface to the Web service. The sample Web application demonstrates
how to code the proxy file.</p>
<p>Once you have generated your Java client
proxy, you may test the methods of the Web service through the proxy using
Web Services sample JSPs or the Universal test client.</p>
<ul class="wsclienttestoptions">
<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: <samp class="codeph">http://localhost: <var class="varname">port</var>/ <var class="varname">WebProject</var>Client/sample<em>BeanName</em>/ <var class="varname">WebServiceName</var>/TestClient.jsp</samp> You
can use this sample application to test the Web service by selecting a method,
entering a value for the method, and clicking  <span class="uicontrol">Invoke</span>.
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  <strong>Go</strong>. The result will display in the Status pane.</li>

</ul>
<p>For more information on creating a Web project, refer to the Web application
development documentation.</p>
</div>

</div>

<div><div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="../topics/caxistover.html" title="This runtime environments is for users who prefer to develop for the open Apache Axis platform.">Creating Web services with the Apache Axis1 runtime environment</a></div>
</div>

<div class="linklist"><strong>Related Concepts</strong><br />

<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.html"> Tools for Web services development</a></div>
<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cws.html">Web services development</a></div></div>

<div class="linklist"><strong>Related Tasks</strong><br />

<div><a href="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.html"> Using the Web Services Explorer</a></div></div>

<div class="linklist"><strong>Related Reference</strong><br />

<div><a href="../../org.eclipse.jst.ws.doc.user/ref/rwsdl.html">WSDL documents</a></div></div>
</div>

</body>
</html>

Back to the top