beehive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mm...@apache.org
Subject svn commit: rev 46951 - in incubator/beehive/trunk/wsm/samples: . dropInDeployment dropInDeployment/AddressBook dropInDeployment/AddressBook/client dropInDeployment/AddressBook/server dropInDeployment/AddressBook/server/build dropInDeployment/AddressBook/server/build/classes dropInDeployment/AddressBook/server/build/classes/org dropInDeployment/AddressBook/server/build/classes/org/beehive dropInDeployment/AddressBook/server/build/classes/org/beehive/demo dropInDeployment/AddressBook/server/src dropInDeployment/AddressBook/server/src/org dropInDeployment/AddressBook/server/src/org/beehive dropInDeployment/AddressBook/server/src/org/beehive/demo dropInDeployment/AddressBook/server/tests dropInDeployment/AddressBook/server/tests/org dropInDeployment/AddressBook/server/tests/org/beehive dropInDeployment/AddressBook/server/tests/org/beehive/demo dropInDeployment/AddressBook/server/web
Date Tue, 21 Sep 2004 02:13:55 GMT
Author: mmerz
Date: Mon Sep 20 19:13:54 2004
New Revision: 46951

Added:
   incubator/beehive/trunk/wsm/samples/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/client/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/AddressBookWS.jar
  (contents, props changed)
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/TEST-org.beehive.demo.AddressBookTest.txt
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build.xml
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/Address.class
  (contents, props changed)
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/AddressBook.class
  (contents, props changed)
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/AddressBookImpl.class
  (contents, props changed)
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/AddressBookService.class
  (contents, props changed)
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/AddressBookTest.class
  (contents, props changed)
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/Phone.class
  (contents, props changed)
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/StateType.class
  (contents, props changed)
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/Address.java
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBook.java
   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/AddressBookService.java
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/Phone.java
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/StateType.java
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/tests/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/tests/org/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/tests/org/beehive/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/tests/org/beehive/demo/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/tests/org/beehive/demo/AddressBookTest.java
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/web/
   incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/web/AddressBookWebService.jws
Log:
Added Samples directory.

Contributor: Daryoush Mehrtash


Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/AddressBookWS.jar
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/TEST-org.beehive.demo.AddressBookTest.txt
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/TEST-org.beehive.demo.AddressBookTest.txt
Mon Sep 20 19:13:54 2004
@@ -0,0 +1,5 @@
+Testsuite: org.beehive.demo.AddressBookTest
+Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0 sec
+
+Testcase: test1AddressBookWebServiceAddEntry took 0 sec
+Testcase: test2AddressBookWebServiceGetAddressFromName took 0 sec

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build.xml	Mon
Sep 20 19:13:54 2004
@@ -0,0 +1,96 @@
+<?xml version="1.0" ?>
+
+<project name="AddressBookWS" default="all">
+
+	<property name="AnnotatedAxisWebappHome" value="C:\apps\jakarta-tomcat-4.1.30\webapps\AnnotatedAxis\"/>
+	
+	<path id="jars">
+		<fileset dir="${AnnotatedAxisWebappHome}/WEB-INF/lib/">
+    	  <include name="**/*.jar"/>
+ 		</fileset>
+	</path>
+	
+	<target name="all" depends="verify,compile, test, build_deploy, deploy"/>
+	   	
+	
+	<target name="clean">
+		<delete dir="build"/>
+		<mkdir dir="build/classes"/>
+	</target>
+
+	
+   <target name="verify" >
+		<fail message="AnnotatedAxisWebappHome must be set to the Annotated Axis Webapp directory.">

+  	 		<condition >
+  	 			<not>
+   				<isset property="AnnotatedAxisWebappHome"/>
+   				</not>
+			</condition>
+		</fail>
+   	
+		<fail message="Failed to find Annototated Axis in ${AnnotatedAxisWebappHome}"> 
+   			<condition >
+   				<not>
+ 	 				<and>
+ 		      		 	<available file="${AnnotatedAxisWebappHome}/WEB-INF/lib/wsm.jar" property="annotated.axis.present"/>
+   		 				<available file="${AnnotatedAxisWebappHome}/WEB-INF/lib/wsm-axis.jar" property="annotated.axis.present"/>
+  					</and>
+   				</not>
+			</condition>
+		</fail>
+   	</target>
+
+
+	<target name="compile" >
+  		 <javac srcdir="src"
+			destdir="build/classes"
+			classpathref="jars"
+			failonerror="true"
+			/>
+		
+
+   </target>
+
+
+
+   <target name="test" depends="compile, verify">
+	 <javac srcdir="tests"
+		destdir="build/classes"
+		classpathref="jars"
+		failonerror="true"
+		/>
+
+   	<junit printsummary="yes" haltonfailure="yes">
+        <classpath>
+              <pathelement location= "build/classes"/>
+              <path refid="jars"/>
+          </classpath>
+
+   	  	<formatter type="plain"/>
+
+    	<batchtest fork="yes" todir=".">
+   	    <fileset dir="tests">
+   	      <include name="**/*Test*.java"/>
+   	    </fileset>
+   	  </batchtest>
+   	</junit>
+   	
+
+   	</target>
+	
+	
+   <target name="build_deploy" depends="verify,compile, test">
+    	<jar jarfile="AddressBookWS.jar" >
+         <fileset dir="build/classes" >
+               <exclude name="**/Test.class"/>
+         </fileset>
+     </jar>
+  		
+   	</target>
+   <target name="deploy" depends="verify,compile, test, build_deploy" if="AnnotatedAxisWebappHome">
+   		<copy file="AddressBookWS.jar" todir="${AnnotatedAxisWebappHome}/WEB-INF/lib/" overwrite="true"
/>
+		<copy file="web/AddressBookWebService.jws" todir="${AnnotatedAxisWebappHome}/" overwrite="true"
/> 			
+   	</target>
+
+	   	
+</project>
\ No newline at end of file

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/Address.class
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/AddressBook.class
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/AddressBookImpl.class
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/AddressBookService.class
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/AddressBookTest.class
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/Phone.class
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build/classes/org/beehive/demo/StateType.class
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/Address.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/Address.java
Mon Sep 20 19:13:54 2004
@@ -0,0 +1,114 @@
+package org.beehive.demo;
+
+
+
+
+public class Address  implements java.io.Serializable {
+    private static final long serialVersionUID = 1L;
+    private int streetNum;
+    private java.lang.String streetName;
+    private java.lang.String city;
+    private StateType state;
+    private int zip;
+    private Phone phoneNumber;
+
+ 
+ 
+    /**
+     * @param streetNum
+     * @param streetName
+     * @param city
+     * @param state
+     * @param zip
+     * @param phoneNumber
+     */
+    public Address(int streetNum, java.lang.String streetName,
+            java.lang.String city, StateType state, int zip, Phone phoneNumber) {
+        super();
+        this.streetNum = streetNum;
+        this.streetName = streetName;
+        this.city = city;
+        this.state = state;
+        this.zip = zip;
+        this.phoneNumber = phoneNumber;
+    }
+    /**
+     * 
+     */
+    public Address() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+    /**
+     * @return Returns the city.
+     */
+    public java.lang.String getCity() {
+        return city;
+    }
+    /**
+     * @param city The city to set.
+     */
+    public void setCity(java.lang.String city) {
+        this.city = city;
+    }
+    /**
+     * @return Returns the phoneNumber.
+     */
+    public Phone getPhoneNumber() {
+        return phoneNumber;
+    }
+    /**
+     * @param phoneNumber The phoneNumber to set.
+     */
+    public void setPhoneNumber(Phone phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+    /**
+     * @return Returns the state.
+     */
+    public StateType getState() {
+        return state;
+    }
+    /**
+     * @param state The state to set.
+     */
+    public void setState(StateType state) {
+        this.state = state;
+    }
+    /**
+     * @return Returns the streetName.
+     */
+    public java.lang.String getStreetName() {
+        return streetName;
+    }
+    /**
+     * @param streetName The streetName to set.
+     */
+    public void setStreetName(java.lang.String streetName) {
+        this.streetName = streetName;
+    }
+    /**
+     * @return Returns the streetNum.
+     */
+    public int getStreetNum() {
+        return streetNum;
+    }
+    /**
+     * @param streetNum The streetNum to set.
+     */
+    public void setStreetNum(int streetNum) {
+        this.streetNum = streetNum;
+    }
+    /**
+     * @return Returns the zip.
+     */
+    public int getZip() {
+        return zip;
+    }
+    /**
+     * @param zip The zip to set.
+     */
+    public void setZip(int zip) {
+        this.zip = zip;
+    }
+}

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBook.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBook.java
Mon Sep 20 19:13:54 2004
@@ -0,0 +1,8 @@
+package org.beehive.demo;
+
+
+
+public interface AddressBook extends java.rmi.Remote {
+    public void addEntry(java.lang.String name, Address address) throws java.rmi.RemoteException;
+    public Address getAddressFromName(java.lang.String name) throws java.rmi.RemoteException;
+}

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBookImpl.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBookImpl.java
Mon Sep 20 19:13:54 2004
@@ -0,0 +1,16 @@
+
+package org.beehive.demo;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+public class AddressBookImpl implements AddressBook {
+    private Map<String, Address> addresses = new Hashtable<String, Address>();
+
+    public void addEntry(java.lang.String name, Address address) throws java.rmi.RemoteException
{
+        this.addresses.put(name, address);
+    }
+    public Address getAddressFromName(java.lang.String name) throws java.rmi.RemoteException
{
+        return (Address) this.addresses.get(name);
+    }
+}

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBookService.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/AddressBookService.java
Mon Sep 20 19:13:54 2004
@@ -0,0 +1,11 @@
+package org.beehive.demo;
+
+
+
+public interface AddressBookService extends javax.xml.rpc.Service {
+    public java.lang.String getAddressBookAddress();
+
+    public AddressBook getAddressBook() throws javax.xml.rpc.ServiceException;
+
+    public AddressBook getAddressBook(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
+}

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/Phone.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/Phone.java
Mon Sep 20 19:13:54 2004
@@ -0,0 +1,68 @@
+
+
+package org.beehive.demo;
+
+public class Phone  implements java.io.Serializable {
+    private static final long serialVersionUID = 1L;
+    private int areaCode;
+    private java.lang.String exchange;
+    private java.lang.String number;
+
+ 
+
+    /**
+     * @param areaCode
+     * @param exchange
+     * @param number
+     */
+    public Phone(int areaCode, java.lang.String exchange,
+            java.lang.String number) {
+        super();
+        this.areaCode = areaCode;
+        this.exchange = exchange;
+        this.number = number;
+    }
+    /**
+     * 
+     */
+    public Phone() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+    /**
+     * @return Returns the areaCode.
+     */
+    public int getAreaCode() {
+        return areaCode;
+    }
+    /**
+     * @param areaCode The areaCode to set.
+     */
+    public void setAreaCode(int areaCode) {
+        this.areaCode = areaCode;
+    }
+    /**
+     * @return Returns the exchange.
+     */
+    public java.lang.String getExchange() {
+        return exchange;
+    }
+    /**
+     * @param exchange The exchange to set.
+     */
+    public void setExchange(java.lang.String exchange) {
+        this.exchange = exchange;
+    }
+    /**
+     * @return Returns the number.
+     */
+    public java.lang.String getNumber() {
+        return number;
+    }
+    /**
+     * @param number The number to set.
+     */
+    public void setNumber(java.lang.String number) {
+        this.number = number;
+    }
+}

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/StateType.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/src/org/beehive/demo/StateType.java
Mon Sep 20 19:13:54 2004
@@ -0,0 +1,30 @@
+
+package org.beehive.demo;
+
+public class StateType implements java.io.Serializable {
+    private static final long serialVersionUID = 1L;
+    String state;
+    
+   
+    /**
+     * 
+     */
+    public StateType() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+    /**
+     * @param state
+     */
+    public StateType(String state) {
+        super();
+        this.state = state;
+    }
+    /**
+     * @return Returns the state.
+     */
+    public String getState() {
+        return state;
+    }
+
+}

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/tests/org/beehive/demo/AddressBookTest.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/tests/org/beehive/demo/AddressBookTest.java
Mon Sep 20 19:13:54 2004
@@ -0,0 +1,27 @@
+package org.beehive.demo;
+
+import junit.framework.TestCase;
+
+
+/*
+ * 
+ * Local version of unit test for the implementation class.  
+ * 
+ */
+public class AddressBookTest extends TestCase {
+
+    public void test1AddressBookWebServiceAddEntry() throws Exception {
+        // Test operation
+        new AddressBookImpl().addEntry(new java.lang.String(),
+                new org.beehive.demo.Address());
+        // TBD - validate results
+    }
+
+    public void test2AddressBookWebServiceGetAddressFromName() throws Exception {
+        // Test operation
+        org.beehive.demo.Address value = null;
+        value = new AddressBookImpl()
+                .getAddressFromName(new java.lang.String());
+        // TBD - validate results
+    }
+}
\ No newline at end of file

Added: incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/web/AddressBookWebService.jws
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/web/AddressBookWebService.jws
Mon Sep 20 19:13:54 2004
@@ -0,0 +1,42 @@
+import java.rmi.RemoteException;
+
+import org.beehive.demo.Address;
+import org.beehive.demo.AddressBook;
+import org.beehive.demo.AddressBookImpl;
+
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+
+@WebService( targetNamespace="http://www.beehive.com/AddressBook")
+public class AddressBookWebService implements AddressBook {
+
+    AddressBook  addressBook;
+    
+    
+    public AddressBookWebService() {
+        addressBook= new AddressBookImpl();
+    }
+    
+    /**
+     * @param name
+     * @param address
+     * @throws java.rmi.RemoteException
+     */
+    @WebMethod
+    public void addEntry(String name, Address address) throws RemoteException {
+        addressBook.addEntry(name, address);
+    }
+    /**
+     * @param name
+     * @return
+     * @throws java.rmi.RemoteException
+     */
+    @WebMethod
+    public Address getAddressFromName(String name) throws RemoteException {
+        return addressBook.getAddressFromName(name);
+    }
+}

Mime
View raw message