Author: mmerz
Date: Wed Feb  2 17:31:42 2005
New Revision: 151095

URL: http://svn.apache.org/viewcvs?view=rev&rev=151095
Log:
Clean up w/ renaming...

Added:
    incubator/beehive/trunk/samples/EnhancedAddressBookWS/
      - copied from r151094, 
incubator/beehive/trunk/samples/wsm-enhanced-addressbook/EnhancedAddressBookWS/
    incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/
    incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/attachments/
    incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/build.xml
    
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/client-build.xml
    incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/logs/
    incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/
    incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/
    
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/
    
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/
    
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/
    
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/AddressBookImpl.java
    
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/EnhancedAddressBook.java
    
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/InvalidAddressException.java
    
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/InvalidNameException.java
    incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/web/
    
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/web/Service.jws
Removed:
    incubator/beehive/trunk/samples/wsm-addressbook/
    
incubator/beehive/trunk/samples/wsm-enhanced-addressbook/EnhancedAddressBookWS/

Added: incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/build.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/build.xml?view=auto&rev=151095
==============================================================================
--- incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/build.xml 
(added)
+++ incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/build.xml Wed 
Feb  2 17:31:42 2005
@@ -0,0 +1,126 @@
+<?xml version="1.0" ?>
+
+<!--
+   Copyright 2004 The Apache Software Foundation 
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+  
+      http://www.apache.org/licenses/LICENSE-2.0
+  
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+   $Header:$
+ -->
+
+<project name="EnhancedAddressBookWS" default="build" basedir=".">
+
+       <property environment="env" />
+
+       <property name="build.dir" location="build" />
+       <property name="gen.dir" location="${build.dir}/gen" />
+       <property name="classes.dir" location="${build.dir}/classes" />
+
+       <condition property="isJDK15">
+               <equals arg1="${ant.java.version}" arg2="1.5" />
+       </condition>
+
+       <path id="jars">
+               <fileset dir="./lib" >
+                       <include name="**/*.jar" />
+               </fileset>
+       </path>
+
+
+       <!-- ========================================= -->
+       <!-- build - build jar-file                    -->
+       <!-- ========================================= -->
+
+       <target name="build" depends="compile">
+               <jar jarfile="./lib/EnhancedAddressBookWS.jar">
+                       <fileset dir="${classes.dir}" />
+               </jar>
+       </target>
+
+
+       <!-- ========================================= -->
+       <!-- compile - compile sources                 -->
+       <!-- ========================================= -->
+
+       
+       <!-- <target name="compile" depends="update_jars, dirs" if="isJDK15" >  
-->
+               <target name="compile" depends="dirs" if="isJDK15" >
+               <taskdef name="apt" 
classname="org.apache.beehive.controls.runtime.generator.AptTask" 
classpath="lib/controls.jar" onerror="report" />
+
+               <apt srcdir="./src" destdir="${classes.dir}" 
gendir="${gen.dir}" compileByExtension="true" 
+                       classpathref="jars" 
srcExtensions="*.java,*.jcx,*.jcs,*.jws" >
+
+               </apt>
+
+       </target>       
+
+       <target name="update_jars" >
+               <property name="log4j.jar" 
location="${env.BEEHIVE_HOME}/external/log4j/log4j-1.2.8.jar" />
+               <property name="junit.jar" 
location="${env.BEEHIVE_HOME}/external/junit/junit.jar" />
+               <property name="velocity14.jar" 
location="${env.BEEHIVE_HOME}/external/velocity/velocity-1.4.jar" />
+               <property name="velocitydep14.jar" 
location="${env.BEEHIVE_HOME}/external/velocity/velocity-dep-1.4.jar" />
+               <property name="derby.jar" 
location="${env.BEEHIVE_HOME}/external/derby/derby_46005.jar" />
+               <property name="xbean.jar" 
location="${env.BEEHIVE_HOME}/external/xmlbeans/apache-xbean.jar" />
+
+               <copy todir="lib" >
+                       <fileset file="${log4j.jar}"/>
+                       <fileset file="${xbean.jar}"/>
+
+                       <!-- these are required by Controls and WSM -->
+                       <fileset file="${velocity14.jar}" />
+                       <fileset file="${velocitydep14.jar}"/>
+                       <fileset dir="${env.BEEHIVE_HOME}/wsm/lib">
+                               <include name="wsdltypes.jar"/>
+                       </fileset>
+
+                       <fileset dir="${env.BEEHIVE_HOME}/wsm/external">
+                               <include name="axis.jar"/>
+                               <include name="axis-ant.jar"/>
+                               <include name="jaxrpc.jar"/>
+                               <include name="saaj.jar"/>
+                               <include name="wsdl4j.jar"/>
+                               <include name="commons-discovery.jar"/>
+                       </fileset>
+
+                       <fileset dir="${env.BEEHIVE_HOME}/wsm/build/jars">
+                               <include name="wsm.jar"/>
+                               <include name="wsm-axis.jar"/>
+                       </fileset>
+                       <fileset dir="${env.BEEHIVE_HOME}/controls/build/jars">
+                               <include name="controls.jar"/>
+                       </fileset>
+               </copy>
+       </target>
+
+       <!-- ========================================= -->
+       <!-- dirs - create dirs required for compile   -->
+       <!-- ========================================= -->
+
+       <target name="dirs">
+               <mkdir dir="${classes.dir}" />
+               <mkdir dir="${gen.dir}" />
+       </target>
+
+
+       <!-- ========================================= -->
+       <!-- clean - remove build files                -->
+       <!-- ========================================= -->
+
+       <target name="clean" >
+               <delete file="velocity.log" />
+               <delete file="./lib/EnhancedAddressBookWS.jar" />
+               <delete dir="${build.dir}" />
+               <delete dir="${gen.dir}" />
+       </target>
+
+</project>
\ No newline at end of file

Added: 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/client-build.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/client-build.xml?view=auto&rev=151095
==============================================================================
--- 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/client-build.xml 
(added)
+++ 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/client-build.xml 
Wed Feb  2 17:31:42 2005
@@ -0,0 +1,69 @@
+<?xml version="1.0" ?>
+
+<project name="AddressBookClient" basedir="." default="all">
+       
+       <property name="AddressBook.wsdl.url" 
+               
value="http://localhost:8080/EnhancedAddressBook/web/Service.jws?wsdl"; />
+       
+       
+       <path id="jars">
+           <fileset dir="lib">
+               <include name="**/*.jar"/>
+           </fileset>
+       </path>
+       
+       <taskdef name="wsdl2java" 
classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask"
+        loaderref="axis" >
+        <classpath refid="jars"/>
+       </taskdef>
+
+ 
+       <target name="clean">
+               <delete dir="build" />
+               <delete dir="./logs" />
+               
+       </target>
+       
+       <target name="dirs">
+               <mkdir dir="build" />
+               <mkdir dir="build/generated" />
+               <mkdir dir="build/classes" />
+               <mkdir dir="./logs" />
+
+       </target>       
+       <target name="all" depends="genClient, compile, test"/>
+       
+       <target name="genClient" depends="dirs">
+           <wsdl2java url="${AddressBook.wsdl.url}"
+                      output="build/generated"
+                      testcase="yes">
+           </wsdl2java>
+
+       </target>
+       
+       <target name="compile" depends="genClient">
+                <javac srcdir="build/generated"
+                       destdir="build/classes"
+                       classpathref="jars"
+                       failonerror="true"
+                       source="1.4"
+                       />
+          </target>    
+       
+       <target name="test" depends="compile">
+               <junit printsummary="yes" haltonfailure="yes" showoutput="yes">
+               <classpath>
+                     <pathelement location= "build/classes"/>
+                     <path refid="jars"/>
+                 </classpath>
+            <formatter type="plain"/>
+               <batchtest fork="yes" todir="./logs">
+                   <fileset dir="build/classes">
+                     <include name="**/*Test*.class"/>
+                   </fileset>
+                 </batchtest>
+               </junit>
+               
+       </target>
+       
+</project>
\ No newline at end of file

Added: 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/AddressBookImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/AddressBookImpl.java?view=auto&rev=151095
==============================================================================
--- 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/AddressBookImpl.java
 (added)
+++ 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/AddressBookImpl.java
 Wed Feb  2 17:31:42 2005
@@ -0,0 +1,71 @@
+package org.apache.beehive.sample;
+
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import javax.xml.rpc.holders.CalendarHolder;
+
+public class AddressBookImpl implements EnhancedAddressBook
+{
+    private Map<String, Address> addresses = new Hashtable<String, Address>();
+
+    public void addEntry(String name, Address address) throws 
InvalidNameException, InvalidAddressException
+    {
+        System.out.println("addEntry is called." );
+        this.addresses.put(name, address);
+    }
+    
+    public Address getAddressFromName(String name)  throws InvalidNameException
+    {
+        System.out.println("getAddressFromName is called.");
+        return (Address) this.addresses.get(name);
+    }
+    
+
+    public Address[] getAddressFromNames(String[] name) throws 
InvalidNameException{
+        if(null == name) return null;
+        Address[] result = new Address[name.length];
+        for(int i=0; i< name.length; i++) {
+         result[i] = getAddressFromName(name[i]);
+        }
+        return result;
+    }    
+
+
+    public void oneWayWithNoParam() {
+        return;
+    }
+    
+
+    public String simpleNoParamMethod () {
+        return "No Param method";
+    }
+
+    public String notWebService() {
+        return "Not available through Web service";
+    }
+
+     public String oneINOUTParamMethod(CalendarHolder calendar) {
+         return null;
+    }
+
+}

Added: 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/EnhancedAddressBook.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/EnhancedAddressBook.java?view=auto&rev=151095
==============================================================================
--- 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/EnhancedAddressBook.java
 (added)
+++ 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/EnhancedAddressBook.java
 Wed Feb  2 17:31:42 2005
@@ -0,0 +1,38 @@
+package org.apache.beehive.sample;
+
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+import javax.xml.rpc.holders.StringHolder;
+import javax.xml.rpc.holders.CalendarHolder;
+public interface EnhancedAddressBook
+{
+    void addEntry(java.lang.String name, Address address)throws 
InvalidNameException, InvalidAddressException;
+    Address getAddressFromName(java.lang.String name)throws 
InvalidNameException;
+    public Address[] getAddressFromNames(String[] name) throws 
InvalidNameException;
+     public void oneWayWithNoParam();
+    public String simpleNoParamMethod ();
+    public String oneINOUTParamMethod (CalendarHolder calendar);
+    
+    /**
+     * This method is not exposed by the Web Service and can only be used
+     * locally.
+     * @return A random string.
+     */
+    public String notWebService() ;
+
+}

Added: 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/InvalidAddressException.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/InvalidAddressException.java?view=auto&rev=151095
==============================================================================
--- 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/InvalidAddressException.java
 (added)
+++ 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/InvalidAddressException.java
 Wed Feb  2 17:31:42 2005
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.sample;
+
+
+public class InvalidAddressException extends Exception {
+
+}

Added: 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/InvalidNameException.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/InvalidNameException.java?view=auto&rev=151095
==============================================================================
--- 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/InvalidNameException.java
 (added)
+++ 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/org/apache/beehive/sample/InvalidNameException.java
 Wed Feb  2 17:31:42 2005
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.sample;
+
+
+public class InvalidNameException extends Exception {
+
+}

Added: 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/web/Service.jws
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/web/Service.jws?view=auto&rev=151095
==============================================================================
--- 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/web/Service.jws
 (added)
+++ 
incubator/beehive/trunk/samples/EnhancedAddressBookWS/WEB-INF/src/web/Service.jws
 Wed Feb  2 17:31:42 2005
@@ -0,0 +1,109 @@
+package web;
+
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+
+import org.apache.beehive.sample.Address;
+import org.apache.beehive.sample.EnhancedAddressBook;
+import org.apache.beehive.sample.AddressBookImpl;
+import org.apache.beehive.sample.InvalidAddressException;
+import org.apache.beehive.sample.InvalidNameException;
+
+import javax.xml.rpc.holders.StringHolder;
+import javax.xml.rpc.holders.CalendarHolder;
+
+
[EMAIL 
PROTECTED](targetNamespace="http://beehive.apache.org/EnhancedAddressBook";)
+public class Service implements EnhancedAddressBook {
+
+    EnhancedAddressBook addressBook;
+
+    /**
+     * Constructor.
+     */
+    public Service() {
+        addressBook = new AddressBookImpl();
+    }
+    
+    /**
+     * Web method that adds an entry to the AddressBook.
+     * @param name
+     * @param address
+     */
+    @WebMethod
+    public void addEntry(@WebParam (name="name")String name, 
+               @WebParam (name="address")Address address) 
+               throws InvalidNameException, InvalidAddressException{
+        addressBook.addEntry(name, address);
+    }
+
+    /**
+     * Web method that queries the AddressBook.
+     * @param name
+     * @return
+     */
+    @WebMethod
+    public Address getAddressFromName(@WebParam (name="name" )String name)
+       throws InvalidNameException {
+        return addressBook.getAddressFromName(name);
+    }
+    
+    @WebMethod
+    public Address[] getAddressFromNames(@WebParam (name="name")String[] name) 
+       throws InvalidNameException{
+       return addressBook.getAddressFromNames(name);
+    }    
+    
+
+    
+    
+     @WebMethod
+    @Oneway
+    public void oneWayWithNoParam() {
+       return;
+    }
+    
+    
+    
+    @WebMethod
+    public String simpleNoParamMethod () {
+       return "No Param method";
+    }
+    
+    @WebMethod
+    public String oneINOUTParamMethod (@WebParam (name="calendar", 
mode=WebParam.Mode.INOUT )CalendarHolder calendar) {
+       return addressBook.oneINOUTParamMethod(calendar);
+    }
+    
+    /**
+     * This method is not exposed by the Web Service and can only be used
+     * locally.
+     * @return A random string.
+     */
+    public String notWebService() {
+        return "Not available through Web service";
+    }
+    
+    
+}


Reply via email to