blob: 43a973e4e5095cbce240b059d718d75a21b96ee1 [file] [log] [blame]
<?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, 2007 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, 2007" />
<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="Creating a Java bean skeleton from a WSDL document using the Apache Axis run-time environment" />
<meta name="abstract" content="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." />
<meta name="description" content="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." />
<meta content="Axis runtime environment, skeleton Web services, Web services" name="DC.subject" />
<meta content="Axis runtime environment, skeleton Web services, Web services" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../concepts/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.doc.user/tasks/toverws.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="tsklwsdla" 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>Creating a Java bean skeleton from a WSDL document using the
Apache Axis run-time environment</title>
</head>
<body id="tsklwsdla"><a name="tsklwsdla"><!-- --></a>
<h1 class="topictitle1">Creating a Java bean skeleton from a WSDL document using the Apache
Axis run-time environment</h1>
<div><p>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.</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>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>
</div>
<div class="section">To create a Web service from a WSDL file using the Apache Axis run-time
environment:</div>
<ol>
<li><span>Switch to the J2EE perspective (<span class="uicontrol">Window &gt; Open Perspective
&gt; J2EE</span>).</span></li>
<li><span>In the Project Explorer view, select the WSDL file that you created
or imported into the Web Content folder of your Web project.</span></li>
<li><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</span> wizard. Click <span class="uicontrol">Next</span>.</span>
</li>
<li><span>Web Services page: select <span class="uicontrol">Top down Java bean Web service</span> as
your Web service type, and select the artifact from which the service will
be created.</span>
<ol type="a">
<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, WSDL files, deployment descriptors, and Java files when
appropriate.</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 service 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 service to a different runtime click the link to specify
a different runtime.</span></li>
<li class="substepexpand"><span>Select the service 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>If you want to create a client, select the type of proxy to
be generated and repeat the above steps for the client.</span></li>
<li class="substepexpand"><span>Publish the Web service: this will launch the Web Services Explorer
to publish your Web service to a UDDI registry.</span></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><span>Web Services Skeleton Java™ Bean Configuration page: Select the
folder where the generated Java will be stored. If you want to review
or edit the mappings between packages and namespaces, select the <span class="uicontrol">Define
custom mapping for namespace to package</span> check box. Click <span class="uicontrol">Next</span>.</span>
</li>
<li><span>Web Service Namespace to Package Mappings page: if you selected
<span class="uicontrol">Define custom mapping for package to namespace</span> on
the previous panel, you can enter your custom mapping pairs on this panel
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>.
Click <span class="uicontrol">Next</span>.</span></li>
<li><span>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 <span class="uicontrol">Go</span>.
The result will display in the Status pane. Click <span class="uicontrol">Next</span>.</span>
</li>
<li><span>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 <span class="uicontrol">Next</span>.</span></li>
<li><span>Web Service Client Test page: Use this page to select the following
options: </span>
<ol type="a">
<li><span>Select your test facility. You can test the generated proxy
in the Web Service Explorer, or you can generate a sample Web service JSP.</span>
</li>
<li><span>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.</span></li>
<li><span>Select <span class="uicontrol">Run test on server</span> to start the
server for you automatically.</span></li>
</ol>
</li>
<li><span>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
<span class="uicontrol">Finish</span>.</span></li>
</ol>
<div class="section"><div class="p">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: http://localhost: <var class="varname">port</var>/ <var class="varname">WebProject</var>Client/sample<em>BeanName</em>/ <var class="varname">WebServiceName</var>/TestClient.jsp 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>
<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 <var class="varname">Publishing the Web service</var> to complete
this task.</li>
</ul>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="../concepts/caxistover.html" title="This run-time environment is for users who prefer to develop for the open Apache Axis platform. It is for non-production use only. Axis is the third generation of the Apache SOAP implementation. It evolved from Apache SOAP to make the SOAP engine more flexible, configurable, and able to handle both SOAP and the upcoming XML Protocol specification from the W3C open-source effort.">Creating Web services with the Apache Axis run-time 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.doc.user/tasks/toverws.html"> Developing Web services</a></div>
<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>