Author: mmerz
Date: Tue Sep 28 15:26:02 2004
New Revision: 47433
Added:
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/readme.html
Removed:
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/web/AddressBookWebService.jws
Modified:
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBookImpl.java
Log:
Cleaned up the samples.
Contributor: Daryoush Mehrtash
Added:
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/readme.html
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/readme.html
Tue Sep 28 15:26:02 2004
@@ -0,0 +1,168 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+ <title>readme.html</title>
+</head>
+<body>
+<p class="MsoNormal">This directory contains samples for annotation
+aware web
+services using the Axis’s drop in deployment model.</p>
+<p class="MsoNormal"><o:p> </o:p>AddressBook:<span style="">
+</span>Address
+Book is a client/server application that is based on the Axis’s
“addr”
+sample.<span style=""> </span>The sample is organized as a
+real application
+with POJO models, service interface, service implementation, and unit
+tests for
+the service.<span style=""> </span>The directory strutcture
+and ant build file can be used as the starting point of building new
+standalone
+web services.</p>
+<p class="MsoNormal"><o:p> </o:p></p>
+<table class="MsoTableGrid"
+ style="border: medium none ; border-collapse: collapse;" border="1"
+ cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr style="">
+ <td
+ style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 95.4pt;"
+ valign="top" width="127">
+ <p class="MsoNormal">build</p>
+ </td>
+ <td
+ style="border-style: solid solid solid none; border-color: windowtext
windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium;
padding: 0in 5.4pt; width: 347.4pt;"
+ valign="top" width="463">
+ <p class="MsoNormal">output of the build process</p>
+ </td>
+ </tr>
+ <tr style="">
+ <td
+ style="border-style: none solid solid; border-color: -moz-use-text-color
windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width:
95.4pt;"
+ valign="top" width="127">
+ <p class="MsoNormal">src</p>
+ </td>
+ <td
+ style="border-style: none solid solid none; border-color: -moz-use-text-color
windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium;
padding: 0in 5.4pt; width: 347.4pt;"
+ valign="top" width="463">
+ <p class="MsoNormal">The Web Service implementation. Web Serivce
+is implemented a java objects with POJO as the model</p>
+ </td>
+ </tr>
+ <tr style="">
+ <td
+ style="border-style: none solid solid; border-color: -moz-use-text-color
windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width:
95.4pt;"
+ valign="top" width="127">
+ <p class="MsoNormal">tests</p>
+ </td>
+ <td
+ style="border-style: none solid solid none; border-color: -moz-use-text-color
windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium;
padding: 0in 5.4pt; width: 347.4pt;"
+ valign="top" width="463">
+ <p class="MsoNormal">tests for the service.</p>
+ </td>
+ </tr>
+ <tr style="">
+ <td
+ style="border-style: none solid solid; border-color: -moz-use-text-color
windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width:
95.4pt;"
+ valign="top" width="127">
+ <p class="MsoNormal">web</p>
+ </td>
+ <td
+ style="border-style: none solid solid none; border-color: -moz-use-text-color
windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium;
padding: 0in 5.4pt; width: 347.4pt;"
+ valign="top" width="463">
+ <p class="MsoNormal">location of the .jws file that exposes the
+Web Service</p>
+ </td>
+ </tr>
+ <tr style="">
+ <td
+ style="border-style: none solid solid; border-color: -moz-use-text-color
windowtext windowtext; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width:
95.4pt;"
+ valign="top" width="127">
+ <p class="MsoNormal"><o:p> </o:p></p>
+ </td>
+ <td
+ style="border-style: none solid solid none; border-color: -moz-use-text-color
windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium;
padding: 0in 5.4pt; width: 347.4pt;"
+ valign="top" width="463">
+ <p class="MsoNormal"><o:p> </o:p></p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p class="MsoNormal"><o:p> </o:p></p>
+<p class="MsoNormal">Requirements:</p>
+
+<><o:p></o:p>You need to have servlet container running, you can use
+tomcat distribution from beehive, or download your own, or use
+alternative.</>
+<p class="MsoNormal"><o:p> </o:p></p>
+<p class="MsoNormal">How to Install the AddressBook webservice:</p>
+<p class="MsoNormal"><o:p> </o:p></p>
+<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if
!supportLists]--><span
+ style="">1)<span
+ style="font-family: "Times New Roman"; font-style: normal;
font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;
font-size-adjust: none; font-stretch: normal;">
+</span></span><!--[endif]-->Install
+AnnotatedAxis.<span style=""> </span>– See instruction in
+……..<span style=""> </span>Startup tomcat, and verify that
+AnnotatedAxis is installed by running: <a
+
href="http://localhost:8080/AnnotatedAxis/index.html">http://localhost:8080/AnnotatedAxis/index.html</a></p>
+
+<><o:p></o:p><!--[if !supportLists]--><span style="">
+2)<span
+ style="font-family: "Times New Roman"; font-style: normal;
font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;
font-size-adjust: none; font-stretch: normal;">
+</span></span><!--[endif]-->Set
+CATALINA_HOME to be the installed directory of the server.</>
+<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if
!supportLists]--><span
+ style="">3)<span
+ style="font-family: "Times New Roman"; font-style: normal;
font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;
font-size-adjust: none; font-stretch: normal;">
+</span></span><!--[endif]-->Go
+to BBEHIVE_HOME /wsm/samples/dropInDeployment/AddressBook/server/ run:<span
+ style=""> </span>“ant”. </p>
+<p class="MsoNormal" style="margin-left: 0.5in;">The default target
+will build your
+application, run JUnit Test on it, and build jar file in the build
+directory.</p>
+<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if
!supportLists]--><span
+ style="">4)<span
+ style="font-family: "Times New Roman"; font-style: normal;
font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;
font-size-adjust: none; font-stretch: normal;">
+</span></span><!--[endif]-->To
+deploy the application run “ant deploy”</p>
+<p class="MsoNormal" style="margin-left: 0.5in;">Deploy will copy the
+application
+jar file and content of the “web” directory to the
AnnotatedAxis<span
+ style=""> </span>(CATALINA_HOME/webapps/AnnotatedAxis)</p>
+<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if
!supportLists]--><span
+ style="">5)<span
+ style="font-family: "Times New Roman"; font-style: normal;
font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;
font-size-adjust: none; font-stretch: normal;">
+</span></span><!--[endif]-->At
+this point the server is installed, and you should be able to see your
+WSDL in:
+<a
+
href="http://localhost:8080/AnnotatedAxis/AddressBookWebService.jws?wsdl">http://localhost:8080/AnnotatedAxis/AddressBookWebService.jws?wsdl</a></p>
+<p class="MsoNormal"><o:p> </o:p></p>
+<p class="MsoNormal"><o:p> </o:p></p>
+<p class="MsoNormal">Once the server is up and running, you can try the
+client
+side to verify the server operation.<span style=""> </span>The
+client side uses the Axis WSDL2Java application to generate the client
+side
+code and unit test.<span style=""> </span></p>
+<p class="MsoNormal"><o:p> </o:p></p>
+<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if
!supportLists]--><span
+ style="">1)<span
+ style="font-family: "Times New Roman"; font-style: normal;
font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;
font-size-adjust: none; font-stretch: normal;">
+</span></span><!--[endif]-->Go
+to /wsm/samples/dropInDeployment/AddressBook/client</p>
+<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if
!supportLists]--><span
+ style="">2)<span
+ style="font-family: "Times New Roman"; font-style: normal;
font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal;
font-size-adjust: none; font-stretch: normal;">
+</span></span><!--[endif]-->Run
+ant</p>
+<p class="MsoNormal" style="margin-left: 0.25in;">This should generate
+the client
+code, and run the Junit test that Axis generates for the client.<span
+ style=""> </span>The JUnit test is basic call to every method
+of the web service,<span style=""> </span>it can be enhanced
+to perform validation.</p>
+</body>
+</html>
Modified:
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBookImpl.java
==============================================================================
---
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBookImpl.java
(original)
+++
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBookImpl.java
Tue Sep 28 15:26:02 2004
@@ -18,7 +18,6 @@
* $Header:$
*/
-import java.rmi.RemoteException;
import java.util.Hashtable;
import java.util.Map;
@@ -27,13 +26,13 @@
{
private Map<String, Address> addresses = new Hashtable<String, Address>();
- public void addEntry(String name, Address address) throws RemoteException
+ public void addEntry(String name, Address address)
{
System.out.println("addEntry is called." );
this.addresses.put(name, address);
}
- public Address getAddressFromName(String name) throws RemoteException
+ public Address getAddressFromName(String name)
{
System.out.println("getAddressFromName is called.");
return (Address) this.addresses.get(name);